flexible-collision-library / fcl

Flexible Collision Library
https://flexible-collision-library.github.io/
Other
1.35k stars 414 forks source link

Document how to work with the dual release to Noetic #533

Closed peci1 closed 3 years ago

peci1 commented 3 years ago

On Ubuntu Focal with ROS Noetic, there are two installs of libfcl. One system from libfcl-dev, and one ROS from ros-noetic-fcl.

I think this needs/deserves a note in Migration guide of ROS Noetic, doesn't it? Is there a way for packages to choose which version they want, which is reliable both during build time and run time?

Build failures like the following are surprising and hard to debug: https://build.ros.org/job/Ndev__robot_body_filter__ubuntu_focal_amd64/1/console

22:15:07 [ 21%] Linking CXX executable /tmp/ws/devel_isolated/robot_body_filter/lib/robot_body_filter/test_tf2_eigen
22:15:11 /usr/bin/ld: /tmp/ws/devel_isolated/robot_body_filter/lib/librobot_body_filter_utils.so: undefined reference to `fcl::OBB::operator+(fcl::OBB const&) const'
22:15:11 /usr/bin/ld: /tmp/ws/devel_isolated/robot_body_filter/lib/librobot_body_filter_utils.so: undefined reference to `fcl::OBB::overlap(fcl::OBB const&) const'
22:15:11 /usr/bin/ld: /tmp/ws/devel_isolated/robot_body_filter/lib/librobot_body_filter_utils.so: undefined reference to `fcl::OBB::contain(fcl::Vec3fX<fcl::details::Vec3Data<double> > const&) const'
22:15:11 collect2: error: ld returned 1 exit status

For example, I was unable to recreate this situation on my computer. It seems that CMake chose FCL 0.6.1 (from the logs), then built the library using 0.5 headers (probably because I include only a header that's in 0.5), and the ran the linker with the 0.6.1 library.

It took me about an hour until I figured out what happened. Documenting this and giving some suggestions could save some other people time upgrading their packages to Noetic.

traversaro commented 3 years ago

I am not sure if this is the best place (i.e. the place where you can find the most interest people in this). The issue of two different versions of fcl being released in apt Debian/Ubuntu repo and in ROS build farm seems to be more a problem of ROS distribution rather then an upstream problem of fcl (that can be consume in several ways, Debian binaries, ROS Debian binaries, as bazel external, via vcpkg, via conda-forge, etc etc).

Some related issue on rosdistro seem to be https://github.com/ros/rosdistro/pull/26706 and https://github.com/ros/rosdistro/issues/26527, perhaps it could make sense to drop a comment in https://github.com/ros/rosdistro/issues/26527 ?

peci1 commented 3 years ago

Thanks for the redirect, I did not know exactly where to report this. So I'm closing this issue here and discussion will (hopefully) follow in https://github.com/ros/rosdistro/pull/26706 .

traversaro commented 3 years ago

Related issues, but on ROS2:

sasilva1998 commented 2 years ago

Hi, I am using ROS Noetic and I am having compilation issues with FCL, I already followed the steps from this link http://wiki.ros.org/noetic/Migration. I modified both the package.xml and CMakeList.txt but still no success. I have been able to compile a package that uses FCL but not all of them, it has been really random, compiles once, and then second time fails.

Noticed that by default moveit packages are dependant of libfcl0.5, so when installing moveit packages, libfcl0.5 is installed, I installed fcl0.6 from .deb and removed libfcl0.5 but still no success. I would like to know if actually libfcl0.5 should be installed, and then what about ros-noetic-fcl and ros-noetic-fcl-catkin. Which of all these packages should be installed and is there a way to avoid moveit to use 0.6 instead of 0.5?