6 ms·
This might offend some people but even Linus Torvalds thinks that the ABI compatibility is not good enough in Linux distros, and this is one of the main reasons
by senfiaj 10mo ago
This might offend some people but even Linus Torvalds thinks that the ABI compatibility is not good enough in Linux distros, and this is one of the main reasons Linux is not popular on the desktop. https://www.youtube.com/watch?v=5PmHRSeA2c8&t=283s https://www.youtube.com/watch?v=5PmHRSeA2c8&t=283s
- kwanbix 10mo agoI agree 100% with Linus. I can run a WinXP exe on Win10 or 11 almost every time, but on Linux I often have to chase down versions that still work with the latest Mint or Ubuntu distros. Stuff that worked before just breaks, especially if the app isn’t in the repo.
- kccqzy 10mo agoThat’s actually an intentional nudge to make the software packaged by the distro, which usually implies that they are open source. Who needs ABI compatibility when your software is OSS? You only need API compatibility at that point.
- SkiFire13 10mo agoEveryone is mentioning ABI, but this is really an API problem, so "you only need API compatibility at that point" is a very big understatement.
- rep_lodsb 10mo agoSo every Linux distribution should compile and distribute packages for every single piece of open source software in existence, both the very newest stuff that was only released last week, and also everything from 30+ years ago, no matter how obscure. Because almost certainly someone out there will want to use it. And they should be able to, because that is the entire point of free software: user freedom.
- realusername 10mo agoNot sure if it's the right solution but it's a description of what happens right now in practice yes.
- bruce511 10mo agoIt also makes support more or less impossible. Even if we ship as source, even if the user has the skills to build it, even if the make file supports every version of the kernel, plus all other material variety, plus who knows how many dependencies, what exactly am I supposed to do when a user reports; "I followed your instructions and it doesn't run". Linux Desktop fails because it's not 1 thing, it's 100 things. And to get anything to run reliably on 95 of them you need to be extremely competent. Distribution as source fails because there are too many unknown, and dependent parts. Distribution as binary containers (Docker et al) are popular because it gives the app a fighting chance. While at the same time being a really ugly hack.
- josephg 10mo agoYep. But docker doesn’t help you with desktop apps. And everything becomes so big! I think Rob pike has the right idea with go just statically link everything wherever possible. These days I try to do the same, because so much less can go wrong for users. People don’t seem to mind downloading a 30mb executable, so long as it actually works.
- kccqzy 10mo agoWhat do you mean docker doesn’t help you with desktop apps? I run complicated desktop apps like Firefox inside containers all the time. There are also apps like Citrix Workspace that need so specific dependency versions that I’ve given up on running outside containers. If you don’t want to configure this manually, use distrobox, which is a nice shell script wrapper that helps you set things up so graphical desktop apps just work.
- tuna74 10mo agoThen you only support 1 distro. If anyone wants to use your software on an unsupported distro they can figure out the rest themselves.
- johncolanduoni 10mo agoEven open-source software has to deal with the moving target that is ABI and API compatibility on Linux. OpenSSL’s API versioning is a nightmare, for example, and it’s the most critical piece of software to dynamically link (and almost everything needs a crypto/SSL library). Stable ABIs for certain critical pieces of independently-updatable software (libc, OpenSSL, etc.) is not even that big of a lift or a hard tradeoff. I’ve never run into any issues with macOS’s libc because it doesn’t version the symbol for fopen like glibc does. It just requires commitment and forethought.
- cryptonector 10mo agoThe reason you're getting downvoted is that what you're saying implies a shit-ton of work for the distros -- that's expensive work that someone has to pay for (but nobody wants to, and think of the cost of opportunity). But you're not entirely wrong -- as long as you have API compatibility then it's just a rebuild, right? Well, no, because something always breaks and requires attention. The fact is that in the world of open source the devs/maintainers can't be as disciplined about API compat as you want them to be, and sometimes they have to break backwards compatibility for reasons (security, or just too much tech debt and maint load for obsolete APIs). Because every upstream evolves at a different rate, keeping a distro updated is just hard. I'm not saying that statically linking things and continuing to run the binaries for decades is a good answer though. I'm merely explaining why I think your comment got downvoted.
- SvenL 10mo agoYes and even the package format thing is a hell of its own. Even on Ubuntu you have multiple package formats and sometimes there are even multiple app stores (a Gnome one and an Ubuntu specific if I remember correctly)
- mikestorrent 10mo agoUltimately this boils down to lack of clear technical and community leadership from Canonical. Too unwilling to say "no" to vanity/pet projects that end up costing all of us as they make the resulting distribution into a moving target too difficult to support in the enterprise - at least, not with the skillset of the average desktop support hire these days. I want to go to the alternate timeline where they just stuck with a set of technologies... ideally KDE... and just matured them up until they were the idealized version of their original plan instead of always throwing things away to rewrite them for ideological or technical purity of design.
- Propelloni 10mo agoYou can also run a WinXP exe on any Linux distribution almost every time. That's the point of project and Linus' quip: The only stable ABI around on MS Windows and Linux is Win32 (BTW, I do not agree with this.)
- Negitivefrags 10mo agoI think it's not unlikely that we reach reach a point in a couple of decades where we are all developing win32 apps that most people are running some form of linux. We already have an entire platform like that (steam deck), and it's the best linux development experience around in my opinion.
- duped 10mo agoIt's really just glibc
- amelius 10mo agoCan't we just freeze glibc, at least from an API version perspective?
- boredatoms 10mo agoOr just pre-install all the versions on each distro and pick the right one at load-time
- johncolanduoni 10mo agoWe definitely can, because almost every other POSIX libc doesn’t have symbol versioning (or MSVC-style multi-version support). It’s not like the behavior of “open” changes radically all the time, and you need to know exactly what source symbol it linked against. It’s really just an artifact of decisions from decades ago, and the cure is way worse than the disease.
- duped 10mo agoThe problem is not the APIs, it's symbol versions. You will routinely get loader errors when running software compiled against a newer glibc than what a system provides, even if the caller does not use any "new" APIs. glibc-based toolchains are ultimately missing a GLIBC_MIN_DEPLOYMENT_TARGET definition that gets passed to the linker so it knows which minimum version of glibc your software supports, similar to how Apple's toolchain lets you target older MacOS from a newer toolchain.
- Y_Y 10mo agoIn principle you can patch your binary to accept the old local version, though I don't remember ever getting it to work right. Anyway here it is for the brave or foolhardy, here's the gist: patchelf --set-interpreter /lib/ld-linux-x86-64.so.2 "$APP" patchelf --set-rpath /lib "$APP"
- dralley 10mo agoWhile true in many respects (still), it's worth pointing out that this take is 12 years old.
- senfiaj 10mo agoMaybe it's better now in some distros. Not sure about other distros, but I don't like Ubuntu's Snap package. Snap packages typically start slower, use more RAM, require sudo privileges to install, and run in an isolated environment only on systems with AppArmour. Snap also tends to slow things some at boot and shutdown. People report issues like theming mismatches, permissions/file-access friction. Firefox theming complaints are a common example. It's almost like running a docker container for each application. Flatpaks seem slightly better, but still a bandaid. Just nobody is going to fix the compatibility problems in Linux.
- Y_Y 10mo agoUbuntu was getting too good so it had to snap half of its value out of existence. You can still get firefox as a .deb though. https://launchpad.net/~mozillateam/+archive/ubuntu/ppa https://launchpad.net/~mozillateam/+archive/ubuntu/ppa
- lproven 10mo agoMozilla has been publishing official Firefox .DEB packages for over 2 years now. https://www.theregister.com/2023/11/01/official_mozilla_debian_firefox/ https://www.theregister.com/2023/11/01/official_mozilla_debi... No need for any Canonical packages at all -- works fine on Debian; I use them myself.
- josephg 10mo agoI think he still considers this to be the case. He was interviewed on Linus tech tips recently. And he bemoaned in passing the terrible application ecosystem on Linux. It makes sense. Every distribution wants to be in charge of what set of libraries are available on their platform. And they all have their own way to manage software. Developing applications on Linux that can be widely used across distributions is way more complex than it needs to be. I can just ship a binary for windows and macOS. For Linux, you need an rpm and a dpkg and so on. I use davinci resolve on Linux. The resolve developers only officially support Rocky Linux because anything else is too hard. I use it in Linux mint anyway. The application has no title bar and recording audio doesn’t work properly. Bleh.
- ori_b 10mo agoTo quote a friend; "Glibc is a waste of a perfectly good stable kernel ABI"
- microtonal 10mo agoAt least glibc uses versioned symbols. Hundreds of other widely-used open source libraries don't.
- ok123456 10mo agoVersioned glibc symbols are part of the reason that binaries aren't portable across Linux distributions and time.
- ben-schaaf 10mo agoOnly because people aren't putting in the effort to build their binaries properly. You need to link against the oldest glibc version that has all the symbols you need, and then your binary will actually work everywhere(*). * Except for non-glibc distributions of course.
- ok123456 10mo agoIf it requires effort to be correct, that's a bad design. Why doesn't the glibc use the version tag to do the appropriate mapping?
- mikkupikku 10mo agoI think even calling it a "design" is dubious. It's an attribute of these systems that arose out of the circumstance, nobody ever sat down and said it should be this way. Even Torvalds complaining about it doesn't mean it gets fixed, it's not analogous to Steve Jobs complaining about a thing because Torvalds is only in charge of one piece of the puzzle, and the whole image that emerges from all these different groups only loosely collaborating with each other isn't going to be anybody's ideal. In other words, the Linux desktop as a whole is a Bazaar, not Cathedral.
- BirAdam 10mo agoAppImage, theoretically, solves this problem (or FlatPak I guess). The issue would really be in getting people to package up dead/abandoned software.
- born-jre 10mo agoAppimage maybe, don’t say flatpak Cz wherever I update my arch system flatpak gets broken which I have to fix by updating or reinstalling
- scrivanodev 10mo agoI can only speak for Flatpak, but I found its packaging workflow and restricted runtime terrible to work with. Lots of undocumented/hard to find behaviour and very painful to integrate with existing package managers (e.g. vcpkg).
- yjftsjthsd-h 10mo agoYeah, flatpak has some good ideas, and they're even mostly well executed, but once you start trying to build your own flatpaks or look under the hood there's a lot of "magic". (Examples: Where do runtimes come from? I couldn't find any docs other than a note that says to not worry about it because you should never ever try to make your own, and I couldn't even figure out the git repos that appear to create the official ones. How do you build software? Well, mostly you plug it into the existing buildsystems and hope that works, though I mostly resorted to `buildsystem: simple` and doing it by hand.) For bonus points, I'm pretty sure 1. flatpaks are actually pretty conceptually simple; the whole base is in /usr and the whole app is in /app and that's it, and 2. the whole thing could have been a thin wrapper over docker/podman like x11docker taken in a slightly different direction.
- exceptione 10mo agoYou can build your own flatpak by wrapping bwrap, because that is what Flatpak does. Flatpak seems to have some "convenience things" like the various *-SDK packages, but I don't know how much convenience that provides. The flatpak ecosystem is problematic in that most packages are granted too much rights by default.
- ogogmad 10mo agoThis might be why OpenBSD looks attractive to some. Its kernel and all the different applications are fully integrated with each other -- no distros! It also tries to be simple, I believe, which makes it more secure and overall less buggy. To be honest, I think OSes are boring, and should have been that way since maybe 1995. The basic notions: multi-processing, context switching, tree-like file systems, multiple users, access privileges, haven't changed since 1970, and the more modern GUI stuff hasn't changed since at least the early '90s. Some design elements, like tree-like file systems, WIMP GUIs, per-user privileges, the fuzziness of what an "operating system" even is and its role, are perhaps even arbitrary, but can serve as a mature foundation for better-concieved ideas, such as: ZFS (which implements in a very well-engineered manner a tree-like data storage that's been standard since the '60s) can serve as a founation for Postgres (which implements a better-conceived relational design) I'm wondering why OSS - which according to one of its acolytes, makes all bugs shallow - couldn't make its flagship OS more stable and boring. It's produced an anarchy of packaging systems, breaking upgrades and updates, unstable glibc, desktop environments that are different and changing seemingly for the sake of it, sound that's kept breaking, power management iffiness, etc.
- josephg 10mo agoI like FreeBSD for the same reason. The whole system is sane and coherent. Illumos is the same. I wish either of those systems had the same hardware & software support. I’d swap my desktop over in a heartbeat if I could.
- rep_lodsb 10mo ago> tree-like file systems, multiple users, access privileges, Why should everything pretend to be a 1970s minicomputer shared by multiple users connected via teletypes? If there's one good idea in Unix-like systems that should be preserved, IMHO it's independent processes, possibly written in different languages, communicating with each other through file handles. These processes should be isolated from each other, and from access to arbitrary files and devices. But there should be a single privileged process, the "shell" (whether command line, TUI, or GUI), that is responsible for coordinating it all, by launching and passing handles to files/pipes to any other process, under control of the user. Could be done by typing file names, or selecting from a drop-down list, or by drag-and-drop. Other program arguments should be defined in some standard format so that e.g. a text based shell could auto-complete them like in VMS, and a graphical one could build a dialog box from the definition. I don't want to fiddle with permissions or user accounts, ever. It's my computer, and it should do what I tell it to, whether that's opening a text document in my home directory, or writing a disk image to the USB stick I just plugged in. Or even passing full control of some device to a VM running another operating system that has the appropriate drivers installed. But it should all be controlled by the user. Normal programs of course shouldn't be able to open "/dev/sdb", but neither should they be able to open "/home/foo/bar.txt". Outside of the program's own private directory, the only way to access anything should be via handles passed from the launching process, or some other standard protocol. And get rid of "everything is text". For a computer, parsing text is like for a human to read a book over the phone, with an illiterate person on the other end who can only describe the shape of each letter one by one. Every system-level language should support structs, and those are like telepathy in comparison. But no, that's scaaaary, hackers will overflow your buffers to turn your computer into a bomb and blow you to kingdom come! Yeah, not like there's ever been any vulnerability in text parsers, right? Making sure every special shell character is properly escaped is so easy! Sed and awk are the ideal way to manipulate structured data!
- RobotToaster 10mo agoIsn't the kernel responsible for the ABI?
- surajrmal 10mo agoABI is a far larger concept than the kernel UAPI. Remember that the OS includes a lot of things in userspace as well. Many of these things are not even stable between the various contemporary Linux distros, let alone older versions of them. This might include dbus services, fs layout, window manager integration, and all sorts of other things.
- tuna74 10mo agoYeah, it is almost like that complete OS should be called something else than "Linux".
- RobotToaster 10mo agoThanks
- fragmede 10mo agoWhat's interesting to think about is Conway's law and monorepos and the Linux kernel and userland. If it were all just one big repo, then making breaking changes, wouldn't. The whole ifconfig > ip debacle is an example of where one giant monorepo would have changed how things happened.
- CorrectHorseBat 10mo agoAndroid makes a sport of breaking ABI compatibly and it hasn't stopped it from being the most popular mobile OS
- pjmlp 10mo agoThe reason being JetPack libraries that abstract what Android version is being used.
- izacus 10mo agoThat's outright not true though.
- deleted 10mo ago[deleted]
- malmz 10mo agoWhat are you even talking about? Android is by far the most popular mobile OS worldwide. It's only in the US where iPhones are dominant.
- malmz 10mo agoNvm I can't read
- tsoukase 10mo agoUsing Arch Linux gets rid of all ABI annoyances: bleeding edge versions, everything compiled provided by the distro with signed packages, no incompatibilities all the way. Not to mention the support and docu. I don't know if I miss something.
- hulitu 10mo ago> the ABI compatibility is not good enough in Linux distros surely forced versioning of GLIBC didn't help. "This program requires GLIBC_2.33"
- account42 9mo agoIt did help for programs built by those who know what they are doing. It doesn't magically fix developer incompetence/ignorance.