Why do we need appimage when we can have single binary statically compiled executable?

Additionally, I can’t really understand why are dynamically linked libraries so popular and how on earth anyone who ever had a “.dll / .so not found” error thinks this is a good idea.

The main idea as far as I understand was to be able to share code which I think everyone knows work only in theory, besides would it not be easier to just recompile the executable from source with updated dependency statically linked?

Other idea behind dlls were that you could replace a dll with different dll as long as the api was compatible which is very unlikely scenario for average people.

Yet another possible advantage would be that the library code is shared so it takes less space on disk which might be true for some libraries which are very common but on the other hand static compilation only includes the part of library code that is used by the program so it takes less space anyway and is more optimized.

So the reasons to use the dlls can be easily dismissed.

About the disadvantages - if the dll is not present the program will not work. It’s quite simple and in my view if you create a program which does not work by itself then that’s a failure on your side.

The dlls are just nightmare most of the time, static compilation for the win. (pic for attention)

  • nyan@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    There is one case I can think of where statically linked binaries make sense: games. They’re almost always closed-source even on otherwise open-source systems, and so cannot be recompiled against newer library versions, and (for smaller indies especially) it isn’t unusual for the people who do have the code to close up shop and vanish off the face of the Internet. For those, it honestly is better for them to carry all their libraries around with them, even if it results in some binary bloat.

    For open-source software, dynamic linking isn’t usually an issue until some piece of software goes unmaintained for so long that it catches bit-rot.

    For software not in one of those two categories . . . well, maybe you ought to move off Windows?

    • UlrikHDA
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      For modding, it’s very useful to not have everything statically linked. DLSS swapping is probably the most prominent use case nowadays.