fix(ci): build Linux glibc binary against an older glibc - #426
Merged
Conversation
The x86_64-unknown-linux-gnu target was pinned to the cross `edge` image, which tracks cross's main branch and is now Ubuntu 24.04 / glibc 2.39. The released binary therefore required GLIBC_2.38 (`__isoc23_strtol` and `__isoc23_sscanf`, emitted by gcc 13) and GLIBC_2.39 (`pidfd_spawnp` and `pidfd_getpid`, from std's process spawning), so it failed to start on every distro older than Ubuntu 24.04 — including Debian 12, which ships glibc 2.36 and is supported until 2028. Pin that one target to the released 0.2.5 image (Ubuntu 16.04 / glibc 2.23), which brings the floor down to GLIBC_2.18. The musl targets are statically linked, so `edge` stays where it is for them. Fixes #420
ReviewSmall, well-scoped CI fix — looks good to merge. Code quality
Potential issues
Testing
Notes
🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #420.
The bug
Cross.tomlpinned thex86_64-unknown-linux-gnutarget to the crossedgeimage.edgetracks cross'smainbranch, which is now Ubuntu 24.04 / glibc 2.39, so the released binary picked up four symbols no older distro provides:__isoc23_strtol,__isoc23_sscanfpidfd_spawnp,pidfd_getpidDebian 12 ships glibc 2.36 and is supported until 2028, so
cookstopped starting there entirely:The
edgepin came from bc6f054 (Sep 2025) as a blanket change across all targets. It's harmless for the musl targets — they're statically linked — but for glibc it silently raised the runtime floor to Ubuntu 24.04, and only bit users once the upstream image drifted. This was never a deliberate decision to drop older distros.The fix
Pin that one target to the released
0.2.5image (Ubuntu 16.04 / glibc 2.23) and add a comment explaining why it must not followedge. musl and freebsd are left onedge.Verification
Ran the real
cross build --release --locked --target x86_64-unknown-linux-gnuagainst the0.2.5image locally on an Intel host (clean target dir, 11m49s). Despite the image's gcc 5.4,aws-lc-sys,libsqlite3-sysandringall compile fine.The binary's glibc floor drops from 2.39 to 2.18. Smoke-tested
cook --versionin containers:debian:12debian:11ubuntu:20.04ubuntu:22.04rockylinux:9For contrast, the shipped v0.33.0 asset reproduces the report exactly on
debian:12.cargo fmt --check,cargo clippy --all-targetsandcargo testall pass clean.Notes
cook-x86_64-unknown-linux-musl.tar.gzin the meantime — it's static and runs on Debian 12 today.cook updateneeds no code change, butsrc/update.rs:118-123routes every non-musl Linux to the GNU asset, so affected users can't self-update out of this — they need one manual re-download once a fixed release ships..gnu.version_ragainst a chosen floor, so this can't regress silently again. Not included here.