1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-11 04:53:47 -05:00

Fix wrong libpython being linked to in MacOS (#2596)

Without rpath, python would link up to the system's libpython
This commit is contained in:
native-api
2023-01-19 00:21:10 +03:00
committed by GitHub
parent bd618ea9ef
commit 819e2b8f45
4 changed files with 84 additions and 79 deletions

View File

@@ -123,7 +123,7 @@ run_inline_definition_with_name() {
assert_build_log <<OUT
patch -p0 --force -i $TMP/python-patch.XXX
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib"
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2
make install
@@ -153,7 +153,7 @@ OUT
patch: bar
patch: baz
patch: foo
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib"
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2
make install
@@ -177,7 +177,7 @@ OUT
assert_success
assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib"
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib
make -j 2
make altinstall
@@ -315,7 +315,7 @@ EOS
cached_tarball "Python-3.6.2"
for i in {1..4}; do stub brew false; done
for i in {1..8}; do stub uname '-s : echo Linux'; done
for i in {1..7}; do stub uname '-s : echo Linux'; done
stub "$MAKE" \
" : echo \"$MAKE \$@\" >> build.log" \
" : echo \"$MAKE \$@\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'"
@@ -324,7 +324,7 @@ EOS
assert_success
assert_build_log <<OUT
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath=${TMP}/install/lib"
Python-3.6.2: CPPFLAGS="-I${TMP}/install/include" LDFLAGS="-L${TMP}/install/lib -Wl,-rpath,${TMP}/install/lib"
Python-3.6.2: --prefix=$INSTALL_ROOT --enable-shared --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs2
make -j 2
make install