Repository navigation
Description
Found cutting the linux-aarch64 seed for #2490 (2026-10-20), in tools/docker/linux-aarch64's with-aarch64 volume.
Symptom. A fresh cross-built compiler (e1d2b25, :cross-arm-compiler on linux-x86_64, embedded runtime current) placed at /work/with/src/main fails :deps with exactly #2490's errors:
ld.lld: error: undefined symbol: with_vec_release_last
ld.lld: error: undefined symbol: with_vec_free_buffer_drop_origin_at
ld.lld: error: undefined symbol: with_net_tcp_connect_timeout
ld.lld: error: undefined symbol: with_net_set_timeout
ld.lld: error: undefined symbol: with_vec_push_es
ld.lld: error: undefined symbol: with_vec_make_unique_bits
ld.lld: error: undefined symbol: with_vec_append_bytes
ld.lld: error: undefined symbol: with_fiber_sleep_until
>>> referenced by string.w:136 (<embedded-std>/std/string.w:136)
>>> /work/with/out/tmp/deps-download/https_fetch.o:(aes_sbox)
Exact cause (strace -f -e trace=openat,execve, runbook recipe): the volume held a stale /work/with/src/runtime/ (runtime objects dated 2026-08-19, uid 1001, no .producer), and the __ld exec linked them:
execve("/work/with/src/main", ["/work/with/src/main", "__ld", ..., "/work/hf-probe.o",
"/work/with/src/runtime/channel_runtime.o", ..., "/work/with/src/runtime/rt_core.o",
"/work/with/src/runtime/rt_linux_aarch64.o", ...])
llvm-nm --defined-only on that rt_core.o: 0 hits for with_vec_push_es.
src/compiler/Link.w:
link_stage_resolve_runtime_root(lines 1934–1960) probesout/lib,out/bootstrap-lib,<compiler_dir>/runtime,<compiler_dir>/../lib; each candidate must passlink_stage_runtime_dir_is_this_generation(a.producernaming this generation, or bytes equal to the embedded objects). All four refused here, correctly.- It then returns the fallback
compiler_dir ++ "/runtime"(line 1960) with no check. link_stage_find_runtime_object_path(lines 2106–2109) acceptsroot/<name>from the fallback whenevernot link_stage_runtime_root_is_foreign(root)— andlink_stage_runtime_root_is_foreign(lines 2017–2021) is false when the directory has no.producerat all. So a.producer-less<compiler_dir>/runtimeof any generation is linked, while the same directory with a wrong.produceris refused. That is D30 implementation: retire the internal runtime ABI — runtime compiles in-unit; rt objects only a keyed cache; boundaries speak C #761/Stage chain links stage2 against seed-built runtime and bridge objects (D30 mixed-world link, #761 class) #1815's mixed-generation link, the class D30 says must never happen, with a silent verdict: the refusal message (link_stage_runtime_generation_refusal) never prints.
Repro (any host, native):
mkdir -p /tmp/seedbin && cp out/release/bin/with /tmp/seedbin/with
mkdir /tmp/seedbin/runtime && cp <an older checkout>/out/lib/*.o /tmp/seedbin/runtime/ # no .producer
/tmp/seedbin/with build build/https_fetch.w -o /tmp/hf # links /tmp/seedbin/runtime/rt_core.o
Expected: the link refuses the directory (its objects are neither this generation's by .producer nor the embedded bytes) and falls back to the embedded runtime, or prints link_stage_runtime_generation_refusal. Actual: undefined with_* symbols from whatever that directory holds.
Fix direction. The fallback root must pass the same test as a candidate: in link_stage_find_runtime_object_path, take root/<name> only when link_stage_runtime_dir_is_this_generation(root); otherwise go straight to the embedded objects. A directory without .producer is not "ours", it is unknown.
Workaround used for the seed cut: rm -rf /work/with/src/runtime (plus git clean -fdX keeping .deps and src/main) in the volume, then the same compiler bootstrapped normally. Note for #2490: the pinned 10-09 seed was run in the same polluted volume, so that failure's link also took src/runtime/; whether the seed's own embedded runtime lacks the symbols too is a separate fact (the 10-11 D115 helpers postdate it, so probably yes), but the error text in #2490 is this bug's.
Activity
WIP: cached graph admitted only when the runner exists (#2493); runne…
Link: the runner's root needs the producer's generation; the fallback…
build: a cold worktree bootstraps again — cached graph only with a ru…
seed.lock: nightly-20261020-local-2-4d6d960d6ed0 — seeds re-cut from …
ehartford commentedon Oct 20, 2026
Fixed in #2495: link_stage_find_runtime_object_path links a root's objects only when the root is this generation's — its .producer names this compiler, or its objects are the ones this compiler embeds — so a producer-less stale directory is never linked; and the runner's root must have this generation as its producer (the bridges are never embedded).