jlblancoc / nanoflann

nanoflann: a C++11 header-only library for Nearest Neighbor (NN) search with KD-trees
Other
2.26k stars 491 forks source link

The benchmarks target fails: libfastann.so, needed by 'bin/benchmark_fastann_real', missing #100

Open yurivict opened 6 years ago

yurivict commented 6 years ago

I run cmake -DBUILD_BENCHMARKS=ON, then ninja all, then ninja benchmarks.

-- Build files have been written to: /usr/ports/math/nanoflann/work/.build
ninja: error: '/usr/ports/math/nanoflann/work/nanoflann-1.3.0/build/fastann-prefix/src/fastann-build/libfastann.so', needed by 'bin/benchmark_fastann_real', missing and no known rule to make it

OS: FreeBSD 11.2

andreivirtosu commented 5 years ago

+1 same error on ubuntu 18.04 when using ninja

With just cmake .. && make I get linker errors:

[ 72%] Linking CXX executable benchmark_flann_real
CMakeFiles/benchmark_flann_real.dir/benchmark_flann_real.cpp.o: In function `flann::serialization::SaveArchive::initBlock()':
benchmark_flann_real.cpp:(.text._ZN5flann13serialization11SaveArchive9initBlockEv[_ZN5flann13serialization11SaveArchive9initBlockEv]+0x47): undefined reference to `LZ4_resetStreamHC'
CMakeFiles/benchmark_flann_real.dir/benchmark_flann_real.cpp.o: In function `flann::serialization::SaveArchive::flushBlock()':
benchmark_flann_real.cpp:(.text._ZN5flann13serialization11SaveArchive10flushBlockEv[_ZN5flann13serialization11SaveArchive10flushBlockEv]+0x4f): undefined reference to `LZ4_compress_HC_continue'
benchmark_flann_real.cpp:(.text._ZN5flann13serialization11SaveArchive10flushBlockEv[_ZN5flann13serialization11SaveArchive10flushBlockEv]+0xec): undefined reference to `LZ4_compress_HC_continue'
CMakeFiles/benchmark_flann_real.dir/benchmark_flann_real.cpp.o: In function `flann::serialization::LoadArchive::decompressAndLoadV10(_IO_FILE*)':
benchmark_flann_real.cpp:(.text._ZN5flann13serialization11LoadArchive20decompressAndLoadV10EP8_IO_FILE[_ZN5flann13serialization11LoadArchive20decompressAndLoadV10EP8_IO_FILE]+0xd0): undefined reference to `LZ4_d
ecompress_safe'
CMakeFiles/benchmark_flann_real.dir/benchmark_flann_real.cpp.o: In function `flann::serialization::LoadArchive::loadBlock(char*, unsigned long, _IO_FILE*)':
benchmark_flann_real.cpp:(.text._ZN5flann13serialization11LoadArchive9loadBlockEPcmP8_IO_FILE[_ZN5flann13serialization11LoadArchive9loadBlockEPcmP8_IO_FILE]+0x45): undefined reference to `LZ4_decompress_safe_con
tinue'
CMakeFiles/benchmark_flann_real.dir/benchmark_flann_real.cpp.o: In function `flann::serialization::LoadArchive::initBlock(_IO_FILE*)':
benchmark_flann_real.cpp:(.text._ZN5flann13serialization11LoadArchive9initBlockEP8_IO_FILE[_ZN5flann13serialization11LoadArchive9initBlockEP8_IO_FILE]+0xbd): undefined reference to `LZ4_setStreamDecode'
collect2: error: ld returned 1 exit status
benchmarkTool/realTests/CMakeFiles/benchmark_flann_real.dir/build.make:95: recipe for target 'benchmarkTool/realTests/benchmark_flann_real' failed
make[2]: *** [benchmarkTool/realTests/benchmark_flann_real] Error 1
CMakeFiles/Makefile2:661: recipe for target 'benchmarkTool/realTests/CMakeFiles/benchmark_flann_real.dir/all' failed
make[1]: *** [benchmarkTool/realTests/CMakeFiles/benchmark_flann_real.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2