-
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
Conversation
@@ -58,7 +58,8 @@ else | |||
--host=\${MACHTYPE} \\ | |||
--with-sysroot="\${prefix}/$(compiler_target)/sys-root" \\ | |||
--enable-multilib \\ | |||
--disable-werror | |||
--disable-werror \\ | |||
--enable-new-dtags |
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
for lib in libgfortran libasan libtsan libubsan liblsan; do | ||
[ ! -f "${libdir}/${lib}.so" ] || patchelf --set-rpath "\$ORIGIN" "${libdir}/${lib}.so" | ||
done | ||
|
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.
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I replied in #3703 (comment), I think the assessment was ill-informed
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 |
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.
Also here, the fact that we have $ORIGIN/../lib
as RPATH makes me think this should have always been $ORIGIN
(library is in ${prefix}/lib
, so $ORIGIN/../lib
is just $ORIGIN
). Maybe when we normalise the rpaths we should flatten relative paths, so that these identities become clear and we can simplify the paths we put there. However experimenting with LLVM is way less fun than with CSL, since building LLVM in the first place takes forever (at least with cold ccache) and audit also takes long.
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.
the library may later get moved to lib/julia
, resulting in breakage for people linking against it
that was fixed in Julia v1.7 (JuliaLang/julia#42788), but strictly only on that release branch (@vchuravy)
Closing in favor of JuliaPackaging/BinaryBuilder.jl#1240 |
No description provided.