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

Issue with ament_cmake_gen_version_h install path in ros2 build farm #525

Closed
saikishor opened this issue May 9, 2024 · 2 comments · Fixed by #526
Closed

Issue with ament_cmake_gen_version_h install path in ros2 build farm #525

saikishor opened this issue May 9, 2024 · 2 comments · Fixed by #526

Comments

@saikishor
Copy link

saikishor commented May 9, 2024

Hello!

In ros2_control, we have recently added the version header generation using ament_cmake_gen_version_h package, however, from them, the build farm is failing showing the following error. Can someone help us in finding the issue in the changes (https://github.com/ros-controls/ros2_control/pull/1449/files)?. With the changes local builds and CI builds works without any issue.

Reference job : https://build.ros2.org/job/Rbin_uN64__joint_limits__ubuntu_noble_amd64__binary/61/

10:35:21 -- Installing: /tmp/binarydeb/ros-rolling-joint-limits-4.10.0/debian/ros-rolling-joint-limits/opt/ros/rolling/share/joint_limits/package.xml
10:35:21 CMake Error at cmake_install.cmake:145 (file):
10:35:21   file INSTALL cannot find
10:35:21   "/tmp/binarydeb/ros-rolling-joint-limits-4.10.0/.obj-x86_64-linux-gnu/ament_generate_version_header/joint_limits/joint_limits/version.h":
10:35:21   No such file or directory.

Thank you :)

@clalancette
Copy link
Contributor

In short, this is a bug in ament_generate_version_header, specifically having to do with INTERFACE libraries.

The longer version is that it takes a combination of factors for this to happen, all of which only happen with this package on the buildfarm:

  1. You need to have BUILD_TESTING=OFF.
  2. You need to be using ament_generate_version_header.
  3. The target you are generating for needs to be an INTERFACE only package.

On the ROS 2 buildfarm, all of those are true joint_limits. In that case, what happens in
https://github.com/ros-controls/ros2_control/blob/edfb971c55f54f26272fbe38ee134859d7938d41/joint_limits/CMakeLists.txt is that there is no "build" time, and so the target that should be made up-to-date in

add_custom_target("ament_generate_version_header__${target}"
DEPENDS "${GENERATED_HEADER_FILE}")
(which ultimately generates the version.h file), is just never run.

The fix is actually a one-liner; see #526 for it. What I'm going to suggest in the short-term, though, is that you actually just remove ament_generate_version_header from this package, and this package alone.

@saikishor
Copy link
Author

Hello @clalancette!

Thanks a lot for responding. Sure, for now we will remove it from the joint_limits package.

Thank you!

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 a pull request may close this issue.

2 participants