ros-industrial / ros_industrial_cmake_boilerplate

Other
16 stars 14 forks source link

yesterday's release to melodic breaks compilation #57

Closed asherikov closed 2 years ago

asherikov commented 2 years ago

I am getting multiple linking errors when building melodic on Ubuntu 18 with colcon, e.g., undefined reference totesting::ScopedTrace::~ScopedTrace()'orundefined reference to testing::ScopedTrace::PushTrace(char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' in tf2_geometry_msgs. Looks like a version conflict: gtest.h header provided by this package overrides default one, while the packages still link to the default gtest library built for each package individually:

$ grep -R PushTrace build/ | grep libgtest.so
Binary file build/reldebug/ros_industrial_cmake_boilerplate-googletest-build/googletest/libgtest.so matches
$ find ./build/ -iname "libgtest.so"
./build/reldebug/angles/gtest/googlemock/gtest/libgtest.so
./build/reldebug/tf2_geometry_msgs/gtest/googlemock/gtest/libgtest.so
./build/reldebug/libmavconn/gtest/googlemock/gtest/libgtest.so
...

gtest linking paths are configured somewhere in catkin guts, overriding them is a pain, and might need to be done for each package individually.

gavanderhoorn commented 2 years ago

Is this not #54?

asherikov commented 2 years ago

Yes, it is related. Pretty much it was fixed for 20/noetic and then released to 18/melodic, which didnt work. Also this package has never been released in melodic, so what is the point of doing this now?

gavanderhoorn commented 2 years ago

Probably for https://github.com/ros/rosdistro/pull/31368.

There are still plenty of people using Melodic, so that would be one reason (by which I meant: why ros_industrial_cmake_boilerplate is released. Not gtest).

gavanderhoorn commented 2 years ago

As @Levi-Armstrong maintains this, we'll wait for him.

asherikov commented 2 years ago

Fixed by https://github.com/ros/rosdistro/pull/31403