-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[compile error] find_package(PCL) finds some but not all boost libraries #5052
Comments
Can you try to build a tutorial, let's say this one, to make sure this problem is not related to ROS? |
I have tested using that tutorial, and get the exact same error, same boost debug, same boost libraries not found. In fact, a completely empty project with CMakeLists.txt having only the line
The only idea I have is around the fact that /opt/ros/melodic/lib is in the Boost_DEBUG listing above, not sure how that affects things. |
Seems to me that boost 1.65.1 is too new for pcl 1.8.1 see: |
The version of PCLConfig.cmake I have from the Ubuntu repo with pcl 1.8.1 has "1.65.1" "1.65" on line 93: |
I think FindBoost is looking for Boost in the /opt/ros/melodic/lib/ folder for the Boost libraries for some reason, even when I tell cmake that BOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu |
Indeed it does state that in the output you provided: But as you write, |
I guess you would have to investigate what goes on in FindBoost in the cmake 3.10 module to figure out why it goes to the ros variables. |
Thanks. It seems Boost_LIBRARY_SEARCH_DIRS_RELEASE/DEBUG are being set to /opt/ros/melodic/lib, even with BOOST_LIBRARYDIR being set and also with Boost_NO_SYSTEM_PATHS=ON For anyone else encountering this, manually setting |
|
Is there any update on the issue, any workaround 🤔? |
I just build boost and PCL from source code https://github.com/boostorg/boost?tab=readme-ov-file Then when you call
|
Describe the error
PCL does not find boost libraries when including PCL in a project.
libpcl-dev (v1.8.1) and libboost-all-dev (v1.65.1) are installed.
This was tested on a clean install of Ubuntu 18.04.
To Reproduce
Try to compile a CMake project with PCL as a requirement:
find_package(PCL REQUIRED)
Build information
cmake correctly uses BOOST_INCLUDEDIR = /usr/include
I have also tried giving cmake the correct location of the Boost libraries, using -DBOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu, but this has not fixed the issue.
After editing the PCL cmake to force the components to be required, I get the following output
I can confirm that /usr/include contains the folders: boost/thread, boost/date_time, boost/iostreams and boost/serialization.
These boost libraries are definitely installed and are not any different to boost libraries that PCLConfig.cmake is finding (e.g. system).
When forcing Boost_DEBUG to be on, I get the following output:
Environment:
Sorry if this turns out to be a Boost problem rather than a PCL problem, I've been stuck on this issue for hours.
The text was updated successfully, but these errors were encountered: