Fix OS X build when CMAKE_BUILD_WITH_INSTALL_RPATH is enabled#97
Closed
msmolens wants to merge 1 commit into
Closed
Conversation
jcfr
added a commit
to jcfr/python-cmake-buildsystem
that referenced
this pull request
Sep 3, 2015
…all_rpath THIS COMMIT SHOUD NOT BE INTEGRATED INTO MASTER The role of the commit is to confirm the build fail and will be effectively fixed by PR python-cmake-buildsystem#97. It also test the feature introduced in 0f8541e teaching the driver script how to extract additional CMake configuration arguments from the commit message. This new feature provides a simple way to test some options without having to explicitly change the CI build matrix. This is special awesome comment: [cmake -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON]
Contributor
|
@msmolens there is now a new feature allowing to check the proposed changes will work as expected. Could you update the commit message adding The idea is to add a comment of the form |
When building Python 2.7.4+, python is run from the build tree as part of the
build process. When BUILD_SHARED and CMAKE_BUILD_WITH_INSTALL_RPATH are enabled
the python executable is unable to find the shared library. The build fails
with an error like:
[100%] Relocate _sysconfigdata.py and update pybuilddir.txt
dyld: Library not loaded: /path/to/python-install/lib/libpython2.7.dylib
Referenced from: /path/to/python-build/bin/python
Reason: image not found
/bin/sh: line 1: 12570 Trace/BPT trap /path/to/python-build/bin/python -E -S -m sysconfig --generate-posix-vars
make[2]: *** [bin/pybuilddir.txt] Error 133
make[1]: *** [CMakeBuild/python/CMakeFiles/update_sysconfig.dir/all] Error 2
make: *** [all] Error 2
The same error shows when running the tests.
This commit sets the DYLD_LIBRARY_PATH so that the executable finds the shared
library when building and when running the tests.
[cmake -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DBUILD_SHARED=ON]
572097e to
3f42f88
Compare
jcfr
added a commit
to jcfr/python-cmake-buildsystem
that referenced
this pull request
Sep 4, 2015
…all_rpath THIS COMMIT SHOUD NOT BE INTEGRATED INTO MASTER The role of the commit is to confirm the build fail and will be effectively fixed by PR python-cmake-buildsystem#97. It also test the feature introduced in 0f8541e teaching the driver script how to extract additional CMake configuration arguments from the commit message. This new feature provides a simple way to test some options without having to explicitly change the CI build matrix. This is special awesome comment: [cmake -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON]
Contributor
|
Fixed in a604801 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When building Python 2.7.4+, python is run from the build tree as part of the
build process. When BUILD_SHARED and CMAKE_BUILD_WITH_INSTALL_RPATH are enabled
the python executable is unable to find the shared library. The build fails
with an error like:
The same error shows when running the tests.
This commit sets the DYLD_LIBRARY_PATH so that the executable finds the shared
library when building and when running the tests.