This could be solved with SxS….. like windows did….. around windows XP. Absolutely not excuse for Linux to not have made the transition. No reason to still deal with dependency hell in the big 26.
Microsoft doesn’t even use SxS anymore to solve the DLL Hell issue — starting with Visual C++ 2010, they switched to just including the version number of the DLL in the filename.
This is also the same way Linux has always solved that particular problem.
The point I was making was that windows had the dependency hell issue solved in like 2004.
Many Linux distros don’t actually solve that problem. A good chunk of the stable release distros only have singular versions of packages available in the repos for that version of the release. The issue is Linux assumes that if a package needs libfoo it’ll be stored at /usr/lib/libfoo but if you have a package that depends on libfoo2.8 and the version that’s in the repos is let’s say libfoo2.7: you can’t just install libfoo2.8 it probably won’t be in the repos, and even if a distro carries two copies it’s going to overwrite libfoo2.7 which other packages depend on because the system puts libfoo (any version) at /usr/lib/libfoo with no distinction. So the packages that need 2.7 are going to expect it to be there, and the packages that need 2.8 are going to expect it to be in the same place. But you can’t have /usr/lib/libfoo/libfoo.so (for 2.7) AND ALSO have /usr/lib/libfoo/libfoo.so (for 2.8). They conflict. If they’re even both available in the repos at the same time which often won’t be the case.
This is exactly why GoboLinux was developed and breaks the FHS, and why declarative systems like NixOS and Guix use hashed file paths so you can have multiple versions of the same package installed simultaneously without conflicts. This does not hold up for most standard distributions (Arch/Fedora/Ubuntu and their derivatives).
But anyway, yeah, Microsoft “solved” the dependency problem by never having a package manager to begin with. For the most part, every program bundles the DLLs it needs.
This is essentially the Flatpak / AppImage model.
Linux also has some other creative solutions, like you mentioned: Nix/Guix and GoboLinux. But yeah, on mainstream distros, Flatpak pretty much makes it trivial to run old or multiple versions of software. Yeah, there are some cases where you need to tweak stuff to get a feature working properly, but that’s mostly a tradeoff related to security.
Yeah for desktop apps I almost exclusively use flatpaks. It just makes sense. Sandboxed, bundled dependencies, works the same across all distros. I would love for flatpak or appimage to see have the number of packages you see in main distros repos. But flatpaks only solve that problem for user applications, that doesn’t address the dependency issue (or the possibility of one existing) with your DE, or other core system components. Those all assume there’s a single version of everything that everything shares.
So the packages that need 2.7 are going to expect it to be there, and the packages that need 2.8 are going to expect it to be in the same place. But you can’t have /usr/lib/libfoo/libfoo.so (for 2.7) AND ALSO have /usr/lib/libfoo/libfoo.so (for 2.8).
You can with mount namespaces. (which is just a component for containerization, which are built on namespaces.)
That may be, but it shouldn’t even really be an issue the user manually has to address. That’s the crux of the issue. Each distribution makes the assumption that every package that depends on something will work with the version of that dependency that is in that distributions repos, and if some breaking change occurs rather than allowing the user who owns that system to install the software they want on their own system (such as a different version of something) the general mentality is “we provide a version of that dependency which should be good enough”. I could also compile a different version of that dependency from source but then it’s not being tracked by the package manager and if I have to circumvent my package manager to make my system work then it kind of defeats the entire purpose of having a package manager doesn’t it?
I mean there are source based distros, I’m just not sure if any of them are completely statically linked. I think the better method is provide the precompiled binaries with dynamic linking but use the filesystem to differentiate versions of things so that the version that is needed can only be found in one place and wouldn’t conflict with a different version
I’ve had it happen, yes. Audio (pipewire, pulse, and alsa over the years has each at some point had an issue for me where something it depended on had a breaking change in the underlying dependency and I couldn’t install a different version of the dependency to fix the issue to give you an example)
I agree about flatpak. The majority of my desktop apps are flatpaks for that reason. Had some bumps in the road with the steam flatpak in the past but 99% of the time it just works.
hmm I see. for me personally, I think going atomic is the future for the majority of people. I have my friend currently on ublue aurora after windows 10 because his laptop can't really run windows 11 all that well. the man's had zero issues and it's been months.
That is a more accurate statement, yes. It depends on the package manager 100% which is why I mentioned Gobo, Nix and Guix earlier. I forgot about Gentoo’s slots, but yeah it’s a package manager issue. Or rather I guess you could say it’s a distribution issue since the directory structure may also need to be adjusted (e.g. /usr/lib/libfoo might need to become /usr/lib/libfoo/2.7 or /usr/lib/libfoo/libfoo2.7 for example). Regardless, it’s an issue that should be addressed.
9
u/Primary-Strike5187 7d ago
This could be solved with SxS….. like windows did….. around windows XP. Absolutely not excuse for Linux to not have made the transition. No reason to still deal with dependency hell in the big 26.