8000 runtime_deps: libraries 14 packages load but don't declare, with smoke tests (world rebuild) by bryan-minimal · Pull Request #1372 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

runtime_deps: libraries 14 packages load but don't declare, with smoke tests (world rebuild) - #1372

Open
bryan-minimal wants to merge 3 commits into
mainfrom
fix/runtime-deps-smoke-findings
Open

bryan-minimal wants to merge 3 commits into
mainfrom
fix/runtime-deps-smoke-findings

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Nov 6, 2026 •
Copy link
Copy Markdown
Member

Declares the shared libraries that 14 packages' binaries load but don't list in runtime_deps. Each package also gets the smoke test that found its gap.

Warning

This is a world rebuild. runtime_deps are in the spec hash, and zstd, pcre2, file and curl sit under the toolchain. It should land after #1351 (zlib 1.4), ideally together with #1357 (ghc hadrian retry), so the fleet rebuilds once more instead of twice. It was split out of #1351 so that #1351's running build-bot world build isn't changed underneath it.

Fixes

The standalone smoke-test sweeps ran each binary on arm64 with no base in the test closure: batch 1 was #820, and batch 2 is the run behind #1364–#1368. Every binary below exited 127, a loader failure, and ldd named the missing DT_NEEDED libraries.

package smoke test added to runtime_deps
curl curl --version 8000 zstd
file file --version zlib, zstd
libidn2 idn2 --version libunistring
nasm nasm -v zlib
pcre2 pcre2grep --version bzip2, zlib
zstd zstd --version zlib
rsync rsync --version lz4, xxhash, zstd
openssh ssh -V zlib
htop htop --version libcap
ghostscript gs --version bzip2
or-tools fzn-cp-sat --help (rc < 126) libgomp added to the existing subsetOf gcc [...]
libgd gdtopng (rc < 126) subsetOf gcc ["libgcc", "libstdcpp"]
diffoscope diffoscope --version file (libmagic)
dejagnu runtest --version expect

The shell-wrapped tests (or-tools, libgd, diffoscope) use test_deps = [bash-bootstrap] with /usr/bin/bash, not base. base drags in zlib, zstd, libmagic and libstdc++, which hides exactly these gaps. With base, libgd and diffoscope passed; without it they failed. The other tests are plain standaloneTest.

I checked that each new dependency's outputs provide the missing library: zlib.libz, zstd.libzstd, bzip2.libs, lz4.liblz4, xxhash.libs, libunistring.libs, libcap.libs, file.libmagic, expect.bins, and gcc's libgcc, libstdcpp and libgomp outputs.

Cycles

  • Leaf packages: none of the new edges from leaf packages creates a cycle. I checked this against the import graph, not just against runtime_deps, so the check over-approximates.
  • Low-level packages: the new edges do create cycles: file ↔ zstd (zstd already build-depends on file), plus file/zstd/pcre2 → zlib and pcre2 → bzip2. Every node on those cycles carries replace_on_cycle, so the resolver breaks them as it does for the rest of base-soup.
  • Possible gap: the bzip2 prebuilt declares outputs = {}. Inside a cycle where bzip2 itself gets replaced, pcre2 would see no libbz2. That only matters inside bzip2's own build closure.

Verification

Done:

  • nickel format on every changed file.
  • smoke_test_report.py: 14/14 covered.
  • Static import-graph cycle check.

Not done:

  • min check / min package build in a session. The local minimald stopped answering RPCs, so neither ran. CI's whole-repo mip dump evaluation on this PR is the first evaluation check.
  • Whether the added libraries clear the loader failures. That needs the world build; nothing here is cached.
  • The fzn-cp-sat binary name for or-tools comes from the smoke-test agents' findings, not from a run on this branch. If it isn't installed, its test fails with 127 and needs sat_runner instead.

Includes #1357 (ghc: retry hadrian once on the stamp-file lock race, cherry-picked as 3fbf593). The first world build of this branch failed on amd64 on that race (GHC #24365), and the two were planned to land as one world rebuild anyway. Merge this one and close #1357, or merge #1357 first; either way the ghc change lands once.

🤖 Generated with Claude Code

…with a smoke test

The standalone smoke-test sweeps (batch 1 = pkgs#820; batch 2 =
the run behind pkgs#1364-#1368) ran each package's
binary with no `base` in the test closure. On arm64 these exited 127
(loader failure); ldd named the undeclared DT_NEEDED libraries:

  curl         curl --version          + zstd
  file         file --version          + zlib, zstd
  libidn2      idn2 --version          + libunistring
  nasm         nasm -v                 + zlib
  pcre2        pcre2grep --version     + bzip2, zlib
  zstd         zstd --version          + zlib
  rsync        rsync --version         + lz4, xxhash, zstd
  openssh      ssh -V                  + zlib
  htop         htop --version          + libcap
  ghostscript  gs --version            + bzip2
  or-tools     fzn-cp-sat --help       gcc subset + libgomp
  libgd        gdtopng (rc < 126)      + subsetOf gcc [libgcc, libstdcpp]
  diffoscope   diffoscope --version    + file (libmagic)
  dejagnu      runtest --version       + expect

Each package gets the smoke test that found its gap. Shell-wrapped
tests use test_deps = [bash-bootstrap] + /usr/bin/bash, not base:
base drags in zlib/zstd/libmagic/libstdc++ and hides exactly these
gaps.

runtime_deps are in the spec hash and zstd/pcre2/file/curl sit under
the toolchain, so this is a world rebuild. The new edges add cycles
only among replace_on_cycle packages (file<->zstd, pcre2/zstd/file ->
zlib, pcre2 -> bzip2); the leaf additions add no cycles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner November 6, 2026 21:47
@coderabbitai
coderabbitai Bot commented Nov 6, 2026 •
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 18 billable files and costs up to $4.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 1 minute for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7a198f0 and 3fbf593.

Files selected for processing: 18

  • packages/at-spi2-core/build.ncl
  • packages/curl/build.ncl
  • packages/dejagnu/build.ncl
  • packages/diffoscope/build.ncl
  • packages/file/build.ncl
  • packages/freetype/build.ncl
  • packages/ghc/build.sh
  • packages/ghostscript/build.ncl
  • packages/harfbuzz/build.ncl
  • packages/htop/build.ncl
  • packages/libgd/build.ncl
  • packages/libidn2/build.ncl
  • packages/nasm/build.ncl
  • packages/openssh/build.ncl
  • packages/or-tools/build.ncl
  • packages/pcre2/build.ncl
  • packages/rsync/build.ncl
  • packages/zstd/build.ncl
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

bryan-minimal and others added 2 commits November 6, 2026 14:00
…smoke test

Two more findings from the library smoke-test sweep (pkgs#1373-1375):
- freetype: configure auto-detects bzip2 from the build closure, so
  libfreetype.so.6 NEEDS libbz2.so.1.0, but runtime_deps had only glibc and
  libpng. Linking -lharfbuzz failed on it. (zlib is probably in the same
  position but the test can't see it: toolchain carries zlib.)
- at-spi2-core: libatk-bridge-2.0.so NEEDS libatk-1.0.so.0; atk was missing
  (chromium-bin lists both, which hid it).
harfbuzz gets the compile-link-run test that was held back from #1373 until
freetype's fix lands with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parallel hadrian intermittently fails on a stamp file it is writing itself
("stamp-os-string-2.0.7-inplace_dyn: withFile: resource busy (file is
locked)", amd64, pkgs#1351 world build). Upstream GHC #24365, still open.

Run both hadrian invocations through run_hadrian, which tees the output to
a log and retries exactly once when that log contains "resource busy (file
is locked)". Any other failure, or the lock error twice, fails as before.
Shake resumes from .shake.database, so completed rules are not rerun and
flags and outputs are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant

0