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

Use RCLCPP_VERSION_GTE from rclcpp/version.h in generic_client.cpp #344

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

johannesschrimpf
Copy link
Contributor

Changelog

Use RCLCPP_VERSION_GTE from rclcpp/version.h in generic_client.cpp

Docs

Description

The custom version of RCLCPP_VERSION_GTE was added in this commit: 9d92068

In my build environment, the corresponding definitions conflict with the definitions from roscpp/version.h included in parameter_interface.cpp, added here: 05f362a

| In file included from /data/yocto-styhead/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/foxglove-bridge/0.8.2-1/git/ros2_foxglove_bridge/src/parameter_interface.cpp:5:
| /data/yocto-styhead/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/foxglove-bridge/0.8.2-1/recipe-sysroot/usr/include/rclcpp/rclcpp/version.h:20:9: error: "RCLCPP_VERSION_MAJOR" redefined [-Werror]
|    20 | #define RCLCPP_VERSION_MAJOR (28)
|       |         ^~~~~~~~~~~~~~~~~~~~
| <command-line>: note: this is the location of the previous definition
| /data/yocto-styhead/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/foxglove-bridge/0.8.2-1/recipe-sysroot/usr/include/rclcpp/rclcpp/version.h:24:9: error: "RCLCPP_VERSION_MINOR" redefined [-Werror]
|    24 | #define RCLCPP_VERSION_MINOR (1)
|       |         ^~~~~~~~~~~~~~~~~~~~
| <command-line>: note: this is the location of the previous definition
| /data/yocto-styhead/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/foxglove-bridge/0.8.2-1/recipe-sysroot/usr/include/rclcpp/rclcpp/version.h:28:9: error: "RCLCPP_VERSION_PATCH" redefined [-Werror]
|    28 | #define RCLCPP_VERSION_PATCH (6)
|       |         ^~~~~~~~~~~~~~~~~~~~
| <command-line>: note: this is the location of the previous definition

Using the definitions from version.h directly resolve the build error. Is there a reason not to use the version from rclcpp?

I have not tested the changes runtime, but the build succeeds.

The custom version was added in this commit:
foxglove@9d92068

The corresponding definitions conflict with the definitions from
roscpp/version.h included in parameter_interface.cpp, added here:
foxglove@05f362a
@achim-k achim-k self-requested a review March 4, 2025 17:40
@achim-k achim-k merged commit 9a950ae into foxglove:main Mar 4, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants