3 ms·
> Linux is not oriented toward supporting binary compatibility beyond the most rudimentary level Why do you say this? I am truly curious. My understanding is
by skywal_l 4y ago
> Linux is not oriented toward supporting binary compatibility beyond the most rudimentary level
Why do you say this? I am truly curious.
My understanding is that the Linux ABI is very stable ("we never break user space" -- Linux Torvald). If you static link the libc, your binary should work on any Linux.
I mean, if we were to judge Linux it should be with regards to other operating system of equivalent complexity and use. My understanding is that Windows or macos do not offer this kind of stability over time.
- agwa 4y agoThe kernel ABI is very stable, but applications typically need to interact with parts of the operating system besides the kernel, and those parts are not as fanatical when it comes to providing stable interfaces. For example, applications that need to do hostname and username resolution have to interface with NSS, and that breaks if you statically link glibc. Another example is playing audio - this requires interfacing with some userspace audio system like JACK, PulseAudio, or now Pipewire. If you statically link libSDL, it won't work in 5-10 years with whatever the latest fad in audio playback is. But if you dynamically link libSDL, then you can't statically link glibc because libSDL may be linked with a newer version of glibc, causing a conflict. Thus you end up with a quite a mess.
- phibz 4y agoIt is possible to statically link everything except for libnss and link it dynamically. I used this trick to create recovery shells on Solaris back in the day that didnt need /usr mounted. Same thing worked on Linux from what I recall.
- 3836293648 4y agoThis is a case where Linux refers to the entire OS family and not just the kernel. The kernel interface is very stable. The common libraries are not. Not even glibc
- zinekeller 4y ago> My understanding is that Windows or macos do not offer this kind of stability over time. This definitely torpedoed your argument (ask any enterprise Windows user). First, "Linux" in this sense means what a normal user sees as Linux, which is a GNU/Linux desktop with a DE such as Gnome or KDE. You're correct that the Linux kernel ABI is stable (at least in userland), it would be simply wrong to say that "Linux" (as would normal users encounter) is ABI-stable.