Swapping libc Is an Archive-Wide ABI Break: The Casuarina Linux Post-Mortem
Casuarina Linux had a five-month life. The first complete build of main finished on 14 March 2026, the announcement went out on 16 May, and package updates...
The Fork Changed the Contract Under 1,786 Packages, Not the Packages
Casuarina Linux had a five-month life. The first complete build of main finished on 14 March 2026, the announcement went out on 16 May, and package updates stop at the end of October 2026. In between, Wesley Moore shipped a working rolling-release desktop built from Chimera Linux's userland with exactly one component replaced: musl became glibc.
Everything else was inherited. dinit as the supervising init, apk-tools as the package manager, the FreeBSD-derived chimerautils core utilities, the LLVM toolchain. On paper that is a one-dependency fork — the kind of change a distro maintainer makes in an afternoon and polishes for a week.
The one-dependency framing is the bug. A libc is not a package that sits next to other packages. It is the ABI contract that every binary in the archive was compiled against and will be resolved against at runtime. Replace it and you have not modified one entry in the repository; you have invalidated the build inputs of all of them, and the runtime assumptions of everything a user installs on top.
Casuarina archive, 1,786 packages
│
├── dinit, dinit-chimera inherited, C, links libc
├── apk-tools inherited, C, links libc + openssl
├── chimerautils inherited, C, links libc
├── LLVM toolchain inherited, C++, links libc + libc++
└── everything else inherited sources, REBUILT against glibc
│
└── glibc ← the only line that changed
The diagram is the whole post-mortem compressed. The fork's cost is not in the line that changed. It is in the fan-out: every package rebuild is a chance for a build failure, and every build failure lands on the one person who chose the change. Moore describes the outcome plainly — he expected that fighting through the bootstrap would be the hard part, and that maintenance would afterwards be "mostly updating packages." That expectation held for the C parts. It broke on the C++ parts, because libc and the C++ standard library are not independently swappable.
Two C++ Standard Libraries in One Image Is Not a Compatibility Feature
Chimera builds its entire archive against LLVM's libc++. That is a coherent choice: one toolchain, one C++ runtime, one ABI across 1,786 packages. Casuarina needed glibc for binary compatibility with third-party GNU/Linux software, and third-party software built for GNU/Linux is built against GNU's libstdc++. So the image had to carry both.
Carrying both is not the failure. Loading both into the same process is. libstdc++ and libc++ define the same standard types with different layouts and different symbol sets, and the linker has no way to tell you that a translation unit compiled against one is being linked against the other.
libstdc++ has a partial answer: the dual ABI introduced in GCC 5. After C++11 banned copy-on-write std::string, the GCC maintainers could not change the soname without breaking every existing binary, so they put the new types in an inline namespace — std::__cxx11::string — and kept the old symbols alive alongside. _GLIBCXX_USE_CXX11_ABI selects which declaration a translation unit sees. Two ABIs, two mangled names, coexistence.
It is a hack with a documented blast radius. The macro works when both sides of a boundary agree. Third-party libraries ship one ABI, not two, so a prebuilt .so compiled with _GLIBCXX_USE_CXX11_ABI=0 forces you to rebuild your own code with 0 as well, and the GCC manual's advice is exactly that: recompile with the old ABI or get linker errors mentioning __cxx11. The failure mode when the tagging is incomplete is worse than a linker error. GCC bug 118408 documents std::__detail::_Scanner — a helper template holding a std::basic_string member — lacking an ABI tag, so its member functions carry identical mangled names under both ABIs while operating on incompatible layouts. The linker merges them. Anything can follow.
# per-package, the question you must be able to answer
grep -E '^(makedepends|depends)=' APKBUILD
# makedepends="clang lld llvm-dev libc++-dev" -> libc++ world
# makedepends="gcc g++ libstdc++-dev" -> libstdc++ world
# and after the fact, on the installed image:
for b in /usr/bin/*; do
readelf -d "$b" 2>/dev/null | grep -q 'libstdc++' && echo "libstdc++: $b"
readelf -d "$b" 2>/dev/null | grep -q 'libc++' && echo "libc++: $b"
done
That loop is the audit you owe yourself before publishing a mixed-toolchain archive. If any executable pulls both, the archive has a latent ODR hazard and you have no test that will find it, because the crash requires a specific pair of code paths to run in the same process.
The honest engineering rule: the process, not the package, is the boundary for a C++ runtime. One stdlib per image if you can. If you cannot, put the odd one out behind a process boundary or a container, where symbol resolution cannot cross. Casuarina shipped both and relied on the observation that the one proprietary application exposed to the mismatch happened to work.
The Bootstrap Path Is the Bill You Pay for a libc Choice
glibc does not build itself with clang alone in this composition. Casuarina's own About page states the consequence in one sentence: "bootstrapping requires gcc, and GNU binutils in addition to LLVM." Reconstructing that means gmp, mpc, and mpfr come back into the bootstrap path too, because GCC is not buildable without them.
Chimera bootstrap: llvm -> clang -> (everything)
^ one toolchain to maintain
Casuarina bootstrap: llvm -> clang ─┐
gmp -> mpc ─┼-> gcc -> libstdc++ -> glibc -> (everything)
mpfr ──────────┘
binutils ────────┘
^ six components, two compilers, one of them
only present to build the libc
This is where the "just swap the libc" model falls apart as a maintenance proposition. A bootstrap path is not a build artifact you produce once and forget. On a rolling release it is re-entered constantly: a glibc point release, a GCC security fix, a binutils CVE, an mpfr ABI bump. Each of those is a build-graph node you now own, and each one can break the archive for reasons unrelated to the package you were actually trying to ship.
The failure classes multiply. A pure-LLVM bootstrap has one class of build failure: clang rejected something. A dual-toolchain bootstrap has clang rejecting something, GCC rejecting something, and — the expensive one — clang and GCC disagreeing about a header or a language rule while both accept it. The last class is invisible in CI until the specific package that hits the disagreement is rebuilt.
Moore's description of the four months after launch is consistent with this. He kept pulling package updates from Chimera and stayed on top of them. What he could not muster the motivation to do was address the C++ standard library situation or the other issues that surfaced. The bootstrap had been paid for. The interest on it had not.
The trade-off is worth naming precisely, because it is the same trade-off in every "fork upstream and change one foundational dependency" plan. You gain binary compatibility with a wider ecosystem. You lose the property that made the upstream tractable: a single toolchain whose bugs you can reason about as one system. Whether that is a good trade depends entirely on whether you have a second maintainer to absorb the second toolchain. Casuarina did not.
What the Swap Silently Cost: Static Binaries and Cross-Compilation
Two capabilities left the project without appearing in any feature list. Both matter operationally, and neither is recoverable by writing more packages.
The first is cross-compilation. Chimera supports it; Casuarina's docs list it as not yet supported. That is a direct consequence of the bootstrap rewrite — a cross toolchain is a second bootstrap path, and a dual-toolchain bootstrap is already the expensive part.
The second is fully static binaries, and it is the more interesting one. Under musl, static linking is an ordinary build flag. It is why apk can ship a static build, and why a musl system always has a package manager that runs even when the dynamic loader is broken. glibc degrades that path in a way that is easy to miss until you need it.
glibc resolves users, groups, and hosts through NSS modules — libnss_files, libnss_dns — loaded at runtime with dlopen. In a statically linked binary there is no loader to call, so those lookups are not guaranteed to work. GCC will tell you so, on every static build that touches them:
$ CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o probe ./cmd/probe
# command-line-arguments
/usr/bin/ld: /tmp/go-link-.../000000.o: in function `_cgo_..._C2':
warning: Using 'getaddrinfo' in statically linked applications
requires at runtime the shared libraries from the glibc version
used for linking
Read that warning as a specification, not noise. The binary is not self-contained. It requires the exact glibc shared objects it was linked against to be present at runtime — which defeats the entire purpose of a static build, namely running on a system whose libc is the thing that is broken.
# the recovery-tool test every distro should pass
$ file /usr/bin/apk.static
/usr/bin/apk.static: ELF 64-bit LSB executable, statically linked, stripped
$ ldd /usr/bin/apk.static
not a dynamic executable
$ chroot /mnt /usr/bin/apk.static --version
apk-tools 3.x
If ldd answers "not a dynamic executable" and the binary still runs inside a chroot over a half-broken root, you have a last-resort tool. If it answers with a list, you have a binary that depends on the thing you were trying to repair. This is not a purity argument about libc design; it is the difference between being able to fix a system and having to reinstall it. Casuarina's docs list fully static binaries among what was lost.
The transferable lesson is about how you evaluate a foundational-dependency swap. Enumerate the properties the current dependency provides implicitly — static linking, cross-compilation, one toolchain, one C++ ABI — and treat each as a feature with a maintenance cost, because that is what it is.
Governance Was the Failure Domain, and the Cheaper Path Was Available
Every technical problem above was solvable. The C++ runtime split had a known fix — drop libc++, rebuild the archive against libstdc++, accept the LLVM-only purity loss. The bootstrap was already working. What was not solvable by one person was the sum of them plus a growing queue of user-reported defects.
Moore states it directly: he became less convinced he wanted other people to use the system, because each additional user is another person who may bring legitimate problems he has not worked out how to fix, or does not want to allocate time to. Four months of daily driving produced no second maintainer. The project was declared experimental from the start, and the declaration turned out to be the accurate part.
This is the same failure domain as any single-owner repository, and it has a cheap measurement. Before publishing an archive, run it:
$ git shortlog -sne --since="6 months ago" | head -5
412 Wesley Moore <[email protected]>
38 q66 <q66@...> # upstream Chimera, not this fork
$ gh api repos/<org>/<repo>/contents/CODEOWNERS --jq '.content' \
| base64 -d | grep -c '^\*'
0
Two numbers decide the outcome: distinct committers with write access, and whether any ownership rule names a second human. A fork whose CODEOWNERS names one person is a project with a single point of failure that has not been scheduled yet — the same reasoning that makes [the owner field a runtime dependency](https://diama.dev/blog/the-owner-field-is-a-runtime-dependency-what-vims-succession-taught-open-source) rather than an administrative detail.
The cheaper alternative was on the table the whole time, and it came from the person who wrote the upstream. q66's response to the launch was not that glibc compatibility is impossible, but that the work belongs at a different layer: keep the musl archive coherent, and get the incompatible software through containers, or through packaging that isolates it. The framing that landed hardest was about direction of effort — improving what exists versus taking apart a carefully designed system and turning it into something it was built to avoid.
That is a layer-boundary argument, not a taste argument. A distro archive is an ABI-consistency claim. A container is a place where a different ABI claim can hold without contradicting the host's. Running one glibc container for the two proprietary binaries you need preserves 1,786 packages of single-toolchain coherence and costs you one runtime.
Forking the archive to fix two applications inverts that: it pays the full archive-wide cost to solve a per-application problem. Applying the same build-graph discipline as [building verifiable OS images](https://diama.dev/blog/why-we-chose-buck2-over-nix-to-build-verifiable-os-images) makes the accounting explicit — every node in the graph is either something you build and own, or something you inherit and trust. Changing the libc moves every node into the first category at once.
Casuarina's archive stays online, the package repo and website remain up, and the forum goes read-only. The system that gets the maintainer's next four months is Chimera — the same userland, the toolchain that already fit it, and an upstream with more than one person behind it.