Browse documentation

Linux release binaries start on the glibc of the website's build image

Date: 2026-12-03 Area: build, website Related: #2574, ADR 0182, ADR 0247

Context

The website's build runs the linux-x64 GocciaRunner and GocciaTestRunner of every version it vendors to read the flags they advertise (website/scripts/fetch-binaries.ts). It offers a version in the playground, and that version's WebAssembly modules in the browser, only when both advertise --deny-read. The build runs on Vercel's build image, Amazon Linux 2023, whose glibc is 2.34.

A dynamically linked binary binds each glibc symbol at the newest version that the libraries it was linked against define, and a glibc older than that version refuses to start it. CI links the Linux targets against pinned glibc libraries rather than the runner's own: Ubuntu 22.04's (glibc 2.35) for x86_64 and 18.04's for aarch64. Up to 0.17.0 the x86_64 binaries bound nothing newer than GLIBC_2.34. The engine that replaced the old interpreter in #2187 computes a two-argument Math.hypot with libm's hypot (Goccia.CMath), and glibc 2.35 gave hypot a new version, GLIBC_2.35, when it dropped the function's SVID error-handling wrapper. The 0.18.0 and nightly linux-x64 binaries therefore need glibc 2.35, cannot start in the website's build, and the playground lost them and its browser engine (#2574). Nothing failed when that happened.

Decision

  • x86_64 links against Ubuntu 20.04's glibc libraries (glibc 2.31). Every symbol binds at a version that glibc 2.31 defines: hypot at GLIBC_2.2.5, and exp, log, log2 and pow at GLIBC_2.29, as before. Each x86_64 binary needs glibc 2.29. aarch64 keeps Ubuntu 18.04's and needs glibc 2.17.
  • The build fails when a Linux binary needs more than its target allows. .github/scripts/check-glibc-floor.sh holds each Linux target's limit and its reason: 2.34 for x86_64, the glibc of the website's build image, and 2.17 for aarch64, which docs/build-system.md promises. ci.yml's build job runs it on every staged Linux binary before upload, so neither the tagged release nor the nightly, which publishes only builds that passed CI, can ship a binary over the limit.
  • The website's build reports a vendored binary that cannot start. It names the binary and gives the loader's message, and it probes the binaries again on every build, cached or not, since whether they start depends on the build machine as well as the binary.

The results do not change. In glibc 2.35 and later, hypot@GLIBC_2.2.5 is a wrapper that calls the same __ieee754_hypot that hypot@GLIBC_2.35 names, and the two differ only in how they report a finite overflow, whose result is infinity either way. Both links of the same source computed 265,728 Math results bit for bit alike on glibc 2.39. On a glibc older than 2.35, hypot is that glibc's own, as every other libm function already is.

Rejected:

  • Computing hypot with FdlibmHypot on Linux. It is another algorithm, so results could change, and it removes only this symbol: the next function glibc versions anew would bring the failure back.
  • Binding hypot@GLIBC_2.2.5 by name. It names a per-architecture version (GLIBC_2.17 on aarch64) in the source, and also covers one symbol only.
  • Building the Linux targets in an older distribution's container. The build already links against pinned libraries instead of the build host's; an older set of them has the same effect without a new build environment.

Consequences

  • The linux-x64 binaries start on glibc 2.29 and later, such as Ubuntu 20.04, Debian 11, RHEL 9 and Amazon Linux 2023, where 0.18.0 needed 2.35.
  • Raising a limit is a decision of its own: change its line in check-glibc-floor.sh together with the reason beside it, and check what the website's build runs on.
  • The playground still leaves out a version whose binaries cannot start in the website's build; the build log says which binary and why.