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

tf2_py build failure with catkin symlink install #486

Open
dgoel opened this issue Nov 25, 2020 · 1 comment
Open

tf2_py build failure with catkin symlink install #486

dgoel opened this issue Nov 25, 2020 · 1 comment

Comments

@dgoel
Copy link

dgoel commented Nov 25, 2020

tf2_py project errors out when building with symlink install option for catkin with catkin-tools (or colcon). This does not happen if symlink option is not enabled.

The main cause is that catkin does not handle cmake generator expression in the install functions for cmake. Nevertheless, proposing a fix here.

Version(s) affected

I have only tested with melodic-devel but this should also affect noetic-devel.

How to reproduce

With ros melodic distro:

# clone
$ mkdir -p ros_ws/src
$ cd ros_ws
$ git clone https://github.com/ros/geometry2 src

# build
$ catkin init
$ catkin config --install --cmake-args -DCATKIN_SYMLINK_INSTALL:BOOL=ON
$ catkin build

Build error:

CMake Error at catkin_symlink_install/catkin_symlink_install.cmake:157 (message):
  catkin_symlink_install_files() can't find
  '/home/user/ros_ws/src/tf2_py/$<TARGET_FILE:tf2_py>'
Call Stack (most recent call first):
  catkin_symlink_install/catkin_symlink_install.cmake:343 (catkin_symlink_install_files)
  cmake_install.cmake:41 (include)


make: *** [install] Error 1

Proposed fix

This can be fixed by not using cmake generator expression in the install as follows:

$ git diff
diff --git a/tf2_py/CMakeLists.txt b/tf2_py/CMakeLists.txt

-install(FILES $<TARGET_FILE:tf2_py>
+install(TARGETS tf2_py
     DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION}
 )

I am happy to open a PR if this is acceptable.

ooeygui pushed a commit to ms-iot/geometry2 that referenced this issue Oct 12, 2022
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
mqcmd196 added a commit to mqcmd196/geometry2 that referenced this issue Feb 23, 2024
@mqcmd196
Copy link

+1

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

No branches or pull requests

2 participants