• Samueru_sama@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    19 hours ago

    I want full-scale applications that are so big they have to use system libraries to keep their disk size down

    Linux is in such sad state that dynamic linking is abused to the point that it actually increases the storage usage. Just to name a few examples I know:

    most distros ship a full blown libLLVM.so, this library is a massive monolith used for a bunch of stuff, it is also used for compiling and here comes the issue, by default distros build this lib with support for the following targets:

    -- Targeting AArch64
    -- Targeting AMDGPU
    -- Targeting ARM
    -- Targeting AVR
    -- Targeting BPF
    -- Targeting Hexagon
    -- Targeting Lanai
    -- Targeting LoongArch
    -- Targeting Mips
    -- Targeting MSP430
    -- Targeting NVPTX
    -- Targeting PowerPC
    -- Targeting RISCV
    -- Targeting Sparc
    -- Targeting SystemZ
    -- Targeting VE
    -- Targeting WebAssembly
    -- Targeting X86
    -- Targeting XCore
    

    Gentoo used to offer you the option to limit the targets and make libLLVM.so much smaller, but now rust applications that link to llvm have issues with this with caused them to remove that feature…

    Another is libicudata, that’s a 30 MiB lib that all GTK applications end up linking to for nothing, because it is a dependency of libxml2, which distros override to build with icu support (by default this lib does not link to libicudata) and what’s more sad is that the depenency to libxml2 comes because of transitive dependency to libappstream, yes that appstream that I don’t even know why most applications would need to link to this.

    And then there is archlinux that for some reason builds libopus to be 5 MiB when most other distros have this lib <500 KiB

    Sure dynamic linking in the case of something like the coreutils, where you are going to have a bunch of small binaries makes sense, except you now have stuff like busybox which is a single static bin that acts as each of the different tools by checking the name of the symlink that launched it and it is very tiny at 1 MiB and it provides all your basic unix tools including a very good shell.

    Even Linus was surprised by how much dynamic linking is abused today: https://lore.kernel.org/lkml/CAHk-=whs8QZf3YnifdLv57+FhBi5_WeNTG1B-suOES=RcUSmQg@mail.gmail.com/

    To pick how I’m going to install something,

    https://github.com/ivan-hc/AM

    I have all these applications using 3.2 GIB of storage while the flatpak equivalent actually uses 14 GiB 💀: https://i.imgur.com/lvxjkTI.png

    flatpak is actually sold on the idea that shared dependencies are good, you have flatpak runtimes and different flatpaks can share, the problem here is that those runtimes are huge on their own, the gnome runtime is like 2.5 GiB which is very close to all those 57 applications I have as appimage and static binaries.

    but it doesn’t actually make it easier for me, it just makes it easier for the packager of the software

    Well I no longer have to worry about the following issue:

    • My application breaking because of a distro update, I actually now package kdeconnect as an appimage because a while ago it was broken for 2 months on archlinux. The only app I heavily rely from my distro now is distrobox.

    • I also get the latest updates and fixes as soon as upstream releases a new update, with distro packaging you are waiting a week at best to get updates. And I also heard some horror stories before from a dev where they were told that they had to wait to push an update for their distro package and the only way to speed it up was if it was a security fix.

    • And not only you have to make sure the app is available in your distro packages, you also have to make sure it is not abandoned, I had this issue with voidlinux when I discovered the deadbeef package was insanely out of date.

    • Another issue I have with distro packages in general is that everything needs elevated rights to be installed, I actually often hear this complains from linux newbies that they need to type sudo for everything and it doesn’t have to be this way, AM itself can be installed as appman which makes it able to work on your HOME with all its features. And you can take your HOME and drop it in any other distro and be ready to go as well.