Re:Alpine Linux does not make the news
by physicsguy on Wednesday July 26, 2023 @02:08AM
(#36873668)
I get where you’re coming from but it’s impractical for many use cases to switch.
I work in Python; pretty much no extension packages have a pre-compiled Musl version so you end up spending a ton of time compiling things!
https://pythonspeed.com/articles/alpine-docker-python/
>Using Alpine can make Python Docker builds 50× slower
Musl is a dire mistake.
My experience with musl has been that while it’ll most probably work, you’re severely at risk of a 30%+ perf degradation, and that means the juice is really not worth the squeeze.
glibc shouldn’t be statically compiled in because it’s lgpl and so immediately infects your code if you do.
The zig linker is quite nice here because it lets you pick what glibc you want to be compatible with.
Re:Alpine Linux does not make the news
by CodesInChaos on Wednesday July 26, 2023 @03:41AM
(#36874270)
> you’re severely at risk of a 30%+ perf degradation
Do you know if that's mainly due to the inefficient malloc, or if there are other important performance bottlenecks?
The `[[gnu::optimize()]]` attribute is a fantastic feature that clang really should have some day.
Glibc is also such a mess that it still does not compile with Clang, after _decades_, due to all the crazy GCC extensions they rely on. An attempt is cyclically started and the aborted when some new crazy nonsense is found. For instance, last time I checked they not only used the completely insane folly that GCC nested functions are, but they also relied on GCC attributes so nasty that LLVM never bothered implemented them (like renaming functions at code generation). Using these extensions are not really necessary, and I've a strong suspicious it was more of an attempt by the GNU authors to prevent distributions to ever consider not using GCC as their main compiler.
Also how name resolution is implemented in Glibc means you can't really statically link with it. If you've ever noticed, most "statically linked executables" are not in fact statically linked, but require ld.so just for libc. There are good reasons to disallow statically linking libc, but this is not one of them. Especially since the only stable API on Linux is the kernel interface, so the only way to not have to worry about future Glibc breakage is to either link with Musl or live with the risk.