Let's see how the libc versions affect binary compatability...
glibc (libc6): 2.x is likely to not run stuff compiled with 2.x+1; 2.x+1 can run stuff compiled with 2.x.
eglibc: same, except you can turn off support for features. If you turn off a feature, anything that uses it won't work.
Compatible with glibc.
(the above two are fairly widely used, but there are several versions in use. LSB ABI is a subset of glibc.)
musl: compatible with a subset of glibc ABI. Usually backwards and forwards compatible.
uclibc: No compatability with anything, including stuff compiled with older or newer versions.
(Both used in a few distros, with occasional use in parallel with the main libc.)
dietlibc: "Unofficially" compatible with older and newer versions; not ABI compatible with any other library
klibc: not compatible with anything else; no documentation I could find on backwards/forwards compatability.
(Both almost always used in parallel with glibc, to create static binaries)
bionic: Incompatible ABI, based on a mix of BSD libcs. Also full of stubs. (Android.)
olibc: bionic ABI, but with the stubs filled out. Aimed at embedded systems, AFAICT.
newlib: incompatible ABI; embedded or parallel.
And then there are at least three other ANSI libcs (ccaprice, pdlibc, PDClib) that aim at static linking, so the binaries might be portable. ISTR some also support shared binaries...
Long story short:
If you build it on an old glibc-based distro, it will run on most Linux distros.
If you build it static, it will run on all Linux distros that have a properly configured kernel and filesystem.
If you use uclibc shared, it's for one distro release.
glibc (libc6): 2.x is likely to not run stuff compiled with 2.x+1; 2.x+1 can run stuff compiled with 2.x.
eglibc: same, except you can turn off support for features. If you turn off a feature, anything that uses it won't work.
Compatible with glibc.
(the above two are fairly widely used, but there are several versions in use. LSB ABI is a subset of glibc.)
musl: compatible with a subset of glibc ABI. Usually backwards and forwards compatible.
uclibc: No compatability with anything, including stuff compiled with older or newer versions.
(Both used in a few distros, with occasional use in parallel with the main libc.)
dietlibc: "Unofficially" compatible with older and newer versions; not ABI compatible with any other library
klibc: not compatible with anything else; no documentation I could find on backwards/forwards compatability.
(Both almost always used in parallel with glibc, to create static binaries)
bionic: Incompatible ABI, based on a mix of BSD libcs. Also full of stubs. (Android.)
olibc: bionic ABI, but with the stubs filled out. Aimed at embedded systems, AFAICT.
newlib: incompatible ABI; embedded or parallel.
And then there are at least three other ANSI libcs (ccaprice, pdlibc, PDClib) that aim at static linking, so the binaries might be portable. ISTR some also support shared binaries...
Long story short:
If you build it on an old glibc-based distro, it will run on most Linux distros.
If you build it static, it will run on all Linux distros that have a properly configured kernel and filesystem.
If you use uclibc shared, it's for one distro release.
Comment