Skip to content

Commit bcdd879

Browse files
committed
Set absolute RPATH with patchelf
1 parent 2cd9fee commit bcdd879

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/build-python.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
run: |
9494
mkdir -p output
9595
pushd src
96-
./configure --prefix=/opt/hostedtoolcache/Python/${{ steps.vars.outputs.normalised }}/riscv64 --with-ensurepip=install --enable-shared
96+
./configure --with-ensurepip=install --enable-shared
9797
make -j"$(nproc)" 2>&1 | tee ../build_output.txt
9898
make install DESTDIR="$PWD/../staging-std"
9999
popd
@@ -104,6 +104,7 @@ jobs:
104104
cp -a staging-std/usr/local/lib "${{ steps.vars.outputs.archive_base }}/"
105105
cp -a staging-std/usr/local/share "${{ steps.vars.outputs.archive_base }}/"
106106
107+
patchelf --set-rpath '/opt/hostedtoolcache/Python/${{ steps.vars.outputs.normalised }}/riscv64/lib' "${{ steps.vars.outputs.archive_base }}/bin/python${{ steps.vars.outputs.minor }}"
107108
ln -srf "${{ steps.vars.outputs.archive_base }}/bin/python${{ steps.vars.outputs.minor }}" "${{ steps.vars.outputs.archive_base }}/bin/python"
108109
ln -srf "${{ steps.vars.outputs.archive_base }}/bin/pip${{ steps.vars.outputs.minor }}" "${{ steps.vars.outputs.archive_base }}/bin/pip"
109110
@@ -125,7 +126,7 @@ jobs:
125126
run: |
126127
pushd src
127128
git clean -fdx
128-
./configure --prefix=/opt/hostedtoolcache/Python/${{ steps.vars.outputs.normalised }}/riscv64-freethreaded --with-ensurepip=install --enable-shared --disable-gil
129+
./configure --with-ensurepip=install --enable-shared --disable-gil
129130
make -j"$(nproc)" 2>&1 | tee ../build_output.txt
130131
make install DESTDIR="$PWD/../staging-ft"
131132
popd
@@ -136,6 +137,7 @@ jobs:
136137
cp -a staging-ft/usr/local/lib "${{ steps.vars.outputs.archive_base }}-freethreaded/"
137138
cp -a staging-ft/usr/local/share "${{ steps.vars.outputs.archive_base }}-freethreaded/"
138139
140+
patchelf --set-rpath '/opt/hostedtoolcache/Python/${{ steps.vars.outputs.normalised }}/riscv64-freethreaded/lib' "${{ steps.vars.outputs.archive_base }}/bin/python${{ steps.vars.outputs.minor }}"
139141
ln -srf "${{ steps.vars.outputs.archive_base }}-freethreaded/bin/python${{ steps.vars.outputs.minor }}" "${{ steps.vars.outputs.archive_base }}-freethreaded/bin/python"
140142
ln -srf "${{ steps.vars.outputs.archive_base }}-freethreaded/bin/pip${{ steps.vars.outputs.minor }}" "${{ steps.vars.outputs.archive_base }}-freethreaded/bin/pip"
141143

0 commit comments

Comments
 (0)