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

Remove SHARED from pybind11_add_module #1305

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open

Conversation

wolfv
Copy link

@wolfv wolfv commented Jun 20, 2024

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"?

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"?

Signed-off-by: Wolf Vollprecht <[email protected]>
@sloretz
Copy link
Contributor

sloretz commented Jun 20, 2024

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)

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

@wolfv
Copy link
Author

wolfv commented Jun 20, 2024

I guess that means .. it works?! :)

@wolfv
Copy link
Author

wolfv commented Jun 21, 2024

If I understand the CI correctly, then something went wrong in a package on Windows? Do you think that's related to this change?

@clalancette
Copy link
Contributor

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/

@wolfv
Copy link
Author

wolfv commented Jun 21, 2024

Damnation.

@wolfv
Copy link
Author

wolfv commented Jun 21, 2024

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.

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.

4 participants