GLIBC version linking #145
Replies: 8 comments
|
Interesting and weird... According to the documentation of the feature test macros: None of that seems to imply what version of GLIBC gets linked. But, using It's also not clear to me how I'm happy to revert that change, if it is fundamentally a solution to the problem... |
|
I think what you describe is the main reason why Linux binaries are not back portable, in general. Each OS release comes with its own binary packages for a reason. I'm actually a little surprised that you managed to run anything compiled with a newer glibc on an older platform. This may have just been a lucky coincidence... I.e., it just so happened that the linking did not use any symbols beyond those available in GLIBC 2.29 when the But porting forward should work always. So, if you compile on bullseye, then that binary should run on bullseye, bookworm, and anything after... |
|
So, perhaps the question is: Should a program or library compiled with a specific version of GLIBC installed be expected to run on a system with an older version of GLIBC? I think the answer is no... |
|
Static linking could solve the issue, but I don't think static linking is really an option for Linux and GLIBC these days... |
Probably an ubuntu-specific glibc, idk. I don't have any other glibc on the system except 2.39 But with And with Looks like the difference is in the new reference
Well, as you can see, the answer is actually 'it depends' - if the output binary has only linked functions from glibc_2.2*, then why not? 😆 |
yes, you're right |
|
OK, if you agree, I'll convert this to a discussion item, since I don't think there is anything really SuperNOVAS specific about it. But I'm also curious what happens if you build supernovas with the bullseye docker image, and then try use that in bookworm, or your host system. So, let me know if that provides a workable solution of sorts... |
|
Compiled in a Compiled on And yes, supernovas compiled on bookworm also works on bullseye (with the older libc) :) P.S. All tested with the The problem is solved - turns out the issue wasn't an issue at all. I think it might also help to try compiling it with the |
Uh oh!
There was an error while loading. Please reload this page.
This change causes
GLIBC_2.38to be linked when compiling supernovas on a system with glibc 2.39 installed. As a result, using the precompiled library in default debian-based docker images becomes impossible (bookworm has glibc 2.36, and bullseye has 2.31).With
_DEFAULT_SOURCEsupernovas compiles withGLIBC_2.29linked ✅All reactions