Open yurivict opened 6 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
I run
cmake -DBUILD_BENCHMARKS=ON
, thenninja all
, thenninja benchmarks
.OS: FreeBSD 11.2