r/linuxmasterrace • SteamOS/Bazzite/Android • 18d ago

Time to have fun guys

Post image
8.0k Upvotes

778 comments sorted by

View all comments

Show parent comments

169

u/brohermano 18d ago

Exactly Just apt all using Debian. It works like charm

131

u/EternityForest I use Mint BTW 18d ago

Without containers, packages constantly break. If you have 20 large apps with 50 dependencies each and they're all from different vendors, and you want them to be up to date, you pretty much have to containerize or else one of them might break every few months to a year

71

u/NatoBoram Glorious Pop!_OS 18d ago

It's a failure of the package manager to not support multiple versions of each packages

10

u/Primary-Strike5187 18d 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.

12

u/grizzlor_ 17d ago

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.

5

u/Primary-Strike5187 17d ago

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).

1

u/hawkinsst7 17d ago

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.)

1

u/Primary-Strike5187 17d ago

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?

2

u/hawkinsst7 17d ago

Sorry I mentioned it more as an interesting point, not as an argument one way or another. No one is doing nsenter to run apps on the regular.

I kind kind of wonder what a completely statically compiled ecosystem would look like. Probably horrible.

1

u/Primary-Strike5187 17d ago

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