Too many libraries

The libiberty library is a collection of subroutines used by various GNU programs. It is available under the Library General Public License; for more information, see Library Copying.

It is quite hard to understand if you ever need libiberty, a horrible name for the sake of a pun (you link against it by using -liberty with gcc). Still, that doesn’t say anything about what it does. Why anyone needs it is a mystery – at least for me. Trying to find out what exactly does it provide is quite difficult – but you get to see it from time to time.

Linux executables generally link against a plethora of libraries. You can check this for yourself, using ldd. Depending on the technology used, you get to have a lot of surprises. I do understand the need for shared libraries, things like libc or stdc++ are useful foundations that you can build on. But the typical Linux system has over 1000 libraries installed, and a myriad of optional libraries that are missing. One technique is to have your program written as a shared library and the executable is a simple call to the functionality in the shared library – and this is nice, because it allows reuse of that functionality, but that generates a ton of libraries that usually get installed in your /usr/lib{64} folder.

If you browse the 2400+ files that get installed there you won’t be able to recognize their usefulness. They look like magic files that have to be there. Your system must have them, you’re not allowed to touch them. And you ask yourself when did you install all that crap? But you didn’t – a minimalist distribution has about 200 packages that get installed and the standard distribution, maybe around 1000. Complexity explodes, and you wonder why. Or you don’t, and you’ll simply throw that issue to the garbage.

But we should no longer be this shy about asking these questions. Let’s admit it – this sort of fragmentation is not helping anyone. Maybe it’s helping the developers, a bit – but not that much, especially since it’s hard to know what the system offers. There are too many libraries.

So what a distribution creator should do is try to put together as many as these things as possible. Example: there’s no need for a libtinfo, it could be merged in ncurses. You don’t need bugs like this one. For every strange library the only thing I can find is “libwhatever missing from package whatever” – no documentation, no nothing. That’s why I say: focus on what you want to offer. Do you want terminal-driven applications? Fine, install the terminal applications support. One library, and that’s all. You want a UI driven distribution? Why is there an ls for a user that only wants to browse the internet? You don’t need that.

You say it’s about freedom, but it’s not. It’s about the totalitarian tendencies of the developers society, nothing else. They cannot imagine a Linux distribution without a ls. But, mind you, how often do you need ls in your Android phone? And that’s how garbage gets thrown together, in a mindless manner, complexity out of control. Because that’s what happens when you have a hierarchy of 1000+ packages. It’s just a pile of garbage with stuff nobody wants anymore.

Let’s change that. Let’s take the distribution from developers and make it a product. Make it work for users. Users don’t need bash, don’t need to edit configuration files. They truly don’t need that. System administrators do, but not the users. So here’s my idea.

Offer one monolithic “system” package. The upgrade is a solved issue – RPM supports deltas that will allow you to patch urgently an issue. Merge libraries and offer one set of APIs. One package. One UI. Multiple toolkits, but shipped as singular packages. People want applications that work, they don’t care about frameworks or toolkits, about designed subcomponents. They are really not interested in what’s under the hood of their car. They want things that work, first and foremost. And that’s what this fragmentation is not able to offer them. Linux systems are just like the old Dacia 1300 – it requires the user to have solid knowledge of car manufacturing if they really want to get from point A to point B.

But that’s not what the user wants. The user doesn’t want to care if they have libiberty installed and if they have the proper version of it. They just want that application to work. They want less complexity, more results.

ComputerProgramming


Comments

Too many libraries — 6 Comments

  1. Library/Lesser GPL is a great and reasonable license, IMO, until you have to deal with the dynamic linking requirement.

    DLL Hell, and I don’t really see situations where it’s helpful.

    • LGPL doesn’t really justify fragmentation – but the fragmented nature of the community does. Everyone has their own small object of focus, and it’s too small. The result is DLL Hell redivivus, indeed.

  2. “It’s just a pile of garbage with stuff nobody wants anymore.”

    I’d say that for most of the users that want a system they don’t care about what’s there. For example Windows 10 must have a similar number of dlls and again, (almost) nobody cares.

    “Let’s change that. Let’s take the distribution from developers and make it a product. Make it work for users.”

    You lost me here. Do you mean that Ubuntu for ~10 years now doesn’t offer a Linux distro for the users? I’ve installed Ubuntu + Skype to an old lady 6 years ago and she had no issues with it. It was the first OS that she has seen. I don’t think she ever looked in /lib /usr/lib & friends. It just worked. And it didn’t occupy that much space; if that’s you concern in the age of cheap storage.

    “It is quite hard to understand if you ever need libiberty, a horrible name for the sake of a pun (you link against it by using -liberty with gcc). Still, that doesn’t say anything about what it does.”

    I’m sure the regular user uses compilers and debuggers so this library must be known by every linux user. If they don’t know it, they should be hanged… of course.

    “But the typical Linux system has over 1000 libraries installed, and a myriad of optional libraries that are missing.”

    Could you be more specific? What is missing from a distro? Why would the user give a damn if it works?! They may have 1 million libs, who’s bothered if the system works (we have ldconfig to cache them so access is ok)?

    Package dependency should solve all the issues of “missing” libraries. There are some rare cases where package dependency has some issues.

    “If you browse the 2400+ files that get installed there you won’t be able to recognize their usefulness.”

    Why in the world would you do that? Every decent distro has a package manager that tells you what’s installed or not. Even Windows has this since 95 I guess (although package dependency was/is an issue under Windows).

    “Why is there an ls for a user that only wants to browse the internet? You don’t need that.”

    If you have the time waste (I mean it) you can try remove the console binaries. You will want them back instantly since linux boot process depends on them. It’s just the way it was designed. If you would remove them you would waste a lot of time with zero benefits (except experience). And they occupy less than 30-40MB so there is no gain, even for (nowadays) constrained systems. I remember Nimblex distro that was < 100MB and had a KDE desktop. Nice project, it’s now probably dead but Bogdan (the creator) surely learned something.

    My advice is to contribute to an existing product, not starting implementing yet another “great idea” that turns not to meet anyone’s expectations. You will just add to that “fragmentation” that you mentioned.

    • 1) Most user don’t want to care. They have to care when things don’t work as expected.
      2) Ubuntu does not offer a consistent user experience at the level of Windows.
      3) The old lady is always invoked – but the old lady would’ve been happier with an iPad.
      4) Yes, I could be more specific, even if I won’t be.
      5) Not everything is packed by your distributor. In fact, not everyone uses your favorite distribution. That makes me unwilling to write software for your system – because I have to make too many packages.
      6) If you don’t need the 2400+ files just remove them. They occupy space. And all the package managers are plain stupid. I am still wondering what the heck the libiberty package does, and why is that shite over there.
      7) Can you please not mind my time? It’s mine to mind, thank you very much.
      8) I don’t care what Bogdan learnt.
      9) My advice is to stop giving advice to people unwilling to hear it. Especially if you have no idea why I wrote this post.

Comentariul tău