5 ms·
OpenWrt switches to musl by default, replacing uClibc
- buserror 11y agomusl has been getting quite a lot of traction recently. It's been added to the last stable crosstool-ng toolchain builder as well.
- markus2012 11y agoRust also has experimental support for MUSL as of April: https://github.com/rust-lang/rust/pull/24777 https://github.com/rust-lang/rust/pull/24777
- tvon 11y agoFor the uninitiated, these are libc libraries for embedded systems (alternatives to glibc). http://www.musl-libc.org/intro.html http://www.musl-libc.org/intro.html http://www.uclibc.org/about.html http://www.uclibc.org/about.html
- throwaway2048 11y agoI wouldn't say that musl is particularly aimed at embedded stuff, simply that its small enough to fit most times. It is a full featured, fast C library.
- vezzy-fnord 11y agoIndeed, musl is more about correctness/standards compliance and robustness than targeting any specific platforms (provided it's Linux).
- justincormack 11y agoWell there are some non Linux ports too now - Midipix for Windows, and some bare metal implementations.
- edwintorok 11y agoIts also useful for creating statically linked executables, which is usually not possible with glibc if you use certain functions (getaddrinfo?).
- nadams 11y agoI always thought you could statically link glibc - but your executable will be huge as it needs to pull in the entire plus extras. Regardless - I'm glad I'm not the only one who is concerned about binary sizes.
- alanpost 11y agoIME you can statically link glibc, but your statically linked binary will still call ld.so.
- mcguire 11y agoThe NSS stuff? And something else? There's some specific things that are supposed to be modular library-wise.
- edwintorok 11y agoI think you usually get a warning at link-time if you try to statically link GCC and use a function that requires matching libc version at runtime, getaddrinfo was the one I remembered but there are certainly more functions like that: x.c:(.text+0x85): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
- Alupis 11y ago> I wouldn't say that musl is particularly aimed at embedded stuff, simply that its small enough to fit most times. Maybe it's not particularly aimed at embedded stuff, but it sure does fit well. I've used it in 3 embedded projects recently, with great results. The only issue I've run into when trying to use musl is there are a lot of softwares out there that expect glibc, and refuse to run without (even though it probably would work). The Oracle JDK/JRE for ARM is an example, you must compile the OpenJDK from scratch to get it to use musl. Otherwise, it's a fantastic libc. It's fast to compile, it's tiny in size, and is feature-complete enough for most of my purposes.
- theandrewbailey 11y agoIt's great that gmane displays monospaced text big enough so you don't need a microscope to read it.
- ausjke 11y agoI wished it's in Openwrt's CC release, but anyway it's great news indeed.
- MBCook 11y agoDoes anyone know why they switched?
- buserror 11y agoFaster, neater, smaller, etc? it's also handy to make statically linked systems/executables; sometime for very small applications, you mostly need the kernel, a small busybox and ONE executable; you can make really small 'distros' like that, especially when linked with LTO.
- tlrobinson 11y agoI've been wondering, is there a good package manager for busybox-based distros? It would be nice to have a tiny system by default but be able to easily install other packages when necessary, for debugging or whatever.
- buserror 11y agoWell, as a matter of fact, OpenWrt is probably the smallest you will get with a 'package manager'. It's really quite well made for that purpose. They have 'package install', they have 'full upgrade' and they also have an overlay filesystem to make changes to what is technically a read only system.... Personally, I prefer a tiny, very compact ROM style filesystem; if I need a package, I just rebuild it with it, and reboot. I'm the author of minifs: https://github.com/buserror/minifs https://github.com/buserror/minifs that is made to do just that. However, we're reaching the point where the kernel is so full of crud that it is in itself the bloatware, and far worse than the userland :-(
- hga 11y agoI'm rather fond of Alpine Linux (https://www.alpinelinux.org/ https://www.alpinelinux.org/), but echoing buserror, I doubt it's as small as OpenWrt.
- NelsonMinar 11y agoCan someone who knows more about musl tell us about the state of automated testing for it?
- Alupis 11y agohttp://wiki.musl-libc.org/wiki/Libc-Test http://wiki.musl-libc.org/wiki/Libc-Test