rosidl_python
rosidl_python copied to clipboard
Fix rhel and windows builds
Fixes:
- https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1139/console#console-section-12.
- https://ci.ros2.org/view/nightly/job/nightly_win_deb/2357/console
It undoes most of #160. Instead of making libraries and headers private, it exports FindPython3 dependency correctly. Unfortunately, ament_export_dependencies() doesn't support configuring components, so I have exported it manually using an extra config file.
Old post:
~Nothing should depend on them (they are meant only to be loaded as python extensions).~
~Issue was introduced in https://github.com/ros2/rosidl_python/pull/160.~
~This was causing build issues in rhel https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1139/console#console-section-12.~ ~It didn't cause issues in other platforms as they realize the library they're linking agains isn't being used for anything, so they don't look at the missing symbols.~ ~But rhel linker seems to be more picky.~
Using the NumPy component of FindPython3 introduced an issue in our Windows debug build, I will fix that one separately https://ci.ros2.org/view/nightly/job/nightly_win_deb/2357/console.
Just as an FYI, before this PR asan builds are also broken (that is, colcon build --mixin asan-gcc
fails to link). With this PR, asan builds now work again. I haven't tested @sloretz 's suggestion yet.
This would be a very useful change for our cross-compiled builds for macOS ARM64 in RoboStack (currently facing an issue with absolute paths to numpy include dir that are exported from here): https://github.com/RoboStack/ros-humble/runs/7052219327?check_suite_focus=true
What is the status of this PR? As @wolfv said, this package is broken for cross compiling (I think the problem was introduced with 0f43ffc490b7e4ec08022361bced5fa274246dfd) and this might fix it?
What is the status of this PR?
It's on hiatus at the moment. At the very least it needs to be rebased and retested with the latest, and then it would also need to be reviewed.
As @wolfv said, this package is broken for cross compiling (I think the problem was introduced with 0f43ffc) and this might fix it?
Can you please confirm that it actually does fix it?
I'm working with meta-ros
and there with the humble PR 4, hence I've tested it based on 0.14.4
.
To avoid conflicts I reapplied https://github.com/ros2/rosidl_python/pull/160 (after it was reverted in the master) and then this PR.
This does not work.
It fails with cmake
for rmw-cyclonedds-cpp
not been able to find python3-numpy correctly.
Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found version "3.10.4")
For context (not directly relevant for this PR), 0.14.4
with https://github.com/ros2/rosidl_python/pull/149 reverted works.