Giter VIP home page Giter VIP logo

libnabo's Introduction



Shows an the dark NorLab logo in light mode and light NorLab logo in dark mode.

libnabo

NorLab TeamCity GUI (VPN/intranet access)   •   norlabulaval (Docker Hub)  

libnabo is a fast K Nearest Neighbour library for low-dimensional spaces.

GitHub Repo stars GitHub forks GitHub License GitHub release (with filter) Docker Image Version (latest semver)


libnabo provides a clean, legacy-free, scalar-type–agnostic API thanks to C++ templates. Its current CPU implementation is strongly inspired by ANN, but with more compact data types. On the average, libnabo is 5% to 20% faster than ANN.

Dependencies:

  • libnabo depends on Eigen, a modern C++ matrix and linear-algebra library.
  • libnabo works with either version 2 or 3 of Eigen.
  • libnabo also optionally depends on Boost, a C++ general library, for Python bindings.

Credit:

If you are interested in a pure-Rust version, check that repository out.


Supported OS And Architecture

libnabo is tested on our build system under the following architecture and OS:

  • x86 and arm64/v8
  • Ubuntu bionic (18.04) and focal (20.04)

Note:

  • libnabo reportedly works on MacOs OsX (latest) and Windows (latest)

★ Version 1.1.0 Release Note

This release of libnabo introduces the integration of norlab-build-system (NBS) as a git submodule for codebase development and testing.

Execute the following to clone the repository with its submodule:

git clone --recurse-submodules https://github.com/norlab-ulaval/libnabo.git

If libnabo was previously cloned, execute the following to fetch its new submodule

git submodule update --remote --recursive --init

★ Contributing Instructions

See contributing_instructions.md for instructions related to bug reporting, code contribution and for setting up the libnabo-build-system on your workstation to speed up your local development workflow.


Docker images

Run the following commands to pull and run libnabo in a docker container

docker pull norlabulaval/libnabo:latest-ubuntu-focal

docker run -it --rm norlabulaval/libnabo:latest-ubuntu-focal

See available libnabo image tags on dockerhub.

To install docker related dependencies on ubuntu, execute the following

cd ./build_system/nabo_utility_script

# Execute docker tools install script i.e. docker daemon, docker compose, docker buildx
bash nabo_install_docker_tools.bash

Compilation

For conveniences, you can use the provided build script for Unix

bash libnabo_dependencies_installer.bash

# Use the --help flag to see the list of optional flag
bash libnabo_installer.bash [<optional flag>]

If you want more control, you can follow these commands:

SRC_DIR=`pwd`
BUILD_DIR=${SRC_DIR}/build
mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
cmake ${SRC_DIR}
cmake --build ${BUILD_DIR}
sudo cmake --build ${BUILD_DIR} --target install

These lines will compile libnabo in a build sub-directory and install it system-wide.

To uninstall libnabo, simply run sudo make uninstall from your build directory.

Compilation options

libnabo provides the following compilation options, available through CMake:

  • SHARED_LIBS (boolean, default: false): if true, build a shared library, otherwise build a static library

Documentation

You can generate the documentation by typing:

make doc

Prerequisites

If your operating system does not provide it, you must get Eigen, and Boost if you want to build the Python bindings. Eigen only needs to be downloaded and extracted.

Add libnabo to your CMake project

find_package(libnabo REQUIRED)
target_link_libraries(example PUBLIC ${libnabo_LIBRARIES})
target_include_directories(example PUBLIC ${libnabo_INCLUDE_DIRS})

Usage

libnabo is easy to use. For example, assuming that you are working with floats and that you have a point set M and a query point q, you can find the K nearest neighbours of q in M:

#include "nabo/nabo.h"
using namespace Nabo;
using namespace Eigen;
...
NNSearchF* nns = NNSearchF::createKDTreeLinearHeap(M);

const int K = 5;
VectorXi indices(K);
VectorXf dists2(K);

nns->knn(q, indices, dists2, K);

In this example, M is an Eigen (refering to the software, not to the math) matrix (column major, float) and q is an Eigen vector (float). Note that M must stay alive throughout the use of libnabo, otherwise the results of knn are undefined. The results indices and dists2 are Eigen vectors of indices and squared distances refering to the columns of M. See examples/trivial.cpp for a compilable version of this example, and examples/usage.cpp for a slightly more complex example involving multi-point queries.

Running make doc in your build directory will generate a browsable documentation in doc/html. The main page doc/html/index.html contains a detailed overview of the usage of libnabo.

You can find a complete CMake integration example in examples/libnabo-cmake-example to see how to look for, and link against this library.

Python bindings

libnabo includes python bindings that are compiled if Python is available. The resulting module is called pynabo, you can see an example in python/test.py. You can find more information in the docstring-based documentation:

python -c "import pynabo; help(pynabo.NearestNeighbourSearch)"

Building

The Python bindings can be generated for Python 2 or Python 3. To specify the version of the interpreter to use when building the bindings, set the PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR variables. For example if you have both Python 2.7 and 3.5 installed, you could ask CMake to generate Python 3 bindings by using the following command.

cmake -DPYTHON_VERSION_MAJOR=3 -DPYTHON_VERSION_MINOR=5 ..

On Debian-based distributions you may also need the -DPYTHON_DEB_INSTALL_TARGET option enabled.

Unit testing

The distribution of libnabo integrates a unit test module, based on CTest. Just type:

make test

...in the build directory to run the tests. Their outputs are available in the Testing directory. These consist of validation and benchmarking tests. If ANN or FLANN are detected when compiling libnabo, make test will also perform comparative benchmarks.

Citing libnabo

If you use libnabo in the academic context, please cite this paper that evaluates its performances in the contex of ICP:

@article{elsebergcomparison,
	title={Comparison of nearest-neighbor-search strategies and implementations for efficient shape registration},
	author={Elseberg, J. and Magnenat, S. and Siegwart, R. and N{\"u}chter, A.},
	journal={Journal of Software Engineering for Robotics (JOSER)},
	pages={2--12},
	volume={3},
	number={1},
	year={2012},
	issn={2035-3928}
}

License

libnabo is released under a permissive BSD license.

libnabo's People

Contributors

boxanm avatar c42f avatar cezheng avatar davidlandry93 avatar ffurrer avatar furgalep avatar hannessommer avatar jefferis avatar jlblancoc avatar magehrig avatar marvelous avatar maximecharriere avatar peci1 avatar pierrickkoch avatar pomerlef avatar redleader962 avatar sandsmark avatar simonlynen avatar simonpierredeschenes avatar spaceim avatar stephanemagnenat avatar taketwo avatar tcies avatar timple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libnabo's Issues

pynabo on PyPI

Would it be possible to deploy python wheels on PyPI?

Cannot instantiate the object-OpenCL

at vs2010 use Opencl display follow:
error 5 error C2259: “Nabo::BruteForceSearchOpenCL”: Cannot instantiate the object d:\icpnew\pull_nabo\nabo\nabo.cpp 137 1 naboLib
error 8 error C2259: “Nabo::BruteForceSearchOpenCL”: Cannot instantiate the object d:\icpnew\pull_nabo\nabo\nabo.cpp 137 1 naboLib
error 4 error C2259: “Nabo::KDTreeBalancedPtInLeavesStackOpenCL”: Cannot instantiate the object d:\icpnew\pull_nabo\nabo\nabo.cpp 136 1 naboLib
error 7 error C2259: “Nabo::KDTreeBalancedPtInLeavesStackOpenCL”: Cannot instantiate the object d:\icpnew\pull_nabo\nabo\nabo.cpp 136 1 naboLib
error 3 error C2259: “Nabo::KDTreeBalancedPtInNodesStackOpenCL”: Cannot instantiate the object d:\icpnew\pull_nabo\nabo\nabo.cpp 135 1 naboLib
error 6 error C2259: “Nabo::KDTreeBalancedPtInNodesStackOpenCL”: Cannot instantiate the object d:\icpnew\pull_nabo\nabo\nabo.cpp 135 1 naboLib

Mac: CMake is mixing different versions of python libraries in pynabo.so

Problem: this CMakeList.txt is mixing different versions of python in it's configuration. This leads to the following:

$ python -c "import pynabo; help(pynabo.NearestNeighbourSearch)"
Segmentation fault: 11

This happen when multiple version of python are installed. For me, boost +python were installed with MacPorts but similar problem are to be expected with Homebrew: Homebrew/legacy-homebrew#25118

The temporary fix: use ccmake in your build folder and change manually the variables related to python. In my case, for python 2.7 installed from MacPorts:

 PYTHON_EXECUTABLE = /opt/local/bin/python                                                                                                                               
 PYTHON_INCLUDE_DIR = /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Headers                                                                                 
 PYTHON_LIBRARY =  /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib 
 PY_NUMPY = /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy 

undefined behaviour in kdtree_cpu.cpp caught by -fsanitize=undefined

I have recently wrapped libnabo in a package for R (here, source here). Although the package was accepted for distribution by CRAN, it was quickly pointed out to me that there is at least one place in libnabo that appears to depend on undefined behaviour by the compiler. Specifically at line 245 in kdtree_cpu.cpp:

const uint64_t maxNodeCount((1 << (32-dimBitCount)) - 1);

when the dimension of coordinates is 1 and dimBitCount=1 that will imply:

1 << 31

which is not defined (but will evaluate to 2147483647 in most cases). Obviously dim=0 will also give an error but that should never happen. I think that the fix is as simple as:

const uint64_t maxNodeCount((1U << (32-dimBitCount)) - 1);

but I am no expert, so I offer that for discussion rather than immediately as a pull request.

P.S. I had some trouble debugging this within the R package so I ended up making a small test program:

#include <iostream>

// Typically:
// clang++ -fsanitize=undefined -o ubsan_test ubsan_test.cpp
// Currently on mac with Apple clang:
// clang++ -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -o ubsan_test ubsan_test.cpp

uint32_t getStorageBitCount(uint32_t v) {
  for (uint32_t  i = 0; i < 64; ++i)
  {
    if (v == 0)
    return i;
    v >>= 1;
  }
  return 64;
}

int main() {
  for (int dim = 1L; dim <10L; dim++) {
    std::cout << "dim: " << dim << std::endl;
    const uint32_t dimBitCount =  getStorageBitCount(dim);
    std::cout << "dimBitCount: " << dimBitCount << std::endl;
    uint64_t maxNodeCount = (1 << (32-dimBitCount)) - 1;
    std::cout << "maxNodeCount: " << maxNodeCount << std::endl << std::endl;
  }
  return 0;
}

Problem with include

I try to run the sample problem from the gsl manual.
The main file is the same as described there
the gsl library is in the following directory structure:
C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static
/include
/lib
the CMakeLists.txt is as follows:
cmake_minimum_required(VERSION 3.14)
project(EX8 C)

set(CMAKE_C_STANDARD 99)

SET( GSL_INCLUDE_DIR "C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static/include" )
INCLUDE_DIRECTORIES( "C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static/include" )
SET( GSL_LIB_BIN "C:/gsl-2.2.1_mingw-6.2.0/gsl-2.2.1-static/lib" )

add_executable(EX8 main.c)
TARGET_LINK_LIBRARIES(EX8 ${GSL_LIB_BIN}/libgsl.a )

The header file gsl/gsl_sf_bessel.h is in the include directory

I always receive the following error message:
CMakeFiles\EX8.dir/objects.a(main.c.obj): In function main': C:/Users/Chris/CLionProjects/EX8/main.c:7: undefined reference to gsl_sf_bessel_J0'

What is wrong? Any help will be appreciated

Indentation rule for libnabo?

I couldn't find any specification on this matter and the current state reflects some shift away from the original tab indentation.

Before things get worse this should be clarified for some future. Hence, this issue.

The majority of the files currently and the history of the mixed files clearly is in favour of tab indentation in all source files.

It seems to me, it is @stephanemagnenat who should decide this, unless he wants to open this question for discussion.

Cannot build Python binding

When I run cmake, I get the following output:

cmake -DPYTHON_DEB_INSTALL_TARGET=1 -DPYTHON_VERSION_MAJOR=2 -DPYTHON_VERSION_MINOR=7 -DCMAKE_BUILD_TYPE=RelW
ithDebInfo ${SRC_DIR}
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- Boost version: 1.54.0
OpenCL disabled, not looking for it
ANN not found, disabling it in benchmarks
FLANN not found, disabling it in benchmarks
-- Found PythonInterp: /usr/bin/python (found version "2.7.6")
Python version from interpreter is 2.7.6
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.6")
Python libs and executable found, looking for numpy and boost::python
-- Could NOT find Boost
Boost_PYTHON3_FOUNDfound:}
-- Found numpy: /usr/local/lib/python2.7/dist-packages/numpy
-- Configuring done
-- Generating done
-- Build files have been written to: /home/satoru/libnabo/build

I install boost with sudo apt-get install libboost-all-dev, but it seems cmake cannot find it when building Python bindings.

I can find mingw-32-libgomp in MinGW Installation Manager, but CMake fails to work

The C compiler identification is GNU 6.3.0
The CXX compiler identification is GNU 6.3.0
Check for working C compiler: C:/MinGW/bin/gcc.exe
Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: C:/MinGW/bin/g++.exe
Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
The Fortran compiler identification is GNU 6.3.0
Check for working Fortran compiler: C:/MinGW/bin/gfortran.exe
Check for working Fortran compiler: C:/MinGW/bin/gfortran.exe -- works
Detecting Fortran compiler ABI info
Detecting Fortran compiler ABI info - done
Checking whether C:/MinGW/bin/gfortran.exe supports Fortran 90
Checking whether C:/MinGW/bin/gfortran.exe supports Fortran 90 -- yes
Build Type: Release
C-Flags: -O3 -DNDEBUG | CXX-Flags: -O3 -DNDEBUG
Fortran-Flags: -O5 -DNDEBUG -m64
Found PkgConfig: C:/MinGW/bin/pkg-config.exe (found version "0.26")
Checking for module 'pthread'
No package 'pthread' found
Found pthread
pthread_LIBRARIES = C:/MinGW/lib/libpthread.dll.a
uuid not required
Checking for module 'gomp'
No package 'gomp' found
gomp_INCLUDE_DIR=gomp_INCLUDE_DIR-NOTFOUND
gomp_LIBRARY=C:/MinGW/lib/libgomp.dll
CMake Error at cmake/modules/LibFindMacros.cmake:74 (message):
Required library gomp NOT FOUND.

Install the library (dev version) and try again. If the library is already
installed, use ccmake to set the missing variables manually.
Call Stack (most recent call first):
cmake/modules/Findgomp.cmake:40 (libfind_process)
src/CMakeLists.txt:25 (find_package)

Configuring incomplete, errors occurred!
See also "C:/Software Installation/build/CMakeFiles/CMakeOutput.log".

Why isn`t there a Python package in PYPI?

There is a r package I can easily install at the console. Why isn`t there a python package we can easily install use "pip" in the cmd. It has taken me for two days to configure a python binding on my windows and linux and there are still problems and errors. I wish there could be a python package easily to download and install for C/C++ freshman. Advance thanks.

Prevent confusion about the lifetime expectation of createKDTreeLinearHeap regarding its cloud argument

As the history of issues #9, #34, #38 impressively demonstrate the signature of createKDTreeLinearHeap does not warn enough about the fact the the cloud argument must stay alive for its returned object to work properly. This is especially bad for implicit casting of Eigen matrices. If the cloud does not fit the expected Matrix type exactly it will be casted into a temporary matrix, of which a reference will be stored (this caused #9, #34 and was not even really understood with some effort).

See https://github.com/ethz-asl/libnabo/blob/master/nabo/nabo.h#L357.

Of course we should at least update the documentation of that function to include a suitable warning.

But I would suggest to go further and change the signature and accept a raw or smart pointer instead. A runtime check could be added to prevent null pointers. This will be more warning "within the code / signature" and prevent temporary objects from being used accidental.
In case of a raw pointer one could add a boolean flag that can optionally requests the libnabo to take over ownership. By providing a value to that flag users will be forced to think about lifetime.

If this is too much of a API change one could overload it with templated function that gets resolved whenever the type does not exactly match and issues a meaningful static assertion. This would at least catch temporary objects cases stemming from implicit casts.

Invalid index is set to 0

Invalid indices, e.g. if no nearest neighbor was found, are set to 0. This is problematic, because 0 is a valid index. Possible fix would be returning a negative index for signed indices or infinity for unsigned indices.

Could not find Boost

After running "cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${SRC_DIR}", the output is as below:

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.6") found components:  doxygen dot 
-- Found DOXYFILE_IN: /home/zwp/third-party/libnabo-master/Doxyfile.in  
-- Found LATEX: /usr/bin/latex   
-- Boost version: 1.54.0
CMake Warning (dev) at /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:200 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "c" will no longer be dereferenced when the policy is
  set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:324 (_OPENMP_GET_FLAGS)
  CMakeLists.txt:91 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:277 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:380 (_OPENMP_GET_SPEC_DATE)
  CMakeLists.txt:91 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenMP_C: -fopenmp (found version "1.0") 
CMake Warning (dev) at /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:277 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.9/Modules/FindOpenMP.cmake:380 (_OPENMP_GET_SPEC_DATE)
  CMakeLists.txt:91 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenMP_CXX: -fopenmp (found version "1.0") 
OpenCL disabled, not looking for it
ANN not found, disabling it in benchmarks
FLANN found, enabling it in benchmarks
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
Python version from interpreter is 2.7.6
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.6") 
Python libs and executable found, looking for numpy and boost::python
CMake Warning at /usr/share/cmake-3.9/Modules/FindBoost.cmake:1566 (message):
  No header defined for python3; skipping header check
Call Stack (most recent call first):
  python/CMakeLists.txt:46 (find_package)


-- Could NOT find Boost
Boost_PYTHON3_FOUNDfound:}
-- Found numpy: /usr/lib/python2.7/dist-packages/numpy  
-- Configuring done
-- Generating done
-- Build files have been written to: 

The boost has been installed to the default directory. I have no idea why it is can not be found.
However, that is not reported as an error. I'm not sure whether it will influence the usage of this library.

cmake-config files point to paths used during building

The libnaboTargets.cmake file, generated and installed into ros system directory after building, containts the following line:

IMPORTED_LOCATION_RELEASE "/home/v01d/pkgs/ros/arch-ros-stacks/indigo/libnabo/src/build/libnabo.so.1.0.6"

Which you can see references the build directory and not the real installed location. This makes libpointmatcher compilation fail.

Transition to gtest

Transitioning to gtests would allow build-server integration for test-results.

Exporting libnabo's build space: FIX or stop support

In line https://github.com/ethz-asl/libnabo/blob/master/CMakeLists.txt#L196 we export the package libnabo but no targets.

The problem with that is that below we do

set(libnabo_library $<TARGET_FILE:${LIB_NAME}>)

and ultimately pass this generator expression to depender packages through the variable libnabo_LIBRARIES in libnaboConfig.cmake in the build tree.

This leads to the error reported here norlab-ulaval/libpointmatcher#223 (comment), because the target nabo (${LIB_NAME}) is unknown to the dependers without it being exported and imported, too.

What we have to decide is whether we

  1. expand the generator expression as we do for install tree also for the build tree
  2. export the target nabo (I never did that; somebody else? might not work on the first shot)
  3. stop exporting the build space (usage through catkin doesn't require it)
  4. don't use the generator expression at all and hardcode the result, nabo (as done in https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file)

History / background of the generator expression:
In #57 it was introduced to prevent the warning about reading properties at config time :
https://github.com/ethz-asl/libnabo/pull/57/files#diff-af3b638bc2a3e6c650974192a53c7291R162
Using file(GENERATE ... later is the more proper way (thus no warning for the current solution). However it adds quite a complexity for so little.

Any opinion @simonlynen , @stephanemagnenat , @pomerlef ?

I'd opt for 1. or 3., as it seems overkill to export the target as well (2.) and because we generate already for the install tree. I'm hesitating with 4. because I don't know why it wasn't done that way in the first place. Does somebody remember?

./configure of IPOPT with Cygwin using GNU is successful, while the make install doesn't work!

According to website of istalling IPOPT on WINDOWS.
https://www.coin-or.org/Ipopt/documentation/node15.html

The ./configure process is sucessful, which is shown as follows:
supin@LAPTOP-82CHIOG0 ~/IPOPTDIR
$ ./configure
checking build system type... x86_64-unknown-cygwin
checking whether we want to compile in debug mode... no
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -Wno-long-long
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether C++ compiler g++ works... yes
configure: C++ compiler options are: -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long
configure: Trying to determine Fortran compiler name
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
configure: Fortran compiler options are: -O3 -pipe
checking for egrep... grep -E
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking dependency style of gcc... none
checking dependency style of g++... none
checking whether to enable maintainer-specific portions of Makefiles... no
configure: Using libtool script in directory ..
checking if library version is set... no
checking whether source of project ASL is available and should be compiled... yes, source in ThirdParty/ASL
checking whether source of project Metis is available and should be compiled...no, source file ./ThirdParty/Metis/metis-4.0/Lib/balance.c not available
checking whether source of project Blas is available and should be compiled... yes, source in ThirdParty/Blas
checking whether source of project Lapack is available and should be compiled... yes, source in ThirdParty/Lapack
checking whether source of project HSL is available and should be compiled... no, source file ./ThirdParty/HSL/coinhsl/common/deps.f not available
checking whether source of project Mumps is available and should be compiled...no, source file ./ThirdParty/Mumps/MUMPS/src/dmumps_part1.F not available
checking whether source of project Ipopt is available and should be compiled...yes, source in Ipopt
configure: configuring doxygen documentation options
checking for doxygen... no
checking for latex... no
checking for dot... NO
checking which command should be used to link input files... ln -s
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doxydoc/doxygen.conf
config.status: executing depfiles commands
configure: configuring in ThirdParty/ASL
configure: running /bin/sh './configure' --prefix=/home/supin/IPOPTDIR --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-cygwin
checking for svnversion... yes
checking whether we want to compile in debug mode... no
checking for egrep... grep -E
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -DASL_BUILD
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking dependency style of gcc... none
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... x86_64-unknown-cygwin
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 8192
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC...
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC...
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for f95 option to produce PIC...
checking if f95 static flag -static works... no
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
configure: Build is "x86_64-unknown-cygwin".
configure: Applying patches to libtool for GNU compiler
checking if library version is set... no
checking for pkg-config... pkg-config
checking pkg-config is at least version 0.16.0... yes
checking for getrusage... yes
checking for long long... yes
checking for ssize_t... yes
checking for dlopen in -ldl... yes
configure: Command line flags for (n)make "CFLAGS=" -O3 -pipe -DNDEBUG -DASL_BUILD "".
checking which command should be used to link input files... ln -s
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compile_MS_ASL
config.status: creating compile_Unix_ASL
config.status: creating coinasl.pc
config.status: creating coinasl-uninstalled.pc
config.status: executing depfiles commands
configure: In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting
configure: Configuration of ThirdPartyASL successful
configure: configuring in ThirdParty/Blas
configure: running /bin/sh './configure' --prefix=/home/supin/IPOPTDIR --cache-file=/dev/null --srcdir=.
checking for svnversion... yes
checking build system type... x86_64-unknown-cygwin
checking whether we want to compile in debug mode... no
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -Wno-long-long -DBLAS_BUILD
configure: Trying to determine Fortran compiler name
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
configure: Fortran compiler options are: -O3 -pipe
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran... -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0 -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib-L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../.. -lgfortran -lgcc_s -lquadmath -lm -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32
configure: Corrected Fortran libraries: -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0 -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../.. -lgfortran -lquadmath -lm -ladvapi32 -lshell32 -luser32 -lkernel32
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking for pkg-config... pkg-config
checking pkg-config is at least version 0.16.0... yes
checking for egrep... grep -E
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking dependency style of gcc... none
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... x86_64-unknown-cygwin
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 8192
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC...
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC...
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gfortran option to produce PIC...
checking if gfortran static flag -static works... no
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
configure: Build is "x86_64-unknown-cygwin".
configure: Applying patches to libtool for GNU compiler
checking if library version is set... no
checking which command should be used to link input files... ln -s
configure: creating ./config.status
config.status: creating Makefile
config.status: creating coinblas.pc
config.status: creating coinblas-uninstalled.pc
config.status: executing depfiles commands
configure: In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting
configure: Configuration of ThirdPartyBlas successful
configure: configuring in ThirdParty/Lapack
configure: running /bin/sh './configure' --prefix=/home/supin/IPOPTDIR --cache-file=/dev/null --srcdir=.
checking for svnversion... yes
checking build system type... x86_64-unknown-cygwin
checking whether we want to compile in debug mode... no
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -Wno-long-long -DLAPACK_BUILD
configure: Trying to determine Fortran compiler name
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
configure: Fortran compiler options are: -O3 -pipe
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran... -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0 -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib-L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../.. -lgfortran -lgcc_s -lquadmath -lm -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32
configure: Corrected Fortran libraries: -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0 -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../.. -lgfortran -lquadmath -lm -ladvapi32 -lshell32 -luser32 -lkernel32
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking for pkg-config... pkg-config
checking pkg-config is at least version 0.16.0... yes
checking whether -lblas has BLAS... no
checking for COIN-OR package Blas... yes: 1.4
checking for egrep... grep -E
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking dependency style of gcc... none
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... x86_64-unknown-cygwin
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 8192
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC...
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC...
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gfortran option to produce PIC...
checking if gfortran static flag -static works... no
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
configure: Build is "x86_64-unknown-cygwin".
configure: Applying patches to libtool for GNU compiler
checking if library version is set... no
checking which command should be used to link input files... ln -s
configure: creating ./config.status
config.status: creating Makefile
config.status: creating coinlapack.pc
config.status: creating coinlapack-uninstalled.pc
config.status: linking ./LAPACK/SRC/dbdsqr.f to dbdsqr.f
config.status: linking ./LAPACK/SRC/dgebal.f to dgebal.f
config.status: linking ./LAPACK/SRC/dgebak.f to dgebak.f
config.status: linking ./LAPACK/SRC/dgebd2.f to dgebd2.f
config.status: linking ./LAPACK/SRC/dgebrd.f to dgebrd.f
config.status: linking ./LAPACK/SRC/dgeev.f to dgeev.f
config.status: linking ./LAPACK/SRC/dgehd2.f to dgehd2.f
config.status: linking ./LAPACK/SRC/dgehrd.f to dgehrd.f
config.status: linking ./LAPACK/SRC/dgelq2.f to dgelq2.f
config.status: linking ./LAPACK/SRC/dgelqf.f to dgelqf.f
config.status: linking ./LAPACK/SRC/dgels.f to dgels.f
config.status: linking ./LAPACK/SRC/dgeqr2.f to dgeqr2.f
config.status: linking ./LAPACK/SRC/dgeqrf.f to dgeqrf.f
config.status: linking ./LAPACK/SRC/dgesvd.f to dgesvd.f
config.status: linking ./LAPACK/SRC/dgesv.f to dgesv.f
config.status: linking ./LAPACK/SRC/dgetf2.f to dgetf2.f
config.status: linking ./LAPACK/SRC/dgetrf.f to dgetrf.f
config.status: linking ./LAPACK/SRC/dgetri.f to dgetri.f
config.status: linking ./LAPACK/SRC/dgetrs.f to dgetrs.f
config.status: linking ./LAPACK/SRC/dggbak.f to dggbak.f
config.status: linking ./LAPACK/SRC/dggbal.f to dggbal.f
config.status: linking ./LAPACK/SRC/dgghrd.f to dgghrd.f
config.status: linking ./LAPACK/SRC/dggev.f to dggev.f
config.status: linking ./LAPACK/SRC/dhgeqz.f to dhgeqz.f
config.status: linking ./LAPACK/SRC/dhseqr.f to dhseqr.f
config.status: linking ./LAPACK/SRC/disnan.f to disnan.f
config.status: linking ./LAPACK/SRC/dlabad.f to dlabad.f
config.status: linking ./LAPACK/SRC/dlabrd.f to dlabrd.f
config.status: linking ./LAPACK/SRC/dlacpy.f to dlacpy.f
config.status: linking ./LAPACK/SRC/dladiv.f to dladiv.f
config.status: linking ./LAPACK/SRC/dlaebz.f to dlaebz.f
config.status: linking ./LAPACK/SRC/dlae2.f to dlae2.f
config.status: linking ./LAPACK/SRC/dlaev2.f to dlaev2.f
config.status: linking ./LAPACK/SRC/dlaexc.f to dlaexc.f
config.status: linking ./LAPACK/SRC/dlagtf.f to dlagtf.f
config.status: linking ./LAPACK/SRC/dlagts.f to dlagts.f
config.status: linking ./LAPACK/SRC/dlag2.f to dlag2.f
config.status: linking ./LAPACK/SRC/dlahqr.f to dlahqr.f
config.status: linking ./LAPACK/SRC/dlahr2.f to dlahr2.f
config.status: linking ./LAPACK/SRC/dlaisnan.f to dlaisnan.f
config.status: linking ./LAPACK/SRC/dlaln2.f to dlaln2.f
config.status: linking ./LAPACK/SRC/dlaneg.f to dlaneg.f
config.status: linking ./LAPACK/SRC/dlange.f to dlange.f
config.status: linking ./LAPACK/SRC/dlanhs.f to dlanhs.f
config.status: linking ./LAPACK/SRC/dlanst.f to dlanst.f
config.status: linking ./LAPACK/SRC/dlansy.f to dlansy.f
config.status: linking ./LAPACK/SRC/dlanv2.f to dlanv2.f
config.status: linking ./LAPACK/SRC/dlapy2.f to dlapy2.f
config.status: linking ./LAPACK/SRC/dlapy3.f to dlapy3.f
config.status: linking ./LAPACK/SRC/dlaqr0.f to dlaqr0.f
config.status: linking ./LAPACK/SRC/dlaqr1.f to dlaqr1.f
config.status: linking ./LAPACK/SRC/dlaqr2.f to dlaqr2.f
config.status: linking ./LAPACK/SRC/dlaqr3.f to dlaqr3.f
config.status: linking ./LAPACK/SRC/dlaqr4.f to dlaqr4.f
config.status: linking ./LAPACK/SRC/dlaqr5.f to dlaqr5.f
config.status: linking ./LAPACK/SRC/dlarf.f to dlarf.f
config.status: linking ./LAPACK/SRC/dlarfb.f to dlarfb.f
config.status: linking ./LAPACK/SRC/dlarfg.f to dlarfg.f
config.status: linking ./LAPACK/SRC/dlarft.f to dlarft.f
config.status: linking ./LAPACK/SRC/dlarfx.f to dlarfx.f
config.status: linking ./LAPACK/SRC/dlarnv.f to dlarnv.f
config.status: linking ./LAPACK/SRC/dlarra.f to dlarra.f
config.status: linking ./LAPACK/SRC/dlarrb.f to dlarrb.f
config.status: linking ./LAPACK/SRC/dlarrc.f to dlarrc.f
config.status: linking ./LAPACK/SRC/dlarrd.f to dlarrd.f
config.status: linking ./LAPACK/SRC/dlarre.f to dlarre.f
config.status: linking ./LAPACK/SRC/dlarrf.f to dlarrf.f
config.status: linking ./LAPACK/SRC/dlarrj.f to dlarrj.f
config.status: linking ./LAPACK/SRC/dlarrk.f to dlarrk.f
config.status: linking ./LAPACK/SRC/dlarrr.f to dlarrr.f
config.status: linking ./LAPACK/SRC/dlarrv.f to dlarrv.f
config.status: linking ./LAPACK/SRC/dlartg.f to dlartg.f
config.status: linking ./LAPACK/SRC/dlartv.f to dlartv.f
config.status: linking ./LAPACK/SRC/dlaruv.f to dlaruv.f
config.status: linking ./LAPACK/SRC/dlar1v.f to dlar1v.f
config.status: linking ./LAPACK/SRC/dlas2.f to dlas2.f
config.status: linking ./LAPACK/SRC/dlascl.f to dlascl.f
config.status: linking ./LAPACK/SRC/dlaset.f to dlaset.f
config.status: linking ./LAPACK/SRC/dlasq1.f to dlasq1.f
config.status: linking ./LAPACK/SRC/dlasq2.f to dlasq2.f
config.status: linking ./LAPACK/SRC/dlasq3.f to dlasq3.f
config.status: linking ./LAPACK/SRC/dlasq4.f to dlasq4.f
config.status: linking ./LAPACK/SRC/dlasq5.f to dlasq5.f
config.status: linking ./LAPACK/SRC/dlasq6.f to dlasq6.f
config.status: linking ./LAPACK/SRC/dlasr.f to dlasr.f
config.status: linking ./LAPACK/SRC/dlasrt.f to dlasrt.f
config.status: linking ./LAPACK/SRC/dlaswp.f to dlaswp.f
config.status: linking ./LAPACK/SRC/dlassq.f to dlassq.f
config.status: linking ./LAPACK/SRC/dlasv2.f to dlasv2.f
config.status: linking ./LAPACK/SRC/dlasyf.f to dlasyf.f
config.status: linking ./LAPACK/SRC/dlasy2.f to dlasy2.f
config.status: linking ./LAPACK/SRC/dlatrd.f to dlatrd.f
config.status: linking ./LAPACK/SRC/dorg2l.f to dorg2l.f
config.status: linking ./LAPACK/SRC/dorg2r.f to dorg2r.f
config.status: linking ./LAPACK/SRC/dorgbr.f to dorgbr.f
config.status: linking ./LAPACK/SRC/dorghr.f to dorghr.f
config.status: linking ./LAPACK/SRC/dorglq.f to dorglq.f
config.status: linking ./LAPACK/SRC/dorgl2.f to dorgl2.f
config.status: linking ./LAPACK/SRC/dorgql.f to dorgql.f
config.status: linking ./LAPACK/SRC/dorgqr.f to dorgqr.f
config.status: linking ./LAPACK/SRC/dorgtr.f to dorgtr.f
config.status: linking ./LAPACK/SRC/dorm2r.f to dorm2r.f
config.status: linking ./LAPACK/SRC/dormbr.f to dormbr.f
config.status: linking ./LAPACK/SRC/dormhr.f to dormhr.f
config.status: linking ./LAPACK/SRC/dorml2.f to dorml2.f
config.status: linking ./LAPACK/SRC/dormlq.f to dormlq.f
config.status: linking ./LAPACK/SRC/dormql.f to dormql.f
config.status: linking ./LAPACK/SRC/dormqr.f to dormqr.f
config.status: linking ./LAPACK/SRC/dormtr.f to dormtr.f
config.status: linking ./LAPACK/SRC/dorm2l.f to dorm2l.f
config.status: linking ./LAPACK/SRC/dpotf2.f to dpotf2.f
config.status: linking ./LAPACK/SRC/dpotrf.f to dpotrf.f
config.status: linking ./LAPACK/SRC/dpotrs.f to dpotrs.f
config.status: linking ./LAPACK/SRC/dppsv.f to dppsv.f
config.status: linking ./LAPACK/SRC/dpptrf.f to dpptrf.f
config.status: linking ./LAPACK/SRC/dpptrs.f to dpptrs.f
config.status: linking ./LAPACK/SRC/dstebz.f to dstebz.f
config.status: linking ./LAPACK/SRC/dstein.f to dstein.f
config.status: linking ./LAPACK/SRC/dstemr.f to dstemr.f
config.status: linking ./LAPACK/SRC/dsteqr.f to dsteqr.f
config.status: linking ./LAPACK/SRC/dsterf.f to dsterf.f
config.status: linking ./LAPACK/SRC/dsyev.f to dsyev.f
config.status: linking ./LAPACK/SRC/dsyevr.f to dsyevr.f
config.status: linking ./LAPACK/SRC/dsyevx.f to dsyevx.f
config.status: linking ./LAPACK/SRC/dsytd2.f to dsytd2.f
config.status: linking ./LAPACK/SRC/dsytf2.f to dsytf2.f
config.status: linking ./LAPACK/SRC/dsytrd.f to dsytrd.f
config.status: linking ./LAPACK/SRC/dsytrf.f to dsytrf.f
config.status: linking ./LAPACK/SRC/dsytri.f to dsytri.f
config.status: linking ./LAPACK/SRC/dtgevc.f to dtgevc.f
config.status: linking ./LAPACK/SRC/dtrevc.f to dtrevc.f
config.status: linking ./LAPACK/SRC/dtrexc.f to dtrexc.f
config.status: linking ./LAPACK/SRC/dtrti2.f to dtrti2.f
config.status: linking ./LAPACK/SRC/dtrtri.f to dtrtri.f
config.status: linking ./LAPACK/SRC/dtrtrs.f to dtrtrs.f
config.status: linking ./LAPACK/SRC/ieeeck.f to ieeeck.f
config.status: linking ./LAPACK/SRC/iladlc.f to iladlc.f
config.status: linking ./LAPACK/SRC/iladlr.f to iladlr.f
config.status: linking ./LAPACK/SRC/ilaenv.f to ilaenv.f
config.status: linking ./LAPACK/SRC/iparmq.f to iparmq.f
config.status: linking ./LAPACK/SRC/sgetf2.f to sgetf2.f
config.status: linking ./LAPACK/SRC/sgetrf.f to sgetrf.f
config.status: linking ./LAPACK/SRC/slaswp.f to slaswp.f
config.status: linking ./LAPACK/SRC/zgetf2.f to zgetf2.f
config.status: linking ./LAPACK/SRC/zgetrf.f to zgetrf.f
config.status: linking ./LAPACK/SRC/zlacgv.f to zlacgv.f
config.status: linking ./LAPACK/SRC/zlacpy.f to zlacpy.f
config.status: linking ./LAPACK/SRC/zlaev2.f to zlaev2.f
config.status: linking ./LAPACK/SRC/zlaswp.f to zlaswp.f
config.status: linking ./LAPACK/SRC/zpotf2.f to zpotf2.f
config.status: linking ./LAPACK/SRC/zrot.f to zrot.f
config.status: linking ./LAPACK/SRC/zsymv.f to zsymv.f
config.status: linking ./LAPACK/SRC/zsyr.f to zsyr.f
config.status: linking ./LAPACK/SRC/zsytri.f to zsytri.f
config.status: linking ./LAPACK/INSTALL/dlamch.f to dlamch.f
config.status: linking ./LAPACK/INSTALL/slamch.f to slamch.f
config.status: executing depfiles commands
configure: In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting
configure: Configuration of ThirdPartyLapack successful
configure: configuring in Ipopt
configure: running /bin/sh './configure' --prefix=/home/supin/IPOPTDIR --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-cygwin
checking for svnversion... yes
checking whether we want to compile in debug mode... no
checking for egrep... grep -E
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
configure: C compiler options are: -O3 -pipe -DNDEBUG -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether C++ compiler g++ works... yes
configure: C++ compiler options are: -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD
configure: Assuming that CXXLIBS is "-lstdc++ -lm".
configure: Trying to determine Fortran compiler name
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
configure: Fortran compiler options are: -O3 -pipe
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran... -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0 -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib-L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../.. -lgfortran -lgcc_s -lquadmath -lm -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32
configure: Corrected Fortran libraries: -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0 -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../x86_64-pc-cygwin/lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../.. -lgfortran -lquadmath -lm -ladvapi32 -lshell32 -luser32 -lkernel32
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking dependency style of gcc... none
checking dependency style of g++... none
checking whether to enable maintainer-specific portions of Makefiles... no
configure: Using libtool script in directory ../..
checking if library version is set... no
configure: configuring doxygen documentation options
checking for doxygen... no
checking for latex... no
checking for dot... NO
checking for pkg-config... pkg-config
checking pkg-config is at least version 0.16.0... yes
checking whether -lblas has BLAS... no
checking for COIN-OR package Blas... yes: 1.4
checking whether LAPACK is already available with BLAS library... no
checking whether -llapack has LAPACK... no
checking for COIN-OR package Lapack... yes: 1.5
checking for COIN-OR package ASL... yes: 1.4
checking for COIN-OR package HSL... not given: No package 'coinhsl' found
checking for COIN-OR package Mumps... not given: No package 'coinmumps' found
checking for int *... yes
checking size of int *... 8
configure: Using CXXAR="ar cru".
checking cmath usability... yes
checking cmath presence... yes
checking for cmath... yes
checking cctype usability... yes
checking cctype presence... yes
checking for cctype... yes
checking cassert usability... yes
checking cassert presence... yes
checking for cassert... yes
checking cstdio usability... yes
checking cstdio presence... yes
checking for cstdio... yes
checking cstdlib usability... yes
checking cstdlib presence... yes
checking for cstdlib... yes
checking cstdarg usability... yes
checking cstdarg presence... yes
checking for cstdarg... yes
checking cstring usability... yes
checking cstring presence... yes
checking for cstring... yes
checking cfloat usability... yes
checking cfloat presence... yes
checking for cfloat... yes
checking ctime usability... yes
checking ctime presence... yes
checking for ctime... yes
checking cstddef usability... yes
checking cstddef presence... yes
checking for cstddef... yes
checking for cmath... (cached) yes
checking for cfloat... (cached) yes
checking cieeefp usability... no
checking cieeefp presence... no
checking for cieeefp... no
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking whether isfinite is declared... no
checking whether finite is declared... yes
checking whether va_copy is declared... yes
checking whether drand48 is declared... yes
checking whether rand is declared... yes
checking whether srand is declared... yes
checking for mkl_get_version_string... no
checking for MPI_Initialized... no
checking whether this is a VPATH configuration... no
checking for matlab installation... /cygdrive/c/Software Installation/Matlab install
checking for Matlab executable extension (MEXSUFFIX)... ./configure: line 37237: dos2unix: command not found
▒▒▒▒▒▒ͼд▒▒Ĺܵ▒▒▒▒▒▒ڡ▒

checking whether the linear solver loader should be compiled... yes
checking windows.h usability... yes
checking windows.h presence... yes
checking for windows.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen in -ldl... yes
configure: Removing flag -pedantic-errors from CFLAGS
checking for snprintf... yes
checking for vsnprintf... yes
checking which command should be used to link input files... ln -s
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Common/Makefile
config.status: creating src/LinAlg/Makefile
config.status: creating src/LinAlg/TMatrices/Makefile
config.status: creating src/Interfaces/Makefile
config.status: creating src/Algorithm/Makefile
config.status: creating src/Algorithm/LinearSolvers/Makefile
config.status: creating src/Algorithm/Inexact/Makefile
config.status: creating src/contrib/CGPenalty/Makefile
config.status: creating src/contrib/LinearSolverLoader/Makefile
config.status: creating src/Apps/Makefile
config.status: creating src/Apps/AmplSolver/Makefile
config.status: creating src/Apps/CUTErInterface/Makefile
config.status: creating examples/hs071_f/Makefile
config.status: creating examples/hs071_f/hs071_f.f
config.status: creating examples/Cpp_example/Makefile
config.status: creating examples/hs071_cpp/Makefile
config.status: creating examples/hs071_c/Makefile
config.status: creating examples/ScalableProblems/Makefile
config.status: creating tutorial/CodingExercise/C/1-skeleton/Makefile
config.status: creating tutorial/CodingExercise/C/2-mistake/Makefile
config.status: creating tutorial/CodingExercise/C/3-solution/Makefile
config.status: creating tutorial/CodingExercise/Cpp/1-skeleton/Makefile
config.status: creating tutorial/CodingExercise/Cpp/2-mistake/Makefile
config.status: creating tutorial/CodingExercise/Cpp/3-solution/Makefile
config.status: creating tutorial/CodingExercise/Matlab/1-skeleton/startup.m
config.status: creating tutorial/CodingExercise/Matlab/2-mistake/startup.m
config.status: creating tutorial/CodingExercise/Matlab/3-solution/startup.m
config.status: creating tutorial/CodingExercise/Fortran/1-skeleton/TutorialFortran.f
config.status: creating tutorial/CodingExercise/Fortran/2-mistake/TutorialFortran.f
config.status: creating tutorial/CodingExercise/Fortran/3-solution/TutorialFortran.f
config.status: creating tutorial/CodingExercise/Fortran/1-skeleton/Makefile
config.status: creating tutorial/CodingExercise/Fortran/2-mistake/Makefile
config.status: creating tutorial/CodingExercise/Fortran/3-solution/Makefile
config.status: creating test/Makefile
config.status: creating test/run_unitTests
config.status: creating contrib/MatlabInterface/src/Makefile
config.status: creating contrib/MatlabInterface/examples/startup.m
config.status: creating contrib/JavaInterface/Makefile
config.status: creating contrib/sIPOPT/Makefile
config.status: creating contrib/sIPOPT/AmplSolver/Makefile
config.status: creating contrib/sIPOPT/examples/parametric_cpp/Makefile
config.status: creating contrib/sIPOPT/examples/parametric_dsdp_cpp/Makefile
config.status: creating contrib/sIPOPT/examples/redhess_cpp/Makefile
config.status: creating contrib/sIPOPT/src/Makefile
config.status: creating ipopt.pc
config.status: creating ipopt-uninstalled.pc
config.status: creating doxydoc/doxygen.conf
config.status: creating contrib/RInterface/src/Makevars.win
config.status: creating ipoptamplinterface.pc
config.status: creating ipoptamplinterface-uninstalled.pc
config.status: creating src/Common/config.h
config.status: creating src/Common/config_ipopt.h
config.status: creating examples/ScalableProblems/config.h
config.status: linking ./examples/hs071_cpp/hs071_main.cpp to test/hs071_main.cpp
config.status: linking ./examples/hs071_cpp/hs071_nlp.cpp to test/hs071_nlp.cpp
config.status: linking ./examples/hs071_cpp/hs071_nlp.hpp to test/hs071_nlp.hpp
config.status: linking ./examples/hs071_c/hs071_c.c to test/hs071_c.c
config.status: executing depfiles commands
configure: In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting
configure: Configuration of Ipopt successful
configure: In case of trouble, first consult the troubleshooting page at https://projects.coin-or.org/BuildTools/wiki/user-troubleshooting
configure: Main configuration of Ipopt successful

However, the make install doesn't work at all,

supin@LAPTOP-82CHIOG0 ~/IPOPTDIR
$ make install

supin@LAPTOP-82CHIOG0 ~/IPOPTDIR
$

Segfault in recurseKnn() . Does it run out of stack space?

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3302b8d in unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::recurseKnn<false, false>(double const*, unsigned int, double, Nabo::IndexHeapBruteForceVector<int, double>&, std::vector<double, std::allocator<double> >&, double, double) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so
(gdb) bt
#0  0x00007ffff3302b8d in unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::recurseKnn<false, false>(double const*, unsigned int, double, Nabo::IndexHeapBruteForceVector<int, double>&, std::vector<double, std::allocator<double> >&, double, double) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so
#1  0x00007ffff3302cbf in unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::recurseKnn<false, false>(double const*, unsigned int, double, Nabo::IndexHeapBruteForceVector<int, double>&, std::vector<double, std::allocator<double> >&, double, double) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so
#2  0x00007ffff3302cbf in unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::recurseKnn<false, false>(double const*, unsigned int, double, Nabo::IndexHeapBruteForceVector<int, double>&, std::vector<double, std::allocator<double> >&, double, double) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so
#3  0x00007ffff3302cbf in unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::recurseKnn<false, false>(double const*, unsigned int, double, Nabo::IndexHeapBruteForceVector<int, double>&, std::vector<double, std::allocator<double> >&, double, double) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so

[...]

#54 0x00007ffff3302aa4 in unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::recurseKnn<false, false>(double const*, unsigned int, double, Nabo::IndexHeapBruteForceVector<int, double>&, std::vector<double, std::allocator<double> >&, double, double) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so
#55 0x00007ffff3302e89 in Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::onePointKnn(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1>&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&, int, Nabo::IndexHeapBruteForceVector<int, double>&, std::vector<double, std::allocator<double> >&, double, double, bool, bool, bool) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so
#56 0x00007ffff3303131 in Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<double, Nabo::IndexHeapBruteForceVector<int, double> >::knn(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1>&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&, int, double, unsigned int, double) const () from /home/titus/catkin_ws/devel/lib/libdescriptor_projection.so
#57 0x00007ffff5f7edd9 in structural_descriptors::RawNbld::RawNbld (this=0x7fffffffd200, mission=..., options=...)
    at /home/titus/catkin_ws/src/multiagent_mapping/vi-algorithms/structural-descriptors/src/raw-nbld.cc:45

This is querying 200 nearest neighbours with a query size of 10000 against 775835 in 3 dimensions. Error tolerance is 0.

Is there any possible a point set 'M' can include extra information?

Generally, it creates a kd-tree for a point set 'M', which only include coordinate infomation x, y, z. I notice that point set 'M' is a dynamic matrix, so I want to know if I can add some extra information in other rows of 'M', e.g. , first row for x, second row for y, third row for curvature and forth row for ..., and I mean when create and search a kd tree , it just uses the first two rows, and keep other infomation not lost, so I cam use other info conveniently.

Error when using cmake to build libnabo on win10

Hi, I meet some issue when I use cmake to compile this on win10, this is the error message:

(Link target) ->

invalid_matrix_types.obj : **error** LNK2019: unresolved external symbol "public: static struct Nabo::NearestNeighbourSearch<float,class Eigen::Matrix<float,-1,-1,0,-1,-1> > * __cdecl Nabo::NearestNeighbourSearch<float,class Eigen::Matrix<float,-1,-1,0,-1,-1> >::create(class Eigen::Matrix<float,-1,-1,0,-1,-1> const &,int,enum Nabo::NearestNeighbourSearch<float,class Eigen::Matrix<float,-1,-1,0,-1,-1> >::SearchType,unsigned int,struct Nabo::Parameters const &)" (?create@?$NearestNeighbourSearch@MV?$Matrix@M$0?0$0?0$0A@$0?0$0?0@Eigen@@@Nabo@@SAPEAU12@AEBV?$Matrix@M$0?0$0?0$0A@$0?0$0?0@Eigen@@HW4SearchType@12@IAEBUParameters@2@@Z) referenced in function "int __cdecl testFunction<class Eigen::Matrix<float,-1,-1,0,-1,-1> >(void)" (??$testFunction@V?$Matrix@M$0?0$0?0$0A@$0?0$0?0@Eigen@@@@YAHXZ) [C:\libnabo\build_libnabo_vs2017_x64\tests\CMakeFiles\CMakeTmp\cmTC_b6580.vcxproj]

C:\libnabo\build_libnabo_vs2017_x64\tests\CMakeFiles\CMakeTmp\Debug\cmTC_b6580.exe : fatal **error** LNK1120: 1 unresolved externals [C:\libnabo\build_libnabo_vs2017_x64\tests\CMakeFiles\CMakeTmp\cmTC_b6580.vcxproj]





  1 Warning(s)

  2 Error(s)

And this is my cmake setting:

capture

I plan on porting this SDK to CUDA 7.0 from the ancient OpenCL implementation. Few quick questions.

Are there any gotchas in the original implementation? I plan, at least initially, to make my port as similar as possible to the original code just to get it functioning first (Eg: No dynamic parallelism, and minimal shared memory.) Anything I should look out for?

I'll probably do this sometime next week and (hopefully) create a pull request before the end of the month.

I'd port it to a newer version of OpenCL, but no reason bothering until Vulkan comes out :P

cmake configuration error: compiling a test executable failed

I'm trying to install from source in ubuntu 16.04 but configuring using cmake fails with the following error:

OpenCL disabled, not looking for it

 ANN not found, disabling it in benchmarks

 FLANN not found, disabling it in benchmarks

 CMake Error at tests/CMakeLists.txt:95 (message):
   Compiling a test executable failed.
 Call Stack (most recent call first):
   tests/CMakeLists.txt:104 (try_compile_cloud_types)

Attached are the cmakecache and log files (log file renamed since uploading .log is not supported).
CMakeCache.txt

CMakeOutputlog.txt

Compiling on Mac fails with message "use of undeclared identifier 'CLOCK_REALTIME'"

In file included from ../nabo/kdtree_cpu.cpp:42:
In file included from /usr/local/include/boost/format.hpp:38:
In file included from /usr/local/include/boost/format/internals.hpp:20:
In file included from /usr/local/include/boost/optional.hpp:15:
/usr/local/include/boost/optional/optional.hpp:1276:3: warning: unused typedef 'boost_static_assert_typedef_1276' [-Wunused-local-typedef]
BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
^
/usr/local/include/boost/static_assert.hpp:36:48: note: expanded from macro 'BOOST_STATIC_ASSERT_MSG'

define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )

                                           ^

/usr/local/include/boost/static_assert.hpp:170:16: note: expanded from macro 'BOOST_STATIC_ASSERT'
BOOST_JOIN(boost_static_assert_typedef_, LINE) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE
^
/usr/local/include/boost/config/suffix.hpp:544:28: note: expanded from macro 'BOOST_JOIN'

define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )

                       ^

/usr/local/include/boost/config/suffix.hpp:545:31: note: expanded from macro 'BOOST_DO_JOIN'

define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)

                          ^

/usr/local/include/boost/config/suffix.hpp:546:32: note: expanded from macro 'BOOST_DO_JOIN2'

define BOOST_DO_JOIN2( X, Y ) X##Y

                           ^

:123:1: note: expanded from here
boost_static_assert_typedef_1276
^
4 warnings generated.
[ 31%] Building CXX object CMakeFiles/nabo.dir/nabo/kdtree_opencl.cpp.o
Linking CXX static library libnabo.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libnabo.a(kdtree_opencl.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libnabo.a(kdtree_opencl.cpp.o) has no symbols
[ 31%] Built target nabo
Scanning dependencies of target trivial
[ 37%] Building CXX object examples/CMakeFiles/trivial.dir/trivial.cpp.o
Linking CXX executable trivial
[ 37%] Built target trivial
Scanning dependencies of target usage
[ 43%] Building CXX object examples/CMakeFiles/usage.dir/usage.cpp.o
Linking CXX executable usage
[ 43%] Built target usage
Scanning dependencies of target knnbench
[ 50%] Building CXX object tests/CMakeFiles/knnbench.dir/knnbench.cpp.o
../../tests/knnbench.cpp:69:18: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &ts);
^
1 error generated.
make[2]: *** [tests/CMakeFiles/knnbench.dir/knnbench.cpp.o] Error 1
make[1]: *** [tests/CMakeFiles/knnbench.dir/all] Error 2
make: *** [all] Error 2

Error with CMake 2.8.11.2

On CMake 2.8.11.2 (Windows version). I received the following error:

CMake Error at CMakeLists.txt:93 (set_target_properties):
    set_target_properties called with incorrect number of arguments.

This seems to resolve the issue:

on https://github.com/ethz-asl/libnabo/blob/master/CMakeLists.txt#L93

Change to add quotes:

set_target_properties(${LIB_NAME} PROPERTIES VERSION "${PROJECT_VERSION}" SOVERSION 1)

Solution from : http://stackoverflow.com/questions/3221996/set-target-properties-called-with-incorrect-number-of-arguments

Python bindings

I am trying to use the python bindings of the library and run the simple example that is provided (libnabo/python/test.py). However, I cannot, since when the user defines the query point: q = np.array([[1.1, 2.]]) it there is a runtime error:
RuntimeError: Query has less dimensions (1) than requested for cloud (2)

I guess that has something to do with the dimension of the query point. If I transpose the query point I get a correct answer but does this make sense?:

res = nns.knn(q.transpose(), 2, 0, SearchOptionFlags.ALLOW_SELF_MATCH)
res
(array([[1, 0]], dtype=int32), array([[0.01, 2.21]]))

Can you please help advise on how to use the python bindings, or maybe update the example with a working one?
Many thanks in advance.

VS2017 can't find "Eigen/Core"

I'm using VS2017 and CMAKE has no problem, but when I try to compile the solution in Visual Studio, I get an error that VS can't find "Eigen/Core"

To give you some background, I've downloaded eigen-3.3.7. Inside eigen-3.3.7 there is a directory Eigen. Inside of that is another directory src along with a lot of files that don't have extensions. Inside the src directory are a bunch of directories including Core. Using the CMake GUI, I tried setting the Eigen_Include_Directory to C:/Users/dllau/Downloads/eigen-3.3.7 as well as C:/Users/dllau/Downloads/eigen-3.3.7/Eigen. Neither work.

Any suggestions?

Branch feature/min_time_filter

Hi all,

Is there a wish to merge the branch feature/min_time_filter? Would it be of interest to extend this with a second filter based on a maximum time / index condition?

Thanks,
Renaud

Cannot #include "nabo/nabo.h" after <winsock2.h>

For some reason, if I put the line
#include "nabo/nabo.h"
after
#include <winsock2.h>
or any other header files which, at some point, include winsock2.h, the compiler gives me a whole bunch of weird errors in nabo.h. Making sure #include "nabo/nabo.h" comes before any such files fixes the problem, but I thought I should bring up this strange bug.

Incorrect Indices reporting on matrix-wise search

Hello,
There seems to be a small bug in knn for matrix-type queries. Non-zero indices are reported even when dists2 returns 'inf'. See the code snippet and output below.
Best,
Tim

Code--------------------------------------------------

#include "nabo/nabo.h"
#include <Eigen/Core>
#include <iostream>

int main(int argc, char** argv)
{
    Eigen::MatrixXd M = Eigen::MatrixXd::Random(3, 10);
    /*Eigen::MatrixXd M(3,10);
    M.setOnes();
    M(0,0) = 0.1;
    M(0,1) = 0.1;
    M(0,2) = 0.1;*/

    Nabo::NNSearchD* nns = Nabo::NNSearchD::createKDTreeLinearHeap(M);

    Eigen::MatrixXd dists2(5,10);
    Eigen::MatrixXi indices(5,10);
    nns->knn(M, indices, dists2, 5, 0, 0, 1.0);

    std::cout << "Points:" << std::endl;
    std::cout << M << std::endl;
    std::cout << "Indices:" << std::endl;
    std::cout << indices << std::endl;
    std::cout << "Dists:" << std::endl;
    std::cout << dists2 << std::endl;
}

Output----------------------------------------

Points:
  0.680375    0.59688  -0.329554    0.10794  -0.270431    0.83239  -0.716795  -0.514226  -0.686642  -0.782382
 -0.211234   0.823295   0.536459 -0.0452059  0.0268018   0.271423   0.213938  -0.725537  -0.198111   0.997849
  0.566198  -0.604897  -0.444451   0.257742   0.904459   0.434594  -0.967399   0.608354  -0.740419  -0.563486
Indices:
5 2 9 0 3 0 8 4 6 2
3 5 6 4 7 3 2 3 2 6
0 3 8 5 0 3 9 8 4 6
0 0 1 7 4 7 0 2 3 2
0 0 2 9 5 0 3 9 8 4
Dists:
0.273387 0.966299 0.432103 0.450393 0.566593 0.273387 0.222213 0.713128 0.222213 0.432103
0.450393      inf  0.52745 0.566593 0.713128 0.656359  0.52745  0.97287 0.754702 0.781964
     inf      inf 0.754702 0.656359      inf      inf 0.781964      inf      inf      inf
     inf      inf 0.966299  0.97287      inf      inf      inf      inf      inf      inf
     inf      inf      inf      inf      inf      inf      inf      inf      inf      inf

CMake Error: Internal CMake error, TryCompile configure of cmake failed

Hello,
I want to compile libnabo. I have used VS 2010 in win32. When I run CMake I have this error

The C compiler identification is MSVC 16.0.40219.1
The CXX compiler identification is MSVC 16.0.40219.1
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/cl.exe
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Boost version: 1.49.0
CMake Warning (dev) at C:/Users/ACER/Downloads/cmake-3.7.1-win32-x86/cmake-3.7.1-win32-x86/share/cmake-3.7/Modules/FindOpenMP.cmake:179 (if):
if given arguments:

"TRUE"

An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
C:/Users/ACER/Downloads/cmake-3.7.1-win32-x86/cmake-3.7.1-win32-x86/share/cmake-3.7/Modules/FindOpenMP.cmake:224 (_OPENMP_GET_SPEC_DATE)
CMakeLists.txt:54 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/Users/ACER/Downloads/cmake-3.7.1-win32-x86/cmake-3.7.1-win32-x86/share/cmake-3.7/Modules/FindOpenMP.cmake:179 (if):
if given arguments:

"TRUE"

An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
C:/Users/ACER/Downloads/cmake-3.7.1-win32-x86/cmake-3.7.1-win32-x86/share/cmake-3.7/Modules/FindOpenMP.cmake:266 (_OPENMP_GET_SPEC_DATE)
CMakeLists.txt:54 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

OpenCL disabled, not looking for it
ANN not found, disabling it in benchmarks
FLANN not found, disabling it in benchmarks
CMake Error at D:/Project/build/tests/CMakeFiles/CMakeTmp/CMakeLists.txt:11 (add_definitions):
Syntax error in cmake code at

D:/Project/build/tests/CMakeFiles/CMakeTmp/CMakeLists.txt:11

when parsing string

-IC:\Program

Invalid character escape '\P'.

CMake Error at D:/Project/build/tests/CMakeFiles/CMakeTmp/CMakeLists.txt:11 (add_definitions):
Syntax error in cmake code at

D:/Project/build/tests/CMakeFiles/CMakeTmp/CMakeLists.txt:11

when parsing string

Files\Eigen

Invalid character escape '\E'.

CMake Error: Internal CMake error, TryCompile configure of cmake failed
Configuring incomplete, errors occurred!
See also "D:/Project/build/CMakeFiles/CMakeOutput.log".

there is any one who can help me
thank you

compiling on Windows 10 using Visual Studio 2015 fails...

Hi, When I cmake appear this error:

OpenCL disabled, not looking for it
ANN not found, disabling it in benchmarks
FLANN not found, disabling it in benchmarks
CMake Error at tests/CMakeLists.txt:95 (message):
Compiling a test executable failed.
Call Stack (most recent call first):
tests/CMakeLists.txt:104 (try_compile_cloud_types)

What should I do? Thank you!

cmake Compiling test executable failed (omp)

Hi, I'm getting an error from cmake when trying to install libnabo on OS X Yosemite that looks to me like cmake isn't finding openmp libraries on my system. I can build and run an omp test program that runs fine on my system using:
g++ -fopenmp openmp_test.cpp -o openmp_test

I use macports to manage packages, but I uninstalled the macports cmake install and installed it with homebrew with no change. Thanks for any help you can give me.

CMakeError.log.txt

Tried to build source code but encountered error

Hi, Due to some reason I tried to add the source code in /nabo folder to my project and build it, but I encountered the error:

..\nabo\kdtree_cpu.cpp(447): error C2326: 'unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<T,Heap,CloudType>::recurseKnn(const T *,const unsigned int,T,Heap &,std::vector<T,std::allocator<_Ty>> &,const T,const T) const': function cannot access 'Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<T,Heap,CloudType>::dim'

I added the:
third_party
--any.hpp
brute_force_cpu.cpp
index_heap.h
kdtree_cpu.cpp
nabo.cpp
nabo.h
nabo_private.h

Compile error on windows 10 using VS 2010

I compiled the libnabo follow the instructions. And errors occured as following:

Error in Cmake:
CMake Error at tests/CMakeLists.txt:95 (message):
Compiling a test executable failed.
Call Stack (most recent call first):
tests/CMakeLists.txt:105 (try_compile_cloud_types)

*I read about the error log, and I found the error that "unistd.h" can't be found. *
CheckSymbolExists.c(2): fatal error C1083: 无法打开包括文件:“unistd.h”: No such file or directory [D:\libnabo\build\CMakeFiles\CMakeTmp\cmTC_f5390.vcxproj]

File D:/libnabo/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */

include <unistd.h>

include <time.h>

int main(int argc, char** argv)
{
(void)argv;

ifndef _POSIX_TIMERS

return ((int*)(&_POSIX_TIMERS))[argc];

else

(void)argc;
return 0;

endif

}

Fail on matrices with ~32768 or more floats, and issues with const row matrices.

I get a segfault when attempting to do a knn search on an Eigen float matrix with 3 rows and more than 10920 columns. Interestingly, that works out to close to 2^15 floats.

I compiled a minimum test program, included below, and the gdb output. In short, it runs fine with a 3 x 10920 matrix, and segfaults on a 3 x 10921 matrix

Here's the code:

#include <iostream>
#include <Eigen/Core>
#include <nabo/nabo.h>

// OK:    `./test_nns 10920`
// FAIL:  `./test_nns 10921`
int main(int argc, char* argv[]) {
  const int n_points = atoi(argv[1]);
  const int point_idx = 10;
  const int k_nearest_neighbors = 1;

  std::cout << "Building matrix with " << n_points << " points. " << std::endl;
  Eigen::Matrix<float, 3, Eigen::Dynamic> points = 
      Eigen::MatrixXf::Random(3, n_points);
  const Eigen::Matrix<float, 3, 1>& point = points.col(point_idx);

  // Find the nearest neighbors.
  Nabo::NNSearchF* nns = Nabo::NNSearchF::createKDTreeLinearHeap(points);
  Eigen::VectorXi nn_indices(k_nearest_neighbors);
  Eigen::VectorXf nn_distances_sq(k_nearest_neighbors);
  nns->knn(point, nn_indices, nn_distances_sq, k_nearest_neighbors);
  std::cout << "neighbor: " << nn_indices(0) << std::endl;

  delete nns;
  return 0;
}

Here's the gdb output:

gdb test_nns
GNU gdb (GDB) 7.6.1-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/idryanov/work/Tango/redwood_ws/devel_linux/bin/test_nns...(no debugging symbols found)...done.
(gdb) run 10920
Starting program: /home/idryanov/work/Tango/redwood_ws/devel_linux/bin/test_nns 10920
Building matrix with 10920 points. 
neighbor: 2835
[Inferior 1 (process 9530) exited normally]
(gdb) run 10921
Starting program: /home/idryanov/work/Tango/redwood_ws/devel_linux/bin/test_nns 10921
Building matrix with 10921 points. 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bc9aed in unsigned long Nabo::KDTreeUnbalancedPtInLeavesImplicitBoundsStackOpt<float, Nabo::IndexHeapBruteForceVector<int, float> >::recurseKnn<false, false>(float const*, unsigned int, float, Nabo::IndexHeapBruteForceVector<int, float>&, std::vector<float, std::allocator<float> >&, float, float) const () from /home/idryanov/work/Tango/redwood_ws/devel_linux/lib/libnabo.so.1
(gdb) 

Compilation Error - OpenMP / External Source File

Hello it seemed like everything installed correctly, but when I try to compile the "trivial.cpp" file, I get the following undefined reference errors:

/tmp/ccx3BoPz.o: In function main': nn.cpp:(.text+0x83): undefined reference toNabo::NearestNeighbourSearch::createKDTreeLinearHeap(Eigen::Matrix const&, int, unsigned int, Nabo::Parameters const&)'

nn.cpp:(.text+0x10d): undefined reference to `Nabo::NearestNeighbourSearch::knn(Eigen::Matrix const&, Eigen::Matrix&, Eigen::Matrix&, int, float, unsigned int, float) const'

Can you encountered this bug before?

I already had Eigen and Boost installed, so I do not know what else is required

Statistics are disable for KDTree

Most probably we should add a compile-time option to enable statistics or not. The problem is that currently the thread-safe version of the statistics depends on atomic add, which is a C++0x feature not available in MSVC 2010.

OpenCL disabled

In the Master. Why? If i forcefully enable it I get some errors like this:
F:\Sources\libnabo\nabo\nabo.cpp: In instantiation of 'static Nabo::NearestNeigh
bourSearch* Nabo::NearestNeighbourSearch::create(const Matrix&, Nabo::Near
estNeighbourSearch::Index, Nabo::NearestNeighbourSearch::SearchType, unsig
ned int, const Nabo::Parameters&) [with T = float; Nabo::NearestNeighbourSearch<
T>::Matrix = Eigen::Matrix<float, -1, -1>; Nabo::NearestNeighbourSearch::Inde
x = int]':
F:\Sources\libnabo\nabo\nabo.cpp:162:18: required from here
F:\Sources\libnabo\nabo\nabo.cpp:126:132: error: cannot allocate an object of ab
stract type 'Nabo::KDTreeBalancedPtInNodesStackOpenCL'
case KDTREE_CL_PT_IN_NODES: return new KDTreeBalancedPtInNodesStackOpenCL
(cloud, dim, creationOptionFlags, CL_DEVICE_TYPE_GPU);

                                                ^

In file included from F:\Sources\libnabo\nabo\nabo.cpp:33:0:
F:\Sources\libnabo\nabo\nabo_private.h:351:9: note: because the following virt
ual functions are pure within 'Nabo::KDTreeBalancedPtInNodesStackOpenCL':

struct KDTreeBalancedPtInNodesStackOpenCL: public OpenCLSearch
^
In file included from F:\Sources\libnabo\nabo\nabo.cpp:32:0:
F:\Sources\libnabo\nabo\nabo.h:331:25: note: long unsigned int Nabo::NearestN
eighbourSearch::knn(const Matrix&, Nabo::NearestNeighbourSearch::IndexMatr
ix&, Nabo::NearestNeighbourSearch::Matrix&, const Vector&, Nabo::NearestNeigh
bourSearch::Index, T, unsigned int) const [with T = float; Nabo::NearestNeigh
bourSearch::Matrix = Eigen::Matrix<float, -1, -1>; Nabo::NearestNeighbourSear
ch::IndexMatrix = Eigen::Matrix<int, -1, -1>; Nabo::NearestNeighbourSearch
::Vector = Eigen::Matrix<float, -1, 1>; Nabo::NearestNeighbourSearch::Index =
int]
virtual unsigned long knn(const Matrix& query, IndexMatrix& indices, Matrix&
dists2, const Vector& maxRadii, const Index k = 1, const T epsilon = 0, const un
signed optionFlags = 0) const = 0;
^
F:\Sources\libnabo\nabo\nabo.cpp:127:134: error: cannot allocate an object of ab
stract type 'Nabo::KDTreeBalancedPtInLeavesStackOpenCL'
case KDTREE_CL_PT_IN_LEAVES: return new KDTreeBalancedPtInLeavesStackOpenCL<
T>(cloud, dim, creationOptionFlags, CL_DEVICE_TYPE_GPU);

I cannot make doc.

After I finished install the lib, I could not generate doc files by typing 'make doc'.

MinGW: Do not include gomp

Steps to reproduce:

Build on a MinGW platform

What should happen:

Build successful.

What happens instead:

Fails due to dependency on GOMP/libgomp.

Notes:

MinGW is unusual in that it is both a GCC platform and a Windows platform. Unlike other GCC platforms, it is not guaranteed that GOMP is installed (afaik no MinGW installation currently includes GOMP).

Thus the CMake logic to include GOMP should be something like:

if (platform == GCC) and (platform != MinGW):
    include gomp

Workaround:

lofidevops@1e13351

Edit CMake files so that gomp is never included. This is obviously not a long-term solution.

Linker errors

I get linker errors while trying to use libnabo (inside a ros node) - when I compile (in Ubuntu) from catkin_ws the linker throws an error:

undefined reference to `Nabo::NearestNeighbourSearch<float, Eigen::Matrix<float, -1, -1, 0, -1, -1> >::createKDTreeLinearHeap(Eigen::Matrix<float, -1, -1, 0, -1, -1> const&, int, unsigned int, Nabo::Parameters const&)'

undefined reference to `Nabo::NearestNeighbourSearch<float, Eigen::Matrix<float, -1, -1, 0, -1, -1> >::knn(Eigen::Matrix<float, -1, 1, 0, -1, 1> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1>&, Eigen::Matrix<float, -1, 1, 0, -1, 1>&, int, float, unsigned int, float) const'
collect2: error: ld returned 1 exit status

I had built from source using the master branch ...

Is OpenCL support finished?

NearestNeighbourSearch has two version of knn:
virtual unsigned long knn(const Matrix& query, IndexMatrix& indices, Matrix& dists2, const Index k = 1, const T epsilon = 0, const unsigned optionFlags = 0, const T maxRadius = std::numeric_limits<T>::infinity()) const = 0;
and
virtual unsigned long knn(const Matrix& query, IndexMatrix& indices, Matrix& dists2, const Vector& maxRadii, const Index k = 1, const T epsilon = 0, const unsigned optionFlags = 0) const = 0;

But it seem that OpenCL version only implemented the first one. It leads that I even can not compile the example file examples/trival.cpp.

Requesting more points than available in cloud

I'm getting the following spurious error when trying to use nabo:

terminate called after throwing an instance of 'std::runtime_error' what(): Requesting more points (1) than available in cloud (-4648799420485068736)

I'm effectively trying to (iteratively) perform a knn query within a class method, via a KD Tree that I have generated within the constructor for the class. The cloud that is being used to generate the KD tree is valid for the lifetime of the class; the point query matrix is also valid for the call to knn (I'm printing both of these out prior to check; they are a finite size, with valid values). Has anyone come across this before, or am I using nabo incorrectly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.