Skip to content
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

Add rviz build dependency to correctly set linker paths #632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simonschmeisser
Copy link
Contributor

Description

This seems to fix linking against librviz_default_plugin.so from system packages (melodic) when I actually have a newer version (noetic-devel) in my workspace

@rhaschke
Copy link
Contributor

rhaschke commented Apr 26, 2021

Could you explain the actual error a little more? None of the binaries require explicit linking against rviz, do they?
Your newer workspace version of librviz* should be included automatically via LD_LIBRARY_PATH, which should be set when you source your workspace.
Can you figure out which binary directly loads librviz* from a wrong location and why?
Is this related to #631 and moveit/moveit#2596?

@simonschmeisser
Copy link
Contributor Author

It is "related" in that it took a couple of hours away from my sleep to reproduce the issues mentioned in moveit/moveit#2596 but not really otherwise.
There was no more errors than missing linker symbols with interactive markers in /opt/ros/melodic/lib/librviz_default_plugin.so while it was supposed to not use that in the first place but rather the one in my workspace

@simonschmeisser
Copy link
Contributor Author

Here are the error messages

Errors     << moveit_tutorials:make /home/sis/Mikado/logs/moveit_tutorials/build.make.035.log                                                                                                                                                                                
//opt/ros/melodic/lib/librviz_default_plugin.so: undefined reference to `interactive_markers::InteractiveMarkerClient::InteractiveMarkerClient(tf::Transformer&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/sis/Mikado/devel/.private/moveit_tutorials/lib/moveit_tutorials/motion_planning_pipeline_tutorial] Error 1
make[1]: *** [doc/motion_planning_pipeline/CMakeFiles/motion_planning_pipeline_tutorial.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
//opt/ros/melodic/lib/librviz_default_plugin.so: undefined reference to `interactive_markers::InteractiveMarkerClient::InteractiveMarkerClient(tf::Transformer&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/sis/Mikado/devel/.private/moveit_tutorials/lib/moveit_tutorials/motion_planning_api_tutorial] Error 1
make[1]: *** [doc/motion_planning_api/CMakeFiles/motion_planning_api_tutorial.dir/all] Error 2
//opt/ros/melodic/lib/librviz_default_plugin.so: undefined reference to `interactive_markers::InteractiveMarkerClient::InteractiveMarkerClient(tf::Transformer&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/sis/Mikado/devel/.private/moveit_tutorials/lib/moveit_tutorials/move_group_interface_tutorial] Error 1
make[1]: *** [doc/move_group_interface/CMakeFiles/move_group_interface_tutorial.dir/all] Error 2
make: *** [all] Error 2

@rhaschke
Copy link
Contributor

rhaschke commented May 7, 2021

librviz_default_plugin.so already links against librviz.so:

$ ldd /opt/ros/noetic/lib/librviz_default_plugin.so | grep rviz
librviz.so => /opt/ros/noetic/lib/librviz.so (0x00007fd1ad2de000)

Could you please build in VERBOSE mode and with -j 1 to see the actual command line?

@simonschmeisser
Copy link
Contributor Author

will do that later, the problem is this //opt/ros/melodic/lib/librviz_default_plugin.so should not be used but rather the one in this workspace

@@ -11,6 +11,7 @@ find_package(catkin REQUIRED
moveit_ros_planning
moveit_ros_planning_interface
moveit_ros_perception
rviz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs to be added to CATKIN_DEPENDS args in catkin_package, below, to make catkin_lint happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants