-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Stop hardcoding SOVERSION for stdlibs #43223
Conversation
Hardcoding versions is actually not needed as the build already creates symlinks from libXXX.so to libXXX.so.Y.Z. Since Julia does not always need a particular version, it is better to use the link which is created based on the one which was available at build time. It also reduced the number of places to edit when upgrading to a new SOVERSION. This was already the case for several libraries on Windows.
elseif Sys.isapple() | ||
const libuv = "@rpath/libuv.2.dylib" | ||
else | ||
const libuv = "libuv.so.2" | ||
const libuv = "libuv.so" | ||
end |
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'm not sure why, but on Windows only libuv-2.dll is in the ZIP, not libuv.dll like for other libraries. So I skipped it on Windows and Mac to avoid breaking something (I couldn't check Mac).
I suspect this will make #40556 even more problematic
Probably mainly because Windows doesn't really have the concept of SONAME/SOVERSION. |
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 would seem to be the wrong name for these libraries, however, since the SONAME is the 'real' name and that includes the version number. We also can't test CI against all possible incompatible versions of a library, which is what an SONAME bump indicates.
I'm kind of against this; there's no guarantee that loading |
AFAIK it shouldn't, as we always create symlinks from unversioned libXXX.so to libXXX.so.X.Y in $libdir/julia. This change would only make a difference when passing |
But for those typical C programs, you do hardcode the SOVERSION; however, you can recompile them to support a newer SOVERSION. In the case of Julia, of course you recompile Julia itself. But then there are many many JLLs out there, which also contain binary code which may link against those standard libraries. E.g. a ton link against GMP or MPFR. Now, right now, all of them are actually safe to use with any GMP 6.x version. But this may change: perhaps GMP 7 is released tomorrow and you want to use it on your system, and it happens to be "compatible enough" for Julia itself; but for some of those JLLs it may not be. The result then will be segfaults. So I think any change made here also needs to come with a plan to deal with JLLs that were built against specific versions of stdlibs. |
One of the reasons why changing SOVERSIONs are so annoying is that MbedTLS breaks its API and bumps SOVERSION in minor releases, because its developers want to change a field or two in a struct. This isn't a sane versioning scheme. :-/ JuliaPackaging/Yggdrasil#4179 (comment) JuliaPackaging/Yggdrasil#4180 (comment) |
Aye. But the solution for that can't be to just not track the SOVERSION. That'd be like "uncaught exception are annoying so let's not throw any exceptions anymore" :-) |
Is this ready to merge? |
I don't think there is much agreement on this change. |
Is it ok to convert it to draft in that case? |
I think this has no chance of being merged for reasons outlined in the discussion. |
Hardcoding versions is actually not needed as the build already creates symlinks from libXXX.so to libXXX.so.Y.Z. Since Julia does not always need a particular version, it is better to use the link which is created based on the one which was available at build time.
It also reduces the number of places to edit when upgrading to a new SOVERSION.
This was already the case for several libraries on Windows.
Fixes #40198.