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

use -undefined dynamic_lookup on darwin in python_for_extensions #78

Closed
wants to merge 1 commit into from

Conversation

tdsmith
Copy link
Contributor

@tdsmith tdsmith commented May 5, 2015

Passing -undefined dynamic_lookup to the linker (instead of -lpython or
-framework Python) permits undefined symbols in shared libraries on OS
X. This allows a module to be linked against one Python framework and
imported from another.

Tested by building ledger, which uses Boost.Python, against a version of Boost built with and without this patch. In the "before" gist, libboost_python-mt.dylib has a linkage to /usr/local/Frameworks/Python.framework/Versions/2.7/Python; in the "after" gist, it does not, and the ledger python demo still runs correctly. https://gist.github.com/tdsmith/558243ad98ad288a16e0

Closes #69.

Passing -undefined dynamic_lookup to the linker (instead of -lpython or
-framework Python) permits undefined symbols in shared libraries on OS
X. This allows a module to be linked against one Python framework and
imported from another.
@tdsmith tdsmith changed the title use -undefined dynamic_lookup on darwin use -undefined dynamic_lookup on darwin in python_for_extensions May 5, 2015
@vprus
Copy link
Collaborator

vprus commented May 5, 2015

Thanks, cherry-picked.

@vprus vprus closed this May 5, 2015
@tdsmith tdsmith deleted the darwin-undefined branch May 5, 2015 07:05
pwolfram added a commit to pwolfram/conda-recipes that referenced this pull request Aug 7, 2016
pwolfram added a commit to pwolfram/conda-recipes that referenced this pull request Aug 7, 2016
@github-actions github-actions bot added the transition Transition to bfgroup/b2 label Oct 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
transition Transition to bfgroup/b2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python_for_extensions should use -undefined dynamic_lookup on darwin
2 participants