Duck! Another blag incoming!

Alpine Linux building a musl distro


This is the long awaited Alpine Linux talk.


  • run diskless
  • install from scratch ram-disk
  • router, firewall, vpn, proxy, void



  • First build Gentto
  • uLibc


  • Selfhosting

Issues with ulibc

  • code based is old
  • required upstream patches

musl libc

  • active development
  • clean modern codebase
  • stable ABI
  • Correctness
  • UTF-8


  • How much would break
  • Hidden bugs
  • would upstream take patches

How did it go

  • Very well
  • Work with musl-libc
  • Correct can be annoying
  • POSIX compat patches we accepted in upstream
  • Code gets better to make things working with musl

Watch out for

  • There is no __MUSL__
  • Default thread stack size 80k (glibc 8mb)
  • Format strings are a bit different (glibc extensions are evil)
  • Don't use strerror_r
  • Always check for the exception platform not the common
  • DNS resolver no chaining, but parallelism
  • DNS resolver is always consistent
  • Rely on this things is a bad idea anyways

This entry was tagged as distributions fosdem