Earlier quoted context omitted.
At the rate things are going we'll need a container virtualization layer as well, a docker for docker if you know what I mean
"All problems in computer science can be solved by another level of indirection"
The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
101–110 of 215 posts
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#102So what we need is essentially a "libc virtualization". But 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 hac…
At the rate things are going we'll need a container virtualization layer as well, a docker for docker if you know what I mean
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#103Earlier quoted context omitted.
At the rate things are going we'll need a container virtualization layer as well, a docker for docker if you know what I mean
"All problems in computer science can be solved by another level of indirection"
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#104Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#105Earlier quoted context omitted.
Dynamic libraries have been frowned upon since their inception as being a terrible solution to a non-existent problem, generally amplifying binary sizes and harming performance. Some fun quotes of quite notable characters on the matter here: https://harmful.cat-v.org/software/dynamic-linking/ In practice, a statically linked system is often smaller than a meticulously dynamically linked one - while there are many cop…
Statically linked binaries are a huge security problem, as are containers, for the same reason. Vendors are too slow to patch. When dynamically linking against shared OS libraries, Updates are far quicker and easier. And as for the size advantage, just look at a typical Golang or Haskell program. Statically linked, two-digit megabytes, larger than my libc...
In decades of using and managing many kinds of computers I have seen only a handful of dynamic libraries for whom security updates have been useful, e.g. OpenSSL.
On the other hands, I have seen countless problems caused by updates of dynamic libraries that have broken various applications, not only on Linux, but even on Windows and even for Microsoft products, such as Visual Studio.
I have also seen a lot of space and time wasted by the necessity of having installed in the same system, by using various hacks, a great number of versions of the same dynamic library, in order to satisfy the conflicting requirements of various applications. I have also seen systems bricked by a faulty update of glibc, if they did not have any statically-linked rescue programs.
On Windows such problems are much less frequent only because a great number of applications bundle with the them, in their own directory, the desired versions of various dynamic libraries, and Windows is happy to load those libraries. On UNIX derivatives, this usually does not work as the dynamic linker searches only standard places for libraries.
Therefore, in my opinion static linking should always be the default, especially for something like the standard C library. Dynamic linking shall be reserved for some very special libraries, where there are strong arguments that this should be beneficial, i.e. that there really exists a need to upgrade the library without upgrading the main executable.
Golang is probably an anomaly. C-based programs are rarely much bigger when statically linked than when dynamically linked. Only using "printf" is typically implemented in such a way that it links a lot into any statically-linked program, so the C standard libraries intended for embedded computers typically have some special lightweight "printf" versions, to avoid this overhead.
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#106It's funny how people insist on wanting to link everything statically when shared libraries were specifically designed to have a better alternative. Even worse is containers, which has the disadvantage of both.
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#107Earlier quoted context omitted.
At the rate things are going we'll need a container virtualization layer as well, a docker for docker if you know what I mean
I'm building in this space, I take a docker inside a microvm (vm-lite) approach. https://github.com/smol-machines/smolvm
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#108Is 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
#109Earlier quoted context omitted.
Dynamic libraries have been frowned upon since their inception as being a terrible solution to a non-existent problem, generally amplifying binary sizes and harming performance. Some fun quotes of quite notable characters on the matter here: https://harmful.cat-v.org/software/dynamic-linking/ In practice, a statically linked system is often smaller than a meticulously dynamically linked one - while there are many cop…
Imagine a fully statically linked version of Debian. What happens when there’s a security update in a commonly used library? Am I supposed to redownload a rebuild of basically the entire distro every time this happens, or else what?
Re: The Holy Grail of Linux Binary Compatibility: Musl and Dlopen
#110Earlier quoted context omitted.
Cosmopolitan goes one further: [binaries] that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS on AMD64 and ARM64 https://justine.lol/cosmopolitan/
>Linux if you configure binfmt_misc >Windows if you disable Windows Defender >OpenBSD only older versions
> if you configure binfmt_misc
I don't think that's a requirement, it'll just fall back to the shell script bootstrap without it.