Earlier quoted context omitted.
Why? Foss software also benefits from less dependency hell.
For distro-packaged FOSS, binary compatibility isn't really a problem. Distributions like Debian already resolve dependencies by building from source and keeping a coherent set of libraries. Security fixes and updates propagate naturally. Binary compatibility solutions mostly target cases where rebuilding isn't possible, typically closed source software. Freezing and bundling software dependencies ultimately creates…
The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
51–60 of 215 posts
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#52Earlier quoted context omitted.
AppImage looks like what I need, thanks. I wonder though, if I package say a .so file from nVidia, is that allowed by the license?
No, that's a copyright violation, and it won't run on AMD or Intel GPUs, or kernels with a different Nvidia driver version.
It makes me wonder, does the OS still take its job of hardware abstraction seriously these days?
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#53Is there a tool that takes an executable, collects all the required .so files and produces either a static executable, or a package that runs everywhere?
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#54Earlier quoted context omitted.
In my experience it seems to be an issue caused by optimizations in legacy code that relied on dlopen to implement a plugin system, or help with startup, since you could lazy load said plugins on demand and start faster. If you forego the requirement of a runtime plugin system, is there anything realistically preventing greenfield projects from just being fully statically linked, assuming their dependencies dont rely…
It becomes tricky when you need to use system DLLs like X11 or GL/Vulkan (so you need to use the 'hacks' described in the article to work around that) - the problem is that those system DLLs then bring a dynamically linked glibc into the process, so suddenly you have two C stdlibs running side by side and the question is whether this works just fine or causes subtle breakage under the hood (e.g. the reason why MUSL d…
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#55Earlier quoted context omitted.
You can "package" all .so files you need into one file, there are many tools which do this (like a zip file). But you can't take .so files and make one "static" binary out of them.
Well not a static binary in the sense that's commonly meant when speaking about static linking. But you can pack .so files into the executable as binary data and then dlopen the relevant memory ranges.
But I'm always a bit sceptical about such approaches. They are not universal. You still need glibc/musl to be the same on the target system. Also, if you compile againt new glibc version, but try to run on old glibc version, it might not work.
These are just strange and confusing from the end users' perspective.
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#56Earlier quoted context omitted.
Yup. Just compile it as static executable. Static binaries are very undervalued imo.
We had a time when static binaries where pretty much the only thing we had available. Here is an idea, lets go back to pure UNIX distros using static binaries with OS IPC for any kind of application dynamism, I bet it will work out great, after all it did for several years. Got to put that RAM to use.
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#57Earlier quoted context omitted.
No, that's a copyright violation, and it won't run on AMD or Intel GPUs, or kernels with a different Nvidia driver version.
But this ruins the entire idea of packaging software in a self-contained way, at least for a large class of programs. It makes me wonder, does the OS still take its job of hardware abstraction seriously these days?
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#58Is there a tool that takes an executable, collects all the required .so files and produces either a static executable, or a package that runs everywhere?
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#59That seems mostly useful for proprietary programs. I don't like it.
Yeah, in my 20 years of using and developing on GNU/Linux the only binary compatibility issues I experienced that I can think of now were related to either Adobe Flash, Adobe Reader or games. Adobe stuff is of the kind that you'd prefer to not exist at all rather than have it fixed (and today you largely can pretend that it never existed already), and the situation for games has been pretty much fixed by Steam runtim…
Basically the way for the year of the Linux desktop is to become Windows.
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#60But Musl is only available on Linux, isn't it? Cosmopolitan (https://github.com/jart/cosmopolitan) goes further and is available also on Mac and Windows, and it uses e.g. SIMD and other performance related improvements. Unfortunately, one has to cut through the marketing "magic" to find the main engineering value; stripping away the "polyglot" shell-script hacks and the "Actually Portable Executable" container (which are undoubtedly innovative), the core benefit proposition of Cosmopolitan is indeed a platform-agnostic, statically-linked C standard (plus some Posix) library that performs runtime system call translation, so to say "the Musl we have been waiting for".