Repository navigation
ci(glibc): enforce the manylinux_2_17 symbol floor on PR-time Linux builds (#1629) - #1778
Merged
Merged
Conversation
The manylinux_2_17 tag is assigned from a filename map in ci/publish.py, and `cargo check` never links, so a too-new glibc symbol survives every PR gate and only fails in the release cross-link lane (libc::memfd_create, 2.27+). Add ci/check_glibc_floor.py, which reads a linked ELF's dynamic symbol table and fails on any GLIBC_ version above the floor, naming the symbols that need it. Wire it into check-ubuntu.yml as a new glibc-floor job that cross-links release fbuild-cli + fbuild-daemon for x86_64 and aarch64 under soldr's glibc-2.17 sysroot, with its own build-cache generation. Tests cover numeric version ordering, per-version symbol attribution, the at-floor/above-floor boundary, and the CLI's 0/1/2 exit codes.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
zackees
pushed a commit
that referenced
this pull request
Oct 29, 2026
The POSIX literals `/home/one/blink` and `/home/two/other-blink` are not absolute on Windows, so `normalize_signature_value` left the `-fdebug-prefix-map` flag verbatim and the two projects hashed differently -- the exact opposite of the cross-project cache sharing the test exists to pin. Anchoring both under std::env::temp_dir() keeps the intent and is absolute on every host. Merging origin/main also brings #1778's glibc floor guard, whose `ci/test_check_glibc_floor.py` the shared lane imports (it was missing from this branch's base, which is why the glibc lane failed with ModuleNotFoundError).
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.
Implements part 1 of #1629: a PR-time guard for the
manylinux_2_17promise.Why
ci/publish.pyassigns the manylinux tag from a filename map, not by measuringthe artifact, and
cargo checknever links. So a binary can require a newerglibc than the wheel claims and nothing notices until the release cross-link —
which is exactly how
libc::memfd_create(glibc 2.27+) reached a green PR andonly failed in the release lane (#1629).
What
ci/check_glibc_floor.py— reads a linked ELF withobjdump -T, collectsevery
GLIBC_x.yrequirement and the symbols that demand it, and exits 1 whenthe maximum exceeds
--floor(default2.17). It names the offending symbolsso the fix is obvious (
memfd_create,statx,copy_file_range, ...).Exit 2 is reserved for "could not inspect" (missing file, no objdump, no
GLIBC_versions at all) so a broken artifact can never read as a pass.ci/test_check_glibc_floor.py— 10 tests: numeric (not lexical) versionordering, per-version symbol attribution, at-floor passes, above-floor
reports only the too-new versions, and three end-to-end CLI runs through a
fake
objdumpcovering exit 0, 1 and 2..github/workflows/check-ubuntu.yml— newglibc-floorjob (existingworkflow file, no new one). It
soldr prepares + cross-links releasefbuild-cliandfbuild-daemonforx86_64-unknown-linux-gnuandaarch64-unknown-linux-gnu, then runs the guard over all four artifacts. Owncache-key-suffix: glibc-floorso it neither competes with nor poisons thetest job's build-cache generation.
agents/docs/cross-compilation.md— points at the gate, and records thata host-native debug binary is not a valid input (it links the host glibc).
Validation
uv run --no-project ruff format --check ci/check_glibc_floor.py ci/test_check_glibc_floor.py→ cleanuv run --no-project ruff check ci/→All checks passed!python -m unittest ci.test_check_glibc_floor→Ran 10 tests ... OKpython -m unittest ci.test_fractional_workflows ci.test_workflow_concurrency ci.test_no_legacy_cross→Ran 36 tests ... OKci/check_python_complexity.py→ passed;ci/find_direct_subprocess.py --fail→ 0 unallowlisted;ci/check_usb_vidpid_literals.py→ passed;ci/check_test_layout.py→ okGuard run against a real ELF (
objdump -T, host-native debugfbuild) →correctly reports
max GLIBC_2.39 TOO NEW, exit 1, namingpidfd_getpid/pidfd_spawnp(2.39),statx(2.28),getrandom(2.25), etc.Real artifact validation on this branch, cross-linked exactly as the new
CI job does (
soldr prepare+soldr build --release --target <t> -p fbuild-daemon), then measured with the guard:aarch64-unknown-linux-gnuOK, exit 0x86_64-unknown-linux-gnuOK, exit 0That reproduces glibc 2.17 (manylinux_2_17) floor is only enforced at release link time; add a PR guard and decide on multi-manylinux wheels #1629's measured table (2.17 / 2.16) and proves the guard
reads a real soldr-sysroot artifact rather than only fixtures.
Not included
manylinux_2_28alongside2_17) needs a maintainerdecision on wheel tagging; left open.
Closes part 1 of #1629.