| ▲ | mvdtnz 3 days ago |
| What's "musl"? This article doesn't seem to define it, unless I missed it. |
|
| ▲ | TheAdamist 3 days ago | parent | next [-] |
| Its an alternative libc instead of gnu. I've generally seen it for embedded systems due to smaller size and you can statically link it. But there are some compatibility drawbacks for non musl binaries as well as source that intentionally or unintentionally relies on glibc behavior or non standard functionality. You don't want to mix and match your libc's on a running system. Buildroot may be a good way to start to play with musl (or uClibc, another small c library). |
| |
| ▲ | hoosieree 3 days ago | parent | next [-] | | I found building musl easier than uClibc, Xephyr, newlib, or (especially) glibc. Glibc is an Ouroboros of hacks at build time. | |
| ▲ | pjmlp 3 days ago | parent | prev [-] | | Also a good example of what happens when trying to write portable C code, even when constrained to UNIX/POSIX platforms. |
|
|
| ▲ | Intermernet 3 days ago | parent | prev | next [-] |
| https://wikipedia.org/wiki/Musl |
|
| ▲ | blueflow 3 days ago | parent | prev [-] |
| In practice it means that the executable format is different, that binaries from GNU/Linux won't run on Alpine normally and reverse. |
| |
| ▲ | kees99 3 days ago | parent [-] | | 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... | | | |
| ▲ | 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") |
|
|
|