Skip to content

Remove SHARED from pybind11_add_module (backport #1305) - #1421

Merged
ahcorde merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-1305
Mar 3, 2025
Merged

ahcorde merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-1305

Conversation

@mergify

@mergify mergify Bot commented Mar 3, 2025

Copy link
Copy Markdown
Contributor

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 SHARED will create a more traditional dynamic library which can also be linked from elsewhere.

Is anyone linking against this library as a "traditional dynamic library"?


This is an automatic backport of pull request #1305 done by Mergify.

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 `SHARED` will create a more traditional dynamic library which can also be linked from elsewhere.

Signed-off-by: Wolf Vollprecht <[email protected]>
(cherry picked from commit 7fb093b)
@ahcorde

ahcorde commented Mar 3, 2025

Copy link
Copy Markdown
Contributor

Pulls: #1421
Gist: https://gist.githubusercontent.com/ahcorde/8b502c13a1a40b0d85d407218a1a1df1/raw/44ad60d8fdf98b98f84f57b586e016e9fcb0a8ec/ros2.repos
BUILD args: --packages-above-and-dependencies rclpy
TEST args: --packages-above rclpy
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15264

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
ahcorde merged commit 429c959 into jazzy Mar 3, 2025
@ahcorde
ahcorde deleted the mergify/bp/jazzy/pr-1305 branch March 3, 2025 13:56
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.

2 participants