Repository navigation
[CANARY — DO NOT MERGE] gcc 15.2.0 → 16.2.0 world build (pm#1182) - #1340
Draft
bryan-minimal wants to merge 32 commits into
Draft
bryan-minimal wants to merge 32 commits into
bryan-minimal wants to merge 32 commits into
Conversation
World-build canary to collect the gcc 16 FTBFS list. - version 16.2.0; source from mirrors.kernel.org (not yet mirrored to gs://minimal-staging-archives). sha256 e6738e29... matches the ftp.gnu.org tarball whose .sig verifies against Richard Biener's key 13975A70E63C361C73AE69EF6EEB81F8981C74C7 from the GNU keyring. - build.sh: gcc-16.2.0 dir names; drop the libgomp -Wno-error=discarded-qualifiers hatch (affinity-fmt.c:330 is `const char *q` in 16.2.0). - replace_on_cycle seeds unchanged (gcc 15.2.0 compiles gcc 16 once). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
…6 FTBFS) gcc 14.2.0's libcody does `words.emplace_back (u8"")`, which no longer compiles once the host compiler defaults to C++20 (u8"" is const char8_t[]). gcc 16.2.0's libcody casts it, so move the cross compiler to the same gcc release as the native one (latest-version policy) instead of pinning -std=gnu++17. - gcc 16.2.0: same tarball/sha256 as packages/gcc (e6738e29..., .sig verified against 13975A70E63C361C73AE69EF6EEB81F8981C74C7). - newlib 4.6.0.20260123: sha256 6ff27e3b...; its sha512 matches sourceware.org/pub/newlib/sha512.sum (newlib publishes no signature). - t-rmprofile is unchanged between 14.2.0 and 16.2.0 except the copyright year, so the multilib sed still applies; every newlib configure option the recipe passes still exists in 4.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gcc 16 adds -Wsfinae-incomplete and new -Wunused-but-set-variable / -Warray-bounds diagnostics that cbmc 6.11.0's -Werror build promotes to errors. Upstream fixed them in #9024 (merge 4b26409c, 2026-10-02), after 6.11.0, which is still the latest release and what Kani 0.68.0 pins, so carry that PR as a patch until the next release. It applies cleanly to the 6.11.0 tag (git apply --check) and is behaviour-neutral (warning-path cleanups and a dead counter), so it also builds under gcc 15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repack libgcc_s, libstdc++, libgomp, libatomic, libgfortran and (amd64) libquadmath from the gcc build dep, byte for byte, under gcc's output names, with runtime_deps [glibc]. A subsetOf gcc dep fetches the whole compiler and its runtime_deps; this does not. Own replace_on_cycle on the gen-13 gcc objects. Consumers are not migrated yet (gominimal/inbox#1261). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every other package record ends `} | BuildSpec`. Without it the record
has no `ty = 'Builder`, so `subsetOf gcc-runtime [...]` fails minimal's
Subsettable contract ("Expected Input type").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A subset fetches the parent's whole build artifact and pulls in its runtime_deps, so `subsetOf gcc ["libgcc"]` cost every consumer the whole compiler plus gmp, mpc, mpfr, zlib and zstd. - All 138 `subsetOf gcc` runtime sites (137 build.ncl files plus llvm/versioned.ncl, including boost's multi-line arch-match form) now take `subsetOf gcc-runtime` with the same outputs. That includes gmp, ncurses and binutils, which sit under base, coreutils and bash. The gcc import is dropped where nothing else uses it (123 files) and kept where build_deps or test_deps still do (15). - openblas: `libs` -> ["libgcc", "libgfortran"] plus libquadmath on amd64. stlink: `libs` -> ["libgcc"]. Both are marked TODO(readelf). - Whole-gcc runtime deps that only need the libraries: chromium-headless-shell-bin, helix, hex-patch, nushell, uv and zellij -> ["libgcc"], z3 -> ["libgcc", "libstdcpp"]. chromium is marked TODO(readelf both arches). - kani and verus-latest run the compiler, so their runtime gcc + binutils become `toolchain`, which both already import for build_deps. Their redundant gcc subset line is dropped. No `subsetOf gcc` remained in any build_deps, test_deps or replace_on_cycle block, so none was left behind. gcc, toolchain and gcc-arm-none-eabi are untouched. Each changed file is `nickel format` clean and evaluates on amd64 and arm64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This guard is blocking. It reads every .ncl under packages/ and fails on `subsetOf gcc` in any form, or on a whole `gcc`, inside a runtime_deps field. Breaker runtime_deps are included. The `gcc` it means is whatever identifier binds gcc/build.ncl, so a renamed binding or an inline import is still caught. Comments and strings are ignored, and gcc-runtime and gcc-arm-none-eabi don't match. Only `toolchain` may take whole gcc. The allowlist fails on a stale entry. Exit 2 (UNVERIFIED) means the tree is missing, or too few runtime_deps fields were parsed to trust the result. The unit tests include negative controls: every rejected form must be caught. Mutating the guard (its matcher, comment stripping, or the stale-entry check) turns them red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The subsets section said subsets exist "to avoid any user of a package needing to download a whole gcc". That is false. The client fetches the parent's whole artifact and cuts the subset out locally, and the closure takes in the parent's runtime_deps. The section now says so, and points to gcc-runtime and its guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libgfortran.so.5 is 8.35 MB, 64% of gcc-runtime (anvil, amd64), and only openblas (and numpy through it) loads it. A package is fetched whole, so every C/C++/Rust closure would download it for nothing. gcc-runtime-fortran repacks it from gcc and takes subsetOf gcc-runtime ["libgcc"] (+ libquadmath on amd64, which boost also uses, so it stays in gcc-runtime). openblas takes gcc-runtime ["libgcc"] and gcc-runtime-fortran ["libgfortran"]. Bryan approved the split (inbox#1261). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…annot fail Review on inbox#1261 (minimalboarding): - gcc-runtime's replace_on_cycle repacks the same gominimal/bootstrap objects as gcc's. Two copies drift on the next repin, leaving an older gcc's libstdc++ in roots beside the real gcc's. gcc_runtime_guard.py now fails when the two breakers' (url, sha256) pins differ or can't be read (3 tests; a one-character drift on the real tree fails). - cxx_exception_unwinds had gcc in test_deps, so gcc's own libstdc++ and libgcc_s answered it and it passed with gcc-runtime empty. Dropped; loads_without_gcc (bash-bootstrap only) is the test that proves the package. - Comments: output names (not globs) match gcc's; why the breaker has no runtime_deps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bryan's plan: develop gcc-runtime stacked, get one combined world-build signal from this canary, then land gcc-runtime as separate commits inside the real gcc 16 PR so the world rebuild is paid once. Merged, not rebased, to keep the canary's history without a force push. Brings pkgs main up to ca566dc and the gcc-runtime branch at d3ceedc (gcc-runtime, gcc-runtime-fortran, 138 consumers moved, gcc_runtime_guard.py, AGENTS.md). Clean merge; the guard passes and gcc, gcc-runtime(-fortran), openblas, gmp, ncurses, binutils, zellij and cbmc evaluate on both arches (local nickel). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From minimalboarding's read of minimal main 9396210bb (inbox#1261): - A pure prebuilt is extracted straight into its cache entry; output globs are not applied (crates/op/src/specs.rs materialize_prebuilt). So on a cycle edge gcc-runtime (prebuilt) is the whole gen-13 gcc tree, compiler included. A subset cuts only its globs (subsets.rs), but a whole gcc-runtime dep would link all of gcc 15.2 into that root. The guard now rejects a bare gcc-runtime in runtime_deps (whole-gcc-runtime rule, with a violation case and a multi-line subset clean case). - subsets.rs unwraps the requested output, so asking the breaker for an output it does not declare panics. It now declares libquadmath on amd64, matching the real spec (the amd64 object ships it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 16 canary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Published llvm 23.1.5 (amd64, pkgs ca566dc): libLLVM.so.23.1, lld and llvm-config NEED libzstd.so.1, but llvm never declared zstd. It arrived only because `subsetOf gcc` inherits gcc's runtime_deps (gmp, mpc, mpfr, zlib, zstd). gcc-runtime does not, so after the migration clang, lld, rustc and anything loading libLLVM would fail in a closure without zstd. Found by minimalboarding from the artifact's ELF dynamic section. llvm/versioned.ncl (llvm-21/22/23) gets the same dep. A fleet-wide audit of the same class is running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same class as llvm (inbox#1261), from minimalboarding's DT_NEEDED audit of the ca566dc amd64 artifacts against the branch closures: - python: lib-dynload/_zstd NEEDs libzstd.so.1. It arrived via bash -> ncurses -> subsetOf gcc -> gcc's runtime_deps; with ncurses on gcc-runtime, `import compression.zstd` would fail. zstd is already on the gcc bootstrap cycle (gcc depends on it; it has a prebuilt breaker). - llvm-bootstrap: clang-21 and its tools NEED libzstd.so.1. Build-closure tools audited clean: gawk(-bootstrap), coreutils, perl, cmake, binutils, rust, rustc-1.98.1, make, tar, grep, sed, bash, ninja, meson, pkgconf, toolchain, glibc and others. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…16 canary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
minimalboarding's DT_NEEDED audit of all 145 migrated packages (amd64, ca566dc artifacts) found five more binaries that load a library their recipe never declared, hidden by subsetOf gcc inheriting gcc's runtime_deps: - usr/bin/lsd, usr/bin/tuicr, usr/bin/teamtype, usr/bin/nu: libz.so.1 - mesa usr/lib/libgallium-26.3.0.so: libzstd.so.1 These are latent bugs on main too; the declared dep is correct either way. The other 137 audited packages are clean on the eight gcc-inherited sonames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…: zstd Second audit pass (indirect gcc consumers, amd64 ca566dc artifacts): - usr/bin/cabal NEEDs libz.so.1; it came via gmp -> subsetOf gcc. cabal is in the build closure of every Haskell package. - gcc-arm-none-eabi's cc1/lto1/lto-dump NEED libgmp, libmpfr, libmpc and libzstd; a compiler that never declared a compiler's deps. They came via bash -> ncurses -> subsetOf gcc. zlib still comes through binutils-arm-none-eabi. - mariadb usr/lib/plugin/zstd.so NEEDs libzstd.so.1 (optional plugin). Latent on main as well (inbox#1261). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cc 16 canary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
usr/bin/stack NEEDs libz.so.1; it came only through gmp -> subsetOf gcc, like cabal. Last hit of minimalboarding's two-pass DT_NEEDED audit (301 packages with a published amd64 artifact; 12 recipes needed a declaration, plus mariadb's optional plugin; 287 clean). inbox#1261. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gcc 16's libstdc++ no longer pulls <cstdint> in transitively, so bindings/c c_workloads failed with "'uint64_t' does not name a type" on both arches (canary run 2b69a34d). Fail closed if the include is missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The import-line checker failed it in the lab run at 126686e. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 34ab070b) - libvpx, maki, hex-patch take libstdcpp; gn, ninja take libgcc. Each loaded the library it did not declare: subsetOf gcc fetched the whole compiler and hid the gap, gcc-runtime ships only the declared outputs. - gcc-runtime ships libssp (stlink's binaries and libstlink NEED libssp.so.0). - boost declares openssl (libboost_cobalt_io_ssl NEEDs libssl/libcrypto.so.4). - import lines: canonical order for chromium-headless-shell-bin, nushell, hex-patch; kani and verus-latest no longer import an unused subsetOf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gcc 16 defaults to gnu++20, so abseil pinned ABSL_OPTION_USE_STD_ORDERING 1 into the installed options.h and -std=c++17 consumers failed on std::partial_ordering (canary run 34ab070b). Pin C++17 (what gcc 15 built) and fail closed unless options.h pins ORDERING 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 7e4acbc4 built gcc-runtime twice (breaker pass, then real) and the
{libgcc, libstdcpp} subset stayed pinned to the gcc 15 breaker-pass repack
(minimal orchestrator state.rs:396-426, per minimalboarding), so
mathlib-oleans loaded a libstdc++ without GLIBCXX_3.4.35. With the real
gcc-runtime cached, this run should cut every subset from it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gcc-runtime's build root also holds its own cycle breaker (a bootstrap gcc, via gcc -> gmp -> gcc-runtime), and first-wins by spec-hash order picks between the two gccs' usr/lib files. On arm64 the gcc 16 canary (pkgs#1340 run 7e4acbc4) shipped the gen-13 gcc 15 libstdc++.so.6 and libgcc_s.so.1, and lean failed on GLIBCXX_3.4.35. - gcc stages its shared runtime libraries again under usr/lib/gcc-runtime-stage, a path no bootstrap object ships. - gcc-runtime and gcc-runtime-fortran copy from there (stage.sh). With no stage, gcc is the breaker (first pass of the cycle) and they copy usr/lib as before. - Either way each versioned library must have exactly one real file and its SONAME must link to it, so mixed gccs fail the build. - The guard keeps the two stage.sh copies byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d168779c) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than
68EC
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.
Caution
CANARY. DO NOT MERGE, DO NOT APPROVE, NEVER ADD TO THE MERGE QUEUE.
This PR exists only so build-bot runs a full world build with gcc 16.2.0 as the default compiler. It is a draft on purpose and will be closed once the FTBFS list is collected. The real flip will be a separate, human-authored PR queued alone.
Update 2026-11-14: gcc-runtime merged in (gominimal/inbox#1261)
Bryan's plan: develop the gcc-runtime split stacked, take one combined world-build signal from this canary, then land gcc-runtime as separate commits inside the real gcc 16 PR, so the world rebuild is paid once. Branch
gcc-runtimeis merged into this canary (merged, not rebased, so there's no force push). This also brings pkgs main up to ca566dc.The merge adds:
packages/gcc-runtime: gcc's shared runtime libraries (libgcc_s, libstdc++, libgomp, libatomic, amd64 libquadmath), repacked byte for byte from gcc under gcc's output names, with runtime_deps[glibc]and its own prebuilt breaker on the same gen-13 objects as gcc's.packages/gcc-runtime-fortran: libgfortran, for openblas only.subsetOf gcc [...]runtime deps moved tosubsetOf gcc-runtime [...], gmp, ncurses and binutils included. Seven whole-gcc runtime deps moved to library subsets; kani and verus-latest moved totoolchain..github/scripts/gcc_runtime_guard.py: rejects a runtime gcc subset, a whole gcc (toolchain excepted), or a whole gcc-runtime, and requires gcc-runtime's breaker pins to equal gcc's.Why: a subset fetches the parent's whole artifact and inherits its runtime_deps. So every libgcc consumer downloaded all of gcc (anvil amd64: 341.6 MiB unpacked / 116 MiB zstd) for libraries now about 4 MiB.
What to look at in this run, beyond the gcc 16 FTBFS list:
# TODO(readelf)edges are chromium-headless-shell-bin, openblas and stlink.libstdc++.so.6/libgcc_s.so.1. Layers link first-wins in cache-path order, so a root holding real gcc 16 and the 15.2-object gcc-runtime breaker could load 15.2's libstdc++ (missing GLIBCXX versions). Any hit should be listed. See gominimal/inbox#1226.Purpose
Step 4 of gominimal/pkgmgr-rs#1182: collect the complete list of packages that fail to build (FTBFS) when the default compiler
packages/gccmoves from 15.2.0 to 16.2.0. gcc is in every package's reverse import closure (616/616), so this PR rebuilds the whole world.What changed
Only
packages/gcc/:build.nclversionis now 16.2.0.https://mirrors.kernel.org/gnu/gcc/gcc-16.2.0/gcc-16.2.0.tar.xz, sha256e6738e29597f733270731aa90600f37ffdc045079dfc27ec7e8192cc81085c3e.build.shgcc-16.2.0directory names replace the hardcodedgcc-15.2.0.-Wno-error=discarded-qualifiershatch is dropped (the CFLAGS/CXXFLAGS/*_FOR_TARGETexports and their comment).libgomp/affinity-fmt.c:330is alreadyconst char *qin 16.2.0.replace_on_cycleseeds (gcc-15.2.0) stay as they are. gcc 16 is compiled once by the 15.2 seed, and gcc 16 needs only a C++14 host.lib64sed targets int-linux64/t-aarch64-linuxare still present.Source verification: the tarball's sha256 is identical from ftp.gnu.org and mirrors.kernel.org. Its
gcc-16.2.0.tar.xz.sigverifies against GCC release key13975A70E63C361C73AE69EF6EEB81F8981C74C7(Richard Biener) fromgnu-keyring.gpg.sqtherefore only authenticates it with--policy-as-of 2014-01-01.data/signing_policies.tomlever covers gcc.⚠ Mirroring needed before any real flip. Every other gcc source lives at
gs://minimal-staging-archives/gcc-%{version}.tar.xz. This canary points at upstream because the tarball could not be uploaded from here. The flip PR must mirror it first and restore the gs:// URL.Deliberately left alone (track for the flip)
stacks/make/stack.nclstill applies-Wno-error=discarded-qualifiersfleet-wide. It is documented as durable because it is about glibc 2.43+ headers, not gcc.gcc-arm-none-eabi: 14.2.0. libcodyu8/ char8_t, plus the safe-ctype vs<memory>poisoning. The fix is to bump it to ≥ 14.4.0.cbmc6.11.0 (andkani): upstream-Werrorhitssfinae-incomplete/unused-but-set-variable. The fix is to backport Fix GCC 16 warning-as-error build failures diffblue/cbmc#9024.Local sanity build: not done
I couldn't run a local
min package build gccfirst, so gcc 16.2.0 itself is unproven until this run. Activating apkgbuildsession on this worktree means rebuildingbase's closure, because gcc changed. That rebuild needs the bedrock prebuilt seeds (gcc (prebuilt),zlib (prebuilt)) fromgs://minimal-staging-archives. minvmd 0.7.3-rc1's node-plane egress baseline drops those connections (dropped a node-plane frame ... toward an address no baseline entry pinned), so session spawn failed withcannot connect to endpointon storage.googleapis.com.If the bot fails on
gccitself, it fails early and cheaply, and I'll fix it on this branch.How results will be triaged
operator!=)-WerrorwarningsAC_PROG_CXXdowngrade probe-lgcc_s_asneeded)-Wno-error=/-std=pin) that also builds under 15.2.FTBFS log (running)
The bot stops an arch's whole run at the first failed package (the minimal orchestrator aborts on the first error and has no keep-going mode), so failures surface one per run. Each fix is one commit on this branch, so it can be cherry-picked into its own PR.
u8""into std::string (gcc 14.2.0 source)-Wsfinae-incomplete/-Wunused-but-set-variable/-Warray-boundsunder-Werror🤖 Generated with Claude Code