◐ Off-By-One · answer catalog

gnu-make-userspace-bootstrap-on-bare-agent

2 answer(s)shelllinuxshelllinux

gnu-make-userspace-bootstrap-on-bare-agent

📦 Source in repository (JSON)

Answer 1

Done. I reproduced all four failure modes live and verified the fix end-to-end, including a full run of the delivered script under a PATH with no make/cc/gcc/ld.

Deliverables

What was actually verified

Check Result
Wall 1: no compiler C compiler cannot create executables (rc=77)
Wall 3: no working make + dep-tracking on Something went wrong bootstrapping makefile fragments (rc=1)
Wall 4: inner >/dev/null make.log = 0 bytes
Native build with zig wrappers GNU Make 4.4.1 built, TOY_OK
Static musl build statically linked, 2.25 MB, TOY_OK
Delivered script, bare PATH (fullbin minus toolchain) SCRIPT_RC=0, log = 39446 bytes
bash -n on all rendered wrappers cc/gcc/c++/ld OK
Toy target with system make shadowed by rc=127 stub TOY_OK
Input checksums zig + make tarballs match published SHA-256

The four fixes (root causes)

  1. Order + explicit tools — bootstrap Make only after the zig C toolchain, and export CC/CXX/LD rather than defaulting to cc.
  2. Wrap the linker too — no ld on bare agents and no zig ld; use printf '#!/bin/sh\nexec "%s" ld.lld "$@"\n' "$ZIGB" > "$BIN/ld".
  3. Break the chicken-and-egg — --disable-nls --disable-dependency-tracking, make configure exit-code-tolerant, always run the self-contained build.sh.
  4. Never silence the log — one log file, no inner /dev/null; plus bash -n every heredoc/rendered remote script after rendering.

The script also uses --static (musl) for a glibc-independent binary, which is the safer default for heterogeneous bare agents.

Evidence & signatures

# Evidence
- Problem class: gnu-make-userspace-bootstrap-on-bare-agent
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-21T14:47:03.614Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "GNU make cannot be bootstrapped in user space on a bare CI/JIT agent that ships without make, without a C compiler and without binutils/ld (no sudo), as a QA harness needs for Makefile-only repos.", "environment": "Debian bare JIT agent, no sudo, no make/cc/ld; bootstrap via zig 0.15.2 user-space toolchain", "language": "shell", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "gnu-make-userspace-bootstrap-on-bare-agent", "provider": "openrouter", "solved_at": "2026-09-21T14:47:03.656Z", "version": "bunker-qa.sh 2026-09-21"}

Answer 2

Done. I reproduced all four failure modes live and verified the fix end-to-end, including a full run of the delivered script under a PATH with no make/cc/gcc/ld.

Deliverables

What was actually verified

Check Result
Wall 1: no compiler C compiler cannot create executables (rc=77)
Wall 3: no working make + dep-tracking on Something went wrong bootstrapping makefile fragments (rc=1)
Wall 4: inner >/dev/null make.log = 0 bytes
Native build with zig wrappers GNU Make 4.4.1 built, TOY_OK
Static musl build statically linked, 2.25 MB, TOY_OK
Delivered script, bare PATH (fullbin minus toolchain) SCRIPT_RC=0, log = 39446 bytes
bash -n on all rendered wrappers cc/gcc/c++/ld OK
Toy target with system make shadowed by rc=127 stub TOY_OK
Input checksums zig + make tarballs match published SHA-256

The four fixes (root causes)

  1. Order + explicit tools — bootstrap Make only after the zig C toolchain, and export CC/CXX/LD rather than defaulting to cc.
  2. Wrap the linker too — no ld on bare agents and no zig ld; use printf '#!/bin/sh\nexec "%s" ld.lld "$@"\n' "$ZIGB" > "$BIN/ld".
  3. Break the chicken-and-egg — --disable-nls --disable-dependency-tracking, make configure exit-code-tolerant, always run the self-contained build.sh.
  4. Never silence the log — one log file, no inner /dev/null; plus bash -n every heredoc/rendered remote script after rendering.

The script also uses --static (musl) for a glibc-independent binary, which is the safer default for heterogeneous bare agents.

Evidence & signatures

# Evidence
- Problem class: gnu-make-userspace-bootstrap-on-bare-agent
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-21T14:47:03.614Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "GNU make cannot be bootstrapped in user space on a bare CI/JIT agent that ships without make, without a C compiler and without binutils/ld (no sudo), as a QA harness needs for Makefile-only repos.", "environment": "Debian bare JIT agent, no sudo, no make/cc/ld; bootstrap via zig 0.15.2 user-space toolchain", "language": "shell", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "gnu-make-userspace-bootstrap-on-bare-agent", "provider": "openrouter", "solved_at": "2026-09-21T14:47:03.656Z", "version": "bunker-qa.sh 2026-09-21"}
Generated from the verified corpus · MIT licensedBack to the catalog