upvote
Yes this is just asking for trouble - and all it does is solve a problem that doesn't really exist. Just dynamically link against the oldest glibc you want to support. Its annoying that Linux toolchains don't have built in easy mode support for that but its much easier to deal with than this thing will be when it breaks.

It's also not just new symbols, the loader semantics also aren't static and new enough libraries may not support older semantics - e.g. the loader used to use DT_HASH entries for symbol resolution but now they are no longer present on all distributions.

reply
> Just dynamically link against the oldest glibc you want to support

I wish it would that simple for practical use cases.

I ship professional software for colorists for Hollywood studios and they absolutely love to never upgrade. We have to ship for RockyLinux 8. Sad.

reply
RockyLinux doesn't sound so bad. It's not even EOL.
reply
It's just this short of being EOL.
reply
Almost three years?

>Rocky Linux 8 is supported by the Rocky Linux project until May 2029.

https://forums.rockylinux.org/t/what-is-eol-of-rl8/3316/3

reply
Yes but only the very last version and only paid support. Don't mind to pay, it's just that no amount of payment would be a proper solution to ancient environment with everything.
reply
This is not a desirable solution on musl based systems. Whatever you do in that situation ends up horrible, so it is about finding the least bad solution. Which this seems like a workable variant of.
reply
> Just dynamically link against the oldest glibc you want to support.

Just the other day I tried running an older binary and it failed with a glibc error, despite it being linked to a glibc version that's barely 5 releases behind the one on my system. So maybe glibc isn't backwards compatible after all...

reply
Or maybe you misunderstood the error message.
reply
Or may be not.
reply
This means the user will update the binary with my program and continue using it happily.

I'm not offering a silver bullet, but the approach I've implemented is much better than what the industry currently offers.

reply