-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add workaround for musl
lack of SONAME support
#34
base: master
Are you sure you want to change the base?
Conversation
@@ -92,3 +92,24 @@ function get_julia_libpaths() | |||
end | |||
return JULIA_LIBDIRS | |||
end | |||
|
|||
@static if VERSION >= v"1.6.0" && libc(HostPlatform()) == "musl" |
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.
At this point we can do #31 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.
Heh, sure. We can do both for now.
CC: @jpsamaroo |
Because `musl` doesn't pay attention to SONAMEs, we cannot load JLLs with transient dependencies because `musl` always tries to do an environment search for dependencies, even if they're already loaded. We work around this by manually altering the `dso` structures that `musl` maintains for each loaded library, making it look like the library was loaded by a previous environment search instead of by loading directly via full path.
a61811e
to
8ddec8b
Compare
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
With this I can now do:
|
@vtjnash I'm pinging you because I think we arguably want to do this for all |
This is a pretty hilarious hack... do we know if it has a potential to break in the future? |
Just for the record, this only works on Alpine 3.11+, before that the layout is different, so unless I add some code to deal with that, we will indeed have issues around that. |
9fbbe39
to
f57d071
Compare
f57d071
to
fce4f2f
Compare
Okay, this now passes testing on all versions of Alpine from 3.6+. I defined layouts for versions of musl earlier than that, but Alpine backports lots of patches that change the layout of the DSO object on those earlier versions (but still identifies the musl version as the old version), so it's a losing battle to try to support those old versions. God willing nobody is using such old versions anyway. This is an annoying amount of copypasta. @vtjnash what are your thoughts on this? Is this a doomed approach? Should we instead have Julia notice it's running on |
f0e2953
to
db598ae
Compare
db598ae
to
1090fc1
Compare
Because
musl
doesn't pay attention to SONAMEs, we cannot load JLLswith transient dependencies because
musl
always tries to do anenvironment search for dependencies, even if they're already loaded. We
work around this by manually altering the
dso
structures thatmusl
maintains for each loaded library, making it look like the library was
loaded by a previous environment search instead of by loading directly
via full path.