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

link moveit_robot_model from moveit_test_utils #1534

Merged

Conversation

v4hn
Copy link
Contributor

@v4hn v4hn commented Jul 3, 2019

The library internally creates RobotModel objects
and thus should link the constructor.


I just tried to build a fresh current master workspace on Lunar-Linux with clang++ and hit this error:

Errors     << moveit_ros_planning:make ros/melodic/moveit/logs/moveit_ros_planning/build.make.001.log
/usr/bin/ld: ros/melodic/moveit/install/lib/libmoveit_test_utils.so: undefined reference to `moveit::core::RobotModel::RobotModel(std::shared_ptr<urdf::ModelInterface> const&, std::shared_ptr<srdf::Model const> const&)'
/usr/bin/ld: ros/melodic/moveit/install/lib/libmoveit_test_utils.so: undefined reference to `moveit::core::RobotModel::~RobotModel()'
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [planning_scene_monitor/CMakeFiles/demo_scene.dir/build.make:248: ros/melodic/moveit/devel/.private/moveit_ros_planning/lib/moveit_ros_planning/demo_scene] Error 1
make[1]: *** [CMakeFiles/Makefile2:3183: planning_scene_monitor/CMakeFiles/demo_scene.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:141: all] Error 2

(1) This request simply links libmoveit_robot_model from libmoveit_test_utils.so. Both reside in the same ROS package, so the library can be referenced by literal name here. I seem to recall a debate on whether this link is necessary or not but I can't find it anymore.

(2) It does not really make any sense that a binary like moveit_ros_planning/demo_scene links the tests lib to begin with. But it is probably pulled in as a general library dependency of moveit_core. The concrete so-link might be related to me not using a Debian-based linux distribution.

The library internally creates RobotModel objects
and needs to link the constructor.
@v4hn v4hn requested a review from mlautman as a code owner July 3, 2019 13:36
Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

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

Seems to be reasonable. I don't understand, though, that Travis' clang build doesn't complain.

@v4hn
Copy link
Contributor Author

v4hn commented Jul 4, 2019

Some years ago I encountered comparable issues with non-Debian systems.
Back then this involved gcc and related to a change of the default --as-needed.
At the moment I can't make the problem disappear on my end with the flag, but I guess it might be related to differences between different Linux distributions.

@v4hn v4hn merged commit 784e8e5 into moveit:master Jul 4, 2019
v4hn added a commit to v4hn/moveit that referenced this pull request Mar 30, 2020
The library internally creates RobotModel objects
and needs to link the constructor.
v4hn added a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
The library internally creates RobotModel objects
and needs to link the constructor.
v4hn added a commit to v4hn/moveit that referenced this pull request Mar 31, 2020
The library internally creates RobotModel objects
and needs to link the constructor.
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.

None yet

2 participants