Skip to content

ROS: document this package as architecture independent#786

Merged
nim65s merged 1 commit intojrl-umi3218:masterfrom
nim65s:arch
Nov 6, 2025
Merged

ROS: document this package as architecture independent#786
nim65s merged 1 commit intojrl-umi3218:masterfrom
nim65s:arch

Conversation

@nim65s
Copy link
Collaborator

@nim65s nim65s commented Nov 6, 2025

Fix Gepetto/aig#66

In short, we need find_package(jrl-cmakemodules CONFIG REQUIRED) to work before project(…) call, because we want that project(…) to use our PROJECT_ARGS from jrl-cmakemodules's compute_project_args().

But as long as project(…) with the correct LANGUAGES is not run (nor is enable_language(…)), CMAKE_LIBRARY_ARCHITECTURE is not set, and therefore, the "Config Mode Search Procedure"
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure will not include any lib/<arch> paths.

And by default, ROS packages all have Architecture: any in their debian/control, which configure the installation of CMake export in lib/<arch>:
https://github.com/ros2-gbp/jrl_cmakemodules-release/blob/debian/ros-humble-jrl-cmakemodules_1.1.0-1_jammy/debian/control#L10

By exporting this architecture_independent tag, we should be able to get Architecture: all, and see this package correctly installed in lib

Unfortunately, ros-infrastructure/bloom#705 is not merged yet.

Fortunately, our lord and savior Nix can easily deal with that not-merged status: lopsided98/nix-ros-overlay#736

Thanks @MaximilienNaveau for the report and the private follow-ups when I could not understand or reproduce the issue.

Btw, calling enable_language(…) first, then
find_package(jrl-cmakemodules …), and finally project(…) is a working workaround, but CMP0165 decided to strictly forbid this in CMake >= 3.30.

Fix Gepetto/aig#66

In short, we need `find_package(jrl-cmakemodules CONFIG REQUIRED)` to
work before `project(…)` call, because we want that `project(…)` to use our
`PROJECT_ARGS` from `jrl-cmakemodules`'s `compute_project_args()`.

But as long as `project(…)` with the correct `LANGUAGES` is not run (nor
is `enable_language(…)`), `CMAKE_LIBRARY_ARCHITECTURE` is not set,
and therefore, the "Config Mode Search Procedure"
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
will not include any `lib/<arch>` paths.

And by default, ROS packages all have `Architecture: any` in their
`debian/control`, which configure the installation of CMake export in
`lib/<arch>`:
https://github.com/ros2-gbp/jrl_cmakemodules-release/blob/debian/ros-humble-jrl-cmakemodules_1.1.0-1_jammy/debian/control#L10

By exporting this `architecture_independent` tag, we should be able to
get `Architecture: all`, and see this package correctly installed in
`lib`

Unfortunately, ros-infrastructure/bloom#705 is
not merged yet.

Fortunately, our lord and savior Nix can easily deal with that not-merged status:
lopsided98/nix-ros-overlay#736

Thanks @MaximilienNaveau for the report and the private follow-ups when
I could not understand or reproduce the issue.

Btw, calling `enable_language(…)` first, then
`find_package(jrl-cmakemodules …)`, and finally `project(…)` is a
working workaround, but CMP0165 decided to strictly forbid this in CMake >= 3.30.
@nim65s nim65s merged commit 0a3c2b5 into jrl-umi3218:master Nov 6, 2025
5 checks passed
@nim65s nim65s deleted the arch branch November 6, 2025 14:52
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.

1 participant