Repository navigation
next: fix sharp FTBFS — glib dep + surface glib paths to native build (unblock #240 cascade) - #242
Conversation
…ndle) Bundled per the base-soup rule: binutils and coreutils are both in the circularly-dependent toolchain, so the cascading rebuild should land as one unit. glibc has an update available too but is intentionally deferred to a separate change. Both mirrored to gs://minimal-staging-archives and sha-verified against upstream ftp.gnu.org (.tar.xz): binutils-2.46.1.tar.xz e127a709... (matches upstream) coreutils-9.11.tar.xz 394024ed... (matches upstream) Note: coreutils' tarball was manually verified/corrected — pkgmgr's GNU-FTP listing parser resolved the .tar.gz when .tar.xz was also available, so the .xz here was re-mirrored + sha-checked by hand. Parser-preference fix is a separate pkgmgr follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…build) The base-soup bundle (#240) forced the first genuine rebuild of `next` since #161 — prior "builds" were cache hits. The rebuild compiles `sharp` from source against the system libvips, and libvips's public header `vips/vips8` #includes <glib-object.h>. `next` had libvips only as a runtime_dep (which does surface vips8 in the sandbox) but no glib, so glib's headers + glib-2.0.pc were absent and sharp FTBFS on both arches: /usr/include/vips/vips8:41:10: fatal error: glib-object.h: No such file glib is vips-cpp.pc's public `Requires`; the image-format libs (expat/jpeg/png/webp/lcms2) are `Requires.private` and aren't pulled in for a dynamic compile, so glib alone should satisfy the chain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughBumps binutils to 2.46.1, coreutils to 9.11, and libvips to 8.18.3 (updating their source sha256 checksums). Adds ChangesPackage dependency and version updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Adding glib to the dep list put its headers + glib-2.0.pc in the sandbox but the sharp compile still couldn't find <glib-object.h>: sharp finds our system libvips via `pkg-config vips-cpp`, and vips-cpp.pc lists glib under Requires.private — a non-static `pkg-config --cflags vips-cpp` (what node-gyp uses) doesn't expand private requires, so glib's -I/usr/include/glib-2.0 was never passed even though libvips's public header <vips/vips8> #includes <glib-object.h>. Export glib's include/lib dirs before `node install/build.js`. CPATH / LIBRARY_PATH are honored by gcc directly (independent of node-gyp's Makefile flag handling); CFLAGS/CXXFLAGS/LDFLAGS cover the conventional path. Built from `pkg-config glib-2.0 gobject-2.0`, pure-bash -I parse (no sed dependency in the sandbox). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
next's build.sh installs sharp unpinned (always latest); sharp 0.35.1 hard-requires libvips >= 8.18.3 (released 2026-06-09). Our package was pinned at 8.18.2, so once the glib include path was fixed the sharp native build hit its version assertion: common.h:23:2: error: "libvips version 8.18.3+ is required" sha256 verified against the upstream vips-8.18.3.tar.xz.sha256sum asset (f41285b6...). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Unblocks the
nextrebuild triggered by the base-soup bundle (#240). Three coupled fixes — next won't build without all three:packages/next/build.ncl— addglibtobuild_deps+runtime_deps(puts glib's headers,glib-2.0.pc,libglib.soin the sandbox/runtime closure).packages/next/build.sh— surface glib's include/lib paths to the sharp native compile.packages/libvips/build.ncl— bump 8.18.2 → 8.18.3 (sha verified against upstream.sha256sum).Why — latent FTBFS surfaced by the cascade (NOT a binutils/coreutils defect)
The bundle (#240) forced the toolchain closure to rebuild, including
next. This was the first genuine recompile ofnextsince #161; every build since was a cache hit — which is why it appeared fine recently. The true rebuild compilessharpfrom source against the system libvips, and exposed two pieces of accumulated drift. Diagnosed across three buildbot rounds, each error advancing past the last:(a)
glib-object.h: No such file— fixed by parts 1+2vips/vips8is a public libvips header that#includes<glib-object.h>, butvips-cpp.pclists glib underRequires.private. sharp's node-gyp build runs a non-staticpkg-config --cflags vips-cpp, which doesn't expand private requires — so glib's-I/usr/include/glib-2.0was never on the compile line. Adding glib to the deps put the headers in the sandbox;build.shnow exports them viaCPATH(read by gcc directly, independent of node-gyp's Makefile flag handling) +CXXFLAGS/LDFLAGS.(b)
"libvips version 8.18.3+ is required"— fixed by part 3With the headers found, the compile advanced to sharp's version assertion.
next/build.shinstallssharpunpinned (always latest); sharp 0.35.1 hard-requires libvips ≥ 8.18.3, released only 2026-06-09. Our package was pinned at 8.18.2 → assertion failure. Bumped to 8.18.3 (the version sharp'slibvips-cpp-8.18.3.stampexpects).Residual uncertainty (buildbot is the judge)
.nodeaddons usually tolerate undefined glib symbols (resolved at load via libvips → libglib) and I've addedLDFLAGSanyway. If link surfaces something, it's a one-line follow-up here.Follow-up worth filing (not in this PR)
next/build.sh'snpm install --ignore-scripts sharpis unpinned — this exact break (sharp bumps its min-libvips, we lag) will recur. Pinning sharp to a known-good version in the install line would make the build reproducible. Flagging for a separate hardening PR.🤖 Generated with Claude Code
Summary by CodeRabbit