I think that the problem of static vs dynamic linking would be much easier to solve if "dynamic linking" wouldn't mean "you can only have one version of this lib on your system".

This inevitably leads to cases when piece of software X needs lib2.1 but Y needs lib1.3 and everything breaks.

I wish programs could just describe the soecific verion they need, and if it's already on my system - great. If there's another version of that lib - install the required one alongside the one that's already there.

Why isn't this a thing?

Follow

@kuba But that's how dynamic libraries work in large part? This is why we have the major version number in soname (tldp.org/HOWTO/Program-Library). If you linked against libfoo.so.5, the dynamic linker will search for libfoo.so.5 and it's of no concern to it that libfoo.so.1 or libfoo.so.51234 exist.

One issue is when you need libX.so.1 and libY.so.5, but the installed version of libY needs libX.so.2. Sometimes this could work, but doesn't due to the flat namespace of symbols (this is the problem that glibs tries to combat by symbol versioning). But in some cases this can't work even in principle: if you want to pass objects from X to Y, you _need_ to use the same version of X.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.