Commit83e3bfa6Recorded31 Jul 2026Repositorycore-channel

Make the seed buildable again on musl hosts

Message

build-seed.sh has been unable to build GNU make 4.4.1 at all:

  ./src/dir.c:1362: error: no member named 'gl_opendir' in 'glob_t'
  (+ gl_readdir, gl_closedir, gl_lstat, gl_stat)

make's configure prints "checking if system libc has working GNU glob... yes" against musl, and that is a false positive. The check compiles and RUNS a glob program, which musl passes; but musl's globt has none of the GNU gl* function pointer members that make's dirsetupglob() then assigns unconditionally.

makecvsysgnuglob=no is the autoconf cache-variable escape hatch and forces make's own bundled gnulib glob. No source patch.

THIS BREAK IS PRE-EXISTING, and this commit is separated from the seed re-pin that follows it so a bisect can tell the two apart. Control run: build-seed.sh, verify-sources.sh and MANIFEST.sources restored to their pristine versions on main, in a separate copy of the repository, produce the identical five errors.

Two consequences worth recording, because both are worse than the build failure:

  * The pinned seed 894ca74b... could not be reproduced from its own script.
    The build dies before packaging, so there is not even a hash to compare
    against. The seed's determinism claim was unverifiable, not merely
    unverified.
  * seed/scripts/gate-crosspath.sh calls build-seed.sh twice, so it cannot have
    been passing either. Measured after this fix: two builds at different path
    depths produce byte-identical tarballs.

Why it started is not established. A zig toolchain bump changing which musl headers the check sees is the obvious candidate and is a hypothesis, not a finding.

Changed
 seed/scripts/build-seed.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Diff
seed/scripts/build-seed.shmodified
@@ -24,7 +24,16 @@ mkdir -p "$seed/out/bin"
24
tar -C "$work" -xf "$seed/sources/make-4.4.1.tar.lz"
25
(
26
cd "$work/make-4.4.1"
27
CC="$cc" AR="$ar" RANLIB="$ranlib" LD="$cc" CFLAGS="$map_flags" ./configure --disable-nls --without-guile --disable-dependency-tracking LDFLAGS="-static -s"
+27
# make_cv_sys_gnu_glob=no: configure's "checking if system libc has working
+28
# GNU glob" answers YES against musl, and that is a FALSE POSITIVE. The check
+29
# compiles and RUNS a glob program, which musl passes; but musl's `glob_t` has
+30
# none of the GNU `gl_opendir`/`gl_readdir`/`gl_closedir`/`gl_lstat`/`gl_stat`
+31
# members that make's `dir_setup_glob()` then assigns unconditionally, so the
+32
# build dies with five "no member named" errors in src/dir.c.
+33
#
+34
# This is an autoconf cache variable, i.e. the documented escape hatch, and it
+35
# forces make's own bundled gnulib glob instead. No source patch.
+36
make_cv_sys_gnu_glob=no CC="$cc" AR="$ar" RANLIB="$ranlib" LD="$cc" CFLAGS="$map_flags" ./configure --disable-nls --without-guile --disable-dependency-tracking LDFLAGS="-static -s"
37
CC="$cc" CFLAGS="$map_flags" ./build.sh
38
cp make "$work/bootstrap-make"
39
)