Hacker News new | ask | show | jobs
by duped 1501 days ago
Linker errors
2 comments

You just bundle all libraries except glibc in the tarball. You build against the oldest glibc you're willing to call "supported". Firefox and Blender (among many others) have been doing this for as long as I can remember, and as long as I can remember their tarballs have never failed to work for me, on any distro.

The problem seems to me to be that there's some kind of cultural imperative to attempt to dynamically link against whatever the system version of a library is, which is clearly insanity.

Static linking.
You can't statically link glibc and you shouldn't statically link openssl or libcrypto, and Linux distributions make it extremely difficult to do reliably without compiling everything from source.
You don't have to statically link everything. You should choose based on (a) if the lib has to be dynamic (eg. portability layers, crypto) (b) if the lib is widespread and has stable ABI.
and now your tarball will break on an indeterminate number of linux user machines without (often extensive) manual intervention to fix .so versioning issues. That's why things like flatpak exist.