Skip to content

Link Python bindings to Python::Module and not Python::Python to prevent Python bindings segfault on macOS#987

Merged
pattacini merged 1 commit intomasterfrom
fixbindingsmacos
Oct 3, 2024
Merged

Link Python bindings to Python::Module and not Python::Python to prevent Python bindings segfault on macOS#987
pattacini merged 1 commit intomasterfrom
fixbindingsmacos

Conversation

@traversaro
Copy link
Copy Markdown
Member

Linking to Python::Python results in a segfault on module loading on macos.

@traversaro traversaro changed the title Link Python bindings to Python::Module and not Python::Python Link Python bindings to Python::Module and not Python::Python to prevent Python bindings segfault on macOS Oct 3, 2024
@traversaro
Copy link
Copy Markdown
Member Author

Linking to Python::Python results in a segfault on module loading on macos.

Just for reference for someone finding this issue on Google, that was not a macOS specific problem. The problem was due to being in macOS, and due to the use of a Python interpreter that statically link libpython (as the conda-forge one, see astral-sh/python-build-standalone#540 for more details). However, linking to Python::Module works perfectly fine for Python interpreters that link to a shared libpython, so the change make sense in general independently by the Python interpreter used.

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.

3 participants