-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Purge RPATH from libs installed with julia #5743
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,10 @@ if [[ ${target} == *apple* ]]; then | |
done | ||
fi | ||
|
||
for lib in libgfortran libasan libtsan libubsan liblsan; do | ||
[ ! -f "${libdir}/${lib}.so" ] || patchelf --set-rpath "\$ORIGIN" "${libdir}/${lib}.so" | ||
done | ||
|
||
Comment on lines
+116
to
+119
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #3703 (comment). I believe this can be fixed in the audit pass, instead of having to manually fix it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that would be somewhat simpler, but @staticfloat had thought it might fail in the verifier, so he suggested we do this manually There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I replied in #3703 (comment), I think the assessment was ill-informed |
||
# Remove extraneous libraries | ||
rm -f ${libdir}/{libiconv,libxml2,libz}*.${dlext}* | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -273,6 +273,14 @@ ninja -j${nproc} -vv | |
# Install! | ||
ninja install | ||
|
||
shopt -s nullglob | ||
for x in ${prefix}/lib/*.so; do | ||
# All things that have RPATH or doesn't have $ORIGIN, | ||
# but not those without $RUNPATH and $ORIGIN | ||
[ -n "$(objdump -x "$x" | grep 'RPATH\|RUNPATH')" ] && \ | ||
patchelf --set-rpath "\$ORIGIN" "$x"; | ||
done | ||
Comment on lines
+276
to
+282
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also here, the fact that we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the library may later get moved to that was fixed in Julia v1.7 (JuliaLang/julia#42788), but strictly only on that release branch (@vchuravy) |
||
|
||
# Life is harsh on Windows and dynamic libraries are | ||
# expected to live alongside the binaries. So we have | ||
# to copy the *.dll from bin/ to tools/ as well... | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not supported by this version of binutils