Remix.run Logo
kees99 3 days ago

Binary executable format is the same. But libc and dl (dynamic loader) libraries are different. You can install musl-specific versions of both on Debian, for example, like so:

  apt install musl
Binaries that don't use libraries, i.e. complied with "-static" option on GNU/Linux run just fine on musl/Linux (and vice versa).
blueflow 3 days ago | parent [-]

I did not feel to do a lecture about vdso's, dynamic linking and interpreters to a person who had to ask about musl.

If you like to copy statically linked binaries between musl and glibc systems, some day you will learn about libnss.

zoobab 3 days ago | parent | next [-]

http://stalinux.wikidot.com/

"Alpine Linux is good candidate, as Glibc static compilation is broken for political purposes, and Musl Libc allows static compilation."

"The GCC/Linux developer community is sold on shared library executables. They like shared libraries due to the reduced memory and disk footprints, as well as the concept that upgrading one shared library eventually automatically upgrades all applications which use that library. Consequently, information on statically linked programs is rather sparse."

https://web.archive.org/web/20170306062400/http://www.static...

3 days ago | parent [-]
[deleted]
dizhn 3 days ago | parent | prev [-]

I wasn't trying to copy binaries over but I found a very specific thing that doesn't work with musl and libnss. System Services Security Daemon (sssd) which coupled with authentik would have made automated ssh logins on remote servers a manageable thing cannot work on alpine. It does work on Void which made me think they must have solved the musl situation but no, apparently Void has a glibc variant and it only works there.

Interestingly there is an sssd package in alpine but it cannot work. https://gitlab.alpinelinux.org/alpine/aports/-/issues/16969

https://github.com/rustadopt/uzers-rs/issues/20 ("Now the bad news: I poked around a bit and believe the problem is that MUSL does not support sideloading the NSS plugins needed to retrieve things from SSSD like GLIBC does and thus does only ever read users from /etc/passwd, see: SSSD/sssd#6586")