Amend the python build to create executable linked to shared library #16
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.
This commit fixes the issue that the python executable built requires
specifiying the LD_LIBRARY_PATH to load the correct library versions.
This issue is seen by comparing the output of
python -V
withLD_LIBRARY_PATH=/usr/local/lib python -V
. The former returns anincorrect version (2.7.5) whereas the latter return the correct version
(2.7.15).
The default prefix when building python from source is /usr/local.
However the executable built loads the shared libraries from /lib64
(symlinked to /usr/lib64) which ends up loading the (incorrect) system
libpython2.7.so instead of loading it from the one that is built in
/usr/local/lib
The libraries being loaded by the executable are visible by executing:
For the correctly built exectuable it is :
whereas for the current version (before this commit) the so is loaded
from /lib64 (-> /usr/lib64)
The fix is to either:
exectuable:
LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/python -V
OR,
in this commit) so that it does not need to be specified at runtime and
does not require alterations to existing Jenkinsfile