logoalt Hacker News

account42today at 7:44 AM3 repliesview on HN

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.


Replies

egorfinetoday at 8:18 AM

> 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.

show 1 reply
yxhuvudtoday at 8:13 AM

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.

throwaway2046today at 9:09 AM

> 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...

show 1 reply