4 ms·
"Most likely, you will end up with five different bugs scattered throughout your system with many different libraries that really should be just one." Actually
by randallsquared 17y ago
"Most likely, you will end up with five different bugs scattered throughout your system with many different libraries that really should be just one."
Actually, I prefer the five. When you have a shared library, and bugs are fixed, applications that use the library might well break. Shared libraries mean that either applications are at risk of completely failing to work, or that the library developers have to flag the bugfix as a new version to avoid that. Either way, incompatible bugfixes require application updates anyway, so you might as well avoid the breakage and use static libraries.
It seems to me that the only good non-mirage reason for shared libraries was disk space usage, and that's just not a problem any more. Down with shared libraries and dependency hell, I say! ;)
- senko 17y ago> It seems to me that the only good non-mirage reason for shared libraries was disk space usage. Shared libraries are shared in memory too. If you have 5 separate copies of libfoo and you start up applications using them, you'll have 5 copies of libfoo in memory too. And memory is much scarcer resource than disk space.
- AlisdairO 17y agoTrue, although code memory space consumption is not the issue it once was. The consumption of most of the big hogs (web browsers, word processors, etc) is data-related.
- windsurfer 17y agoXulrunner takes 40 megs on a good day...
- randallsquared 17y agoSo, pretty trivial, except on mobile, you agree?
- windsurfer 17y agoNot if you have Miro, Songbird, Firefox and Celtx all running, which isn't unheard of. Also, that's not including the gigantic libraries that Songbird and Miro might share (as they are both media apps) but also the smaller ones.
- duairc 17y agoWith a proper package manager, applications won't break with the ugprade of a shared library, because their dependencies will be such that the new shared library will conflict with the application (or, what usually happens, a new build of the application against that shared library is uploaded to the repository at the same time as the library). Sometimes the packaging of a program has bugs in it though, so the situation you describe sometimes happens, but I've only ever seen it happen when I'm installing random Ubuntu packages in my Debian install though. So, yes, while you're right that shared libraries can sometimes cause the problems you describe, a good package manager will pretty much fix them. But what I love the most about Linux though is that if something bad like that happens (like the ABI of a shared library changing)... it's a minor inconvenience, but so what? apt-get source $package cd $package-$version apt-get build-dep $package dpkg-buildpackage cd .. dpkg -i *.deb And bam, you just rebuild the program against the new shared library with the different ABI, and everything works. Obviously this isn't "user friendly", but then again I never had to do this before I started mixing packages from different OSes together. And isn't it so easy to do! You can just do that for any program in on your whole computer! "Hmmm, I wonder how this program works", and one command later you have its source code! Another command later and you've built all of that code, into a nice Debian package too. It's so wonderful to have such a powerful package manager.
- randallsquared 17y agoIt used to be really easy to junk a Debian system by installing random apps to try them and then uninstalling them. Even with more modern Debian-based systems like Ubuntu, installing and then uninstalling something (say, kubuntu-desktop, to pick an example that happened to me recently) does not leave your system in the same state it was before you started. Instead, you get (to a GUI user) bizarre random configuration changes, and programs that worked may now not work (or vice versa!). Basically, as someone who switched back to Linux from Mac recently, Synaptic and the Software Center (and why there are two tools that show different-but-overlapping package sets is another WTF) are full of surprises and why-did-THAT-change?! moments.
- rbanffy 17y ago