logoalt Hacker News

rcxdude • today at 8:42 AM • 2 replies • view on HN

>glibc has an unstable ABI, making back-portability impossible

Of all the libraries to call out for this, glibc is not the one. It's basically the only library on linux that actually has a strong commitment to providing a stable ABI, with its own symbol versioning system to allow it. It is a bit of a PITA to compile for an older version of that ABI, but it's very possible to be compatible with glibc across a wide range of versions and distributions (I don't know why there isn't a flag to do it: the most widely supported option is compiling on a system with the oldest glibc you want to support, and there's some header hacks which claim to be able to avoid that).

It's everything else necessary to interact with the system (especially anything desktop/multimedia) that's wildly unstable.


Replies

delta_p_delta_x • today at 8:48 AM

Fair response.

I singled it out because I've been badly burnt by it in the past, and I dislike how it works compared to Win32. Back-targeting old glibc from newer (a very common case because developers tend to have newer distros than their users), requires either changes in source code (not build code, which is where it ought to be) to explicitly pin versions, or the ridiculousness of firing up an entire Docker container just for old glibc. It has regularly caused issues for things like Steam on Linux.

➕ show 1 reply
M95D • today at 10:23 AM

All I can say is that Gentoo specifically forbids downgrading glibc. I think it's the only package where they did this. [1] The .ebuild is full of patches and workarounds.

[1] See line 873. https://github.com/gentoo/gentoo/blob/master/sys-libs/glibc/...

➕ show 1 reply