Skip to content

Commit

Permalink
Merge pull request #8 from vyasr/fix/rpath_not_runpath
Browse files Browse the repository at this point in the history
Use RPATH instead of RUNPATH
  • Loading branch information
adibbley authored Mar 1, 2024
2 parents 93b2d43 + 2d1df00 commit ff19503
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: 535f226462c1f5025e054f7f76dd55573b6c59bdc734b314df554085b9c782ed # [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 ff19503

Please sign in to comment.