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

colcon --symlink-install fails to symlink versioned (catkin) libraries #147

Closed
rhaschke opened this issue Nov 7, 2023 · 1 comment · Fixed by ros/catkin#1197
Closed

Comments

@rhaschke
Copy link

rhaschke commented Nov 7, 2023

I'm building ROS1 packages, e.g. moveit_calibration with colcon build --symlink-install. There we use versioned libraries:
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")

However, this causes colcon to symlink libs into the wrong folder (package instead of package/lib) and w/o symlinking .so:

> find . -iname "moveit_handeye_calibration_rviz_plugin.so*"
./install/moveit_handeye_calibration_rviz_plugin/moveit_handeye_calibration_rviz_plugin.so.0.1.0
./build/moveit_handeye_calibration_rviz_plugin/devel/lib/moveit_handeye_calibration_rviz_plugin.so.0.1.0
./build/moveit_handeye_calibration_rviz_plugin/devel/lib/moveit_handeye_calibration_rviz_plugin.so

When dropping the VERSION setting, but still performing a symlink install, it works:

> find . -iname "moveit_handeye_calibration_rviz_plugin.so*"
./install/moveit_handeye_calibration_rviz_plugin/lib/libmoveit_handeye_calibration_rviz_plugin.so
./build/moveit_handeye_calibration_rviz_plugin/devel/lib/libmoveit_handeye_calibration_rviz_plugin.so

A --merge-install with versioned libs works as expected as well:

> find . -iname "libmoveit_handeye_calibration_rviz_plugin*" | xargs ls -1la
lrwxrwxrwx 1 rhaschke nistaff      29 Nov  7 16:00 ./build/moveit_handeye_calibration_rviz_plugin/devel/lib/libmoveit_handeye_calibration_rviz_plugin.so -> libmoveit_handeye_calibration_rviz_plugin.so.0.1.0
-rwxr-x--x 1 rhaschke nistaff 2763456 Nov  7 16:00 ./build/moveit_handeye_calibration_rviz_plugin/devel/lib/libmoveit_handeye_calibration_rviz_plugin.so.0.1.0
lrwxrwxrwx 1 rhaschke nistaff      29 Nov  7 16:00 ./install/lib/libmoveit_handeye_calibration_rviz_plugin.so -> libmoveit_handeye_calibration_rviz_plugin.so.0.1.0
-rw-r--r-- 1 rhaschke nistaff 2763456 Nov  7 16:00 ./install/lib/libmoveit_handeye_calibration_rviz_plugin.so.0.1.0

So, it seems the only missing use case is versioned libs and a symlinked install.

@cottsay
Copy link
Member

cottsay commented Jun 14, 2024

I can't transfer issues cross-organization, but this ticket belongs on ros/catkin. While colcon does tell catkin that it should use symlinks, the actual symlinking logic is implemented there.

Should be fixed by ros/catkin#1197.

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

Successfully merging a pull request may close this issue.

2 participants