
OpenWrt switches to musl by default, replacing uClibc - tomkwok
http://comments.gmane.org/gmane.comp.embedded.openwrt.devel/32651
======
tvon
For 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
I 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.

~~~
edwintorok
Its also useful for creating statically linked executables, which is usually
not possible with glibc if you use certain functions (getaddrinfo?).

~~~
nadams
I 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
IME you can statically link glibc, but your statically linked binary will
still call ld.so.

~~~
mcguire
The NSS stuff? And something else?

There's some specific things that are supposed to be modular library-wise.

~~~
edwintorok
I 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

------
markus2012
Rust 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)

------
buserror
musl has been getting quite a lot of traction recently. It's been added to the
last stable crosstool-ng toolchain builder as well.

------
MBCook
Does anyone know why they switched?

~~~
buserror
Faster, 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
I'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
Well, 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 :-(

------
ausjke
I wished it's in Openwrt's CC release, but anyway it's great news indeed.

------
NelsonMinar
Can someone who knows more about musl tell us about the state of automated
testing for it?

~~~
Alupis
[http://wiki.musl-libc.org/wiki/Libc-Test](http://wiki.musl-
libc.org/wiki/Libc-Test)

------
theandrewbailey
It's great that gmane displays monospaced text big enough so you don't need a
microscope to read it.

