rclpy
rclpy copied to clipboard
Remove `SHARED` from `pybind11_add_module`
When the module is compiled with MODULE (the default), the proper linker flags are added on macOS (specifically -undefined dynamic_lookup). Otherwise, rclpy segfaults when linked on conda.
Is the SHARED really necessary? The pybind11 documentation says:
Specifying
SHAREDwill create a more traditional dynamic library which can also be linked from elsewhere.
Is anyone linking against this library as a "traditional dynamic library"?
Seems like a reasonable change to me.
Is anyone linking against this library as a "traditional dynamic library"?
I'm not sure. Let's find out!
CI (repos file build: --packages-above-and-dependencies rclpy test: --packages-above rclpy)
I guess that means .. it works?! :)
If I understand the CI correctly, then something went wrong in a package on Windows? Do you think that's related to this change?
If I understand the CI correctly, then something went wrong in a package on Windows? Do you think that's related to this change?
Unclear. It may be, because we don't see that same failure in the nightly builds: https://ci.ros2.org/view/nightly/job/nightly_win_rel/3083/
Damnation.
I would be happy to make this conditional (keep the current one on Windows). I don't really think that it should change anything though.
@Mergifyio rebase
rebase
✅ Branch has been successfully rebased
Pulls: ros2/rclpy#1305 Gist: https://gist.githubusercontent.com/fujitatomoya/f3edff6e70e07b92b751acd2dc92783e/raw/1f035dde991304b202c0027dce36b57e2315302c/ros2.repos BUILD args: --packages-above-and-dependencies rclpy TEST args: --packages-above rclpy ROS Distro: rolling Job: ci_launcher ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15253
Great, now Windows CI seems to be happy, together with all other builds.
Thanks!
do we need to backport this to jazzy ?
do we need to backport this to jazzy ?
That would permit to fix the macos crashes on conda-forge on vanilla build from sources. On robostack we have a patch for this on both jazzy and humble so we do not strictly need to backport this, but it is beneficial for someone build stock ROS 2 without patches.
I also propagate this changes on other ros2 repos that were affected by this problem:
- https://github.com/ros2/rosbag2/pull/1929
- https://github.com/ros2/ros2_tracing/pull/154
- https://github.com/ros2/netperf/pull/2
https://github.com/Mergifyio backport jazzy humble
backport jazzy humble
✅ Backports have been created
- #1421 Remove
SHAREDfrompybind11_add_module(backport #1305) has been created for branchjazzy - #1422 Remove
SHAREDfrompybind11_add_module(backport #1305) has been created for branchhumble