8000 glibc: the prebuilt seed keeps the bedrock sysroot (amd64 gcc seed's loader) by bryan-minimal · Pull Request #1211 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

glibc: the prebuilt seed keeps the bedrock sysroot (amd64 gcc seed's loader) - #1211

Merged
bryan-minimal merged 1 commit into
mainfrom
glibc-seed-bedrock-loader
Oct 31, 2026
Merged

bryan-minimal merged 1 commit into
mainfrom
glibc-seed-bedrock-loader

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Oct 30, 2026 •
Copy link
Copy Markdown
Member

Blocks every world rebuild on amd64, including this weekend's #983 and #1161–#1166.

Failure

pkgs#1162's build on 10-30 at 22:13Z failed in gcc's amd64 seed configure with C compiler cannot create executables. The lab repro's config.log shows the real error: /usr/bin/gcc: cannot execute: required file not found.

Cause

  • The compiler's loader. amd64's prebuilt gcc seed (gcc (prebuilt), bedrock root 617e2057…/gcc-15.2.0-glibc-15.2.0.tar.zst) has PT_INTERP = /usr/lib/glibc-bedrock-2.42/lib/ld-linux-x86-64.so.2. I read it from the binary in the root.
  • Where that loader is. The bedrock glibc root that glibc's replace_on_cycle extracts (d0850b65…/glibc-bedrock-2.42-2.42.tar.zst) contains it. I listed the tarball: it holds usr/lib/glibc-bedrock-2.42/lib/{ld-linux-x86-64.so.2,libc.so,libc.so.6,…}.
  • Why it's dropped. The seed's outputs = all_outputs only match top-level usr/lib/*.{so*,a}, crt*.o and so on, so the nested sysroot is thrown away. Nothing else in gcc's closure declares it. packages/glibc-bedrock-2.42 does, but it isn't a dep of gcc or of either seed.
  • Why it worked until now. Prod built this same seed spec successfully at 16:41Z the same day. So the tree was reaching the sandbox from somewhere undeclared on the res-server, and the cold start removed it. That hermeticity gap is for build-servers.
  • Why only amd64. arm64's seed gcc (stage0-gcc-15.2.0-glibc-aarch64) has PT_INTERP = /usr/lib/ld-linux-aarch64.so.1, which all_outputs already captures.

Fix

The seed's outputs become all_outputs & { bedrock_sysroot_lib = usr/lib/glibc-bedrock-2.42/lib/** }, the same glob packages/glibc-bedrock-2.42 uses. The sysroot is prefixed, so it shadows nothing in /usr/lib. This changes the glibc seed's spec, so everything rebuilds, which the weekend parade does anyway. This PR goes first; the world-rebuild PRs follow once it's green.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • The prebuilt glibc package now includes additional Bedrock sysroot library files and associated data, making these files available in the packaged output.

…loader)

amd64's prebuilt gcc seed is linked against the bedrock sysroot: its
PT_INTERP is /usr/lib/glibc-bedrock-2.42/lib/ld-linux-x86-64.so.2. The
bedrock glibc root ships that tree, but the seed's outputs (all_outputs)
only match top-level usr/lib files, so the loader never reached gcc's seed
sandbox: "/usr/bin/gcc: cannot execute: required file not found", which
configure reports as "C compiler cannot create executables" (pkgs#1162,
amd64, 2026-10-30). It had only worked while an undeclared copy of that
tree was present on the res-server. arm64's seed gcc uses the plain
/usr/lib/ld-linux-aarch64.so.1, which all_outputs already captures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 30, 2026 22:30
@coderabbitai
coderabbitai Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between af8e459 and f409ae3.

Files selected for processing: 1
  • packages/glibc/build.ncl

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Walkthrough

The glibc (prebuilt) build spec adds an OutputLib output for files under usr/lib/glibc-bedrock-2.42/lib/**. It allows data files in this output.

Changes: glibc sysroot output

Layer / File(s) Summary
Add sysroot library output
packages/glibc/build.ncl
The glibc (prebuilt) build spec adds a data-enabled OutputLib output for files under usr/lib/glibc-bedrock-2.42/lib/**.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related PRs

  • gominimal/pkgs#983: Changes the glibc (prebuilt) source archive, which determines whether the sysroot path added here exists.

Suggested reviewers: msample

Merge Risk: Minimal · up to f409a

No actionable merge-blocking risk remains; the sysroot output is correctly scoped and declared.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the glibc prebuilt seed and the bedrock sysroot retention for the amd64 GCC seed's loader. The change adds a bedrock_sysroot_lib output matching usr/lib/glibc-bedrock-2.42/lib/** to th…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the glibc prebuilt seed and the bedrock sysroot retention for the amd64 GCC seed's loader. The change adds a bedrock_sysroot_lib output matching usr/lib/glibc-bedrock-2.42/lib/** to the glibc (prebuilt) spec, which covers the main change. The title is specific and concise, and a teammate scanning history would understand the primary change. Its length (76 characters) is slightly long but acceptable.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 9622cde Oct 31, 2026
13 checks passed
@bryan-minimal
bryan-minimal deleted the glibc-seed-bedrock-loader branch October 31, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0