Skip to content

Commit

Permalink
Use RPATH instead of RUNPATH (#19)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Mar 1, 2024
2 parents 26f3bba + 5e0fa2b commit c12b175
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ for i in `ls`; do
ln -s ${PREFIX}/${targetsDir}/$j ${PREFIX}/$j

if [[ $j =~ \.so\. ]]; then
patchelf --set-rpath '$ORIGIN' ${PREFIX}/${targetsDir}/$j
patchelf --set-rpath '$ORIGIN' --force-rpath ${PREFIX}/${targetsDir}/$j
fi
done
fi
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ source:
sha256: e29c419a99a2f5e3ea0e7394a58c23536429a26b7eccc3f89f172f7fd2818a23 # [win]

build:
number: 0
number: 1
binary_relocation: false
skip: true # [osx]

Expand Down
6 changes: 5 additions & 1 deletion recipe/test-rpath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ for lib in `find ${PREFIX}/${targetsDir}/lib -type f`; do

rpath=$(patchelf --print-rpath $lib)
echo "$lib rpath: $rpath"
[[ $rpath == "\$ORIGIN" ]] || errors+="$lib\n"
if [[ $rpath != "\$ORIGIN" ]]; then
errors+="$lib\n"
elif [[ $(objdump -x ${lib} | grep "PATH") == *"RUNPATH"* ]]; then
errors+="$lib\n"
fi
done

if [[ $errors ]]; then
Expand Down

0 comments on commit c12b175

Please sign in to comment.