PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.89k stars 4.61k forks source link

Undefined reference to LZ4_decompress_fast, LZ4_compressHC #804

Closed translunar closed 5 years ago

translunar commented 10 years ago

I'm building on a Linux machine and getting the following errors:

[ 80%] Built target pcl_add_gaussian_noise
Linking CXX executable ../bin/pcl_boundary_estimation
../lib/libpcl_kdtree.so.1.7.2: undefined reference to `LZ4_decompress_fast'
../lib/libpcl_kdtree.so.1.7.2: undefined reference to `LZ4_compressHC'
collect2: ld returned 1 exit status
make[2]: *** [bin/pcl_boundary_estimation] Error 1
make[1]: *** [tools/CMakeFiles/pcl_boundary_estimation.dir/all] Error 2
make: *** [all] Error 2

I don't see anywhere in the CMakeCache.txt to set the LZ4 directory. I also don't see what in FLANN, but I assume this is a problem with PCL based on where the error is showing up.

charlesritchea commented 4 years ago

@taketwo I've been trying to read along, but I need to get this to work on Ubuntu 16.04. It's stuck with pcl 1.7, is there a workaround for this on that system, or do I need to download a later version and build from scratch?

kunaltyagi commented 4 years ago

download a later version and build from scratch?

Yes. Please note that 16.04 is going EOL soon. I'd recommend shifting to a newer LTS (eg: 18.04 (most support) or 20.04 (latest))

promistrio commented 1 year ago

Ubuntu 20.04 PCL 1.13 the same error

/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_decompress_safe_continue'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_decompress_safe'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_compress_HC_continue'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_resetStreamHC'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_setStreamDecode'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/CMakeFiles/pcl_compute_cloud_error.dir/build.make:98: bin/pcl_compute_cloud_error] Error 1
make[1]: *** [CMakeFiles/Makefile2:2860: tools/CMakeFiles/pcl_compute_cloud_error.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
larshg commented 1 year ago

Ubuntu 20.04 PCL 1.13 the same error

/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_decompress_safe_continue'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_decompress_safe'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_compress_HC_continue'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_resetStreamHC'
/usr/bin/ld: ../lib/libpcl_kdtree.so.1.13.0.99: undefined reference to `LZ4_setStreamDecode'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/CMakeFiles/pcl_compute_cloud_error.dir/build.make:98: bin/pcl_compute_cloud_error] Error 1
make[1]: *** [CMakeFiles/Makefile2:2860: tools/CMakeFiles/pcl_compute_cloud_error.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Please open a new issue with all details about how you installed pcl / compiled it yourself etc.