You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows bootstrap: the seed cannot link the native build runner ("missing Windows LLVM linker metadata"), so every action falls back to the comptime evaluator and build/wo.w fails (kind 26) #1075
Release run 33899384891 (tag v0.15.1.9, seed v0.15.1.8), jobs "Verify and package windows-x86_64" and "windows-aarch64", step "Build seed to release compiler":
error: missing Windows LLVM linker metadata
warning: build runner compile failed; actions fall back to comptime evaluation
error: action target 'pcre2-wo-build' failed during comptime evaluation: expression kind 26 is not comptime-evaluable yet
link_stage_link_with_extras_libs_args_plan (src/compiler/Link.w:783-790) routes every Windows link through the LLVM linker plan and reads the linker path from <runtime root>/llvm_ld. When the seed compiles the native build runner (#921) that file does not exist yet: it is produced by the bootstrap-llvm-link-metadata target, which runs after the runner. The runner has therefore never linked on Windows; it did not matter while every action was comptime-evaluable, and C3's build/wo.w action (#1046) ended that.
Fix: the runner link (and any link before the metadata target) must resolve the linker without the metadata file — the workflows already export LLVM_PREFIX and the shim; build/compiler.w already forwards WITH_LLVM_LD/LLVM_LD to child compilers, so Link.w should honor WITH_LLVM_LD (then LLVM_PREFIX/bin/lld-link.exe) when llvm_ld is absent, and the seed's own embedded metadata should be the default. Separately, #1046 (the evaluator cannot take &raw mut digest[0]) means the fallback path is not a fallback for this action at all; the fallback should refuse loudly with the runner's link error, not run and fail on an unrelated message.
Precise finding (v0.15.1.12 run 33934126586, with #1035 echoing the .wo action stderr): on both Windows lanes pcre2-wo-build fails with error: missing Windows LLVM linker metadata, then install target 'pcre2-wo-install-o' missing source: .../out/wo/pcre2.o.
So the blocker is not only the build-runner compile (f5af0c9 addresses that). The pcre2-wo-build ACTION itself links the pcre2 corpus into pcre2.o, and on Windows every link routes through Link.w's LLVM plan (link_stage_link_with_extras_libs_args_plan, runtime_sysinfo_os() == "Windows"), which reads <runtime root>/llvm_ld + llvm_ld.rsp. Under the comptime evaluator (the runner never links on Windows) that metadata is produced by the bootstrap-llvm-link-metadata target, which the seed's build has not run when this action links. #1029's stdio-globals fix and the runner retry both land in v0.15.1.11/.12, but the action still cannot link.
Fix: Link.w must resolve the Windows linker without the generated metadata file when it is absent — honor WITH_LLVM_LD, then LLVM_PREFIX/bin/lld-link.exe with the Windows SDK lib dirs the workflow already exports — so a link before bootstrap-llvm-link-metadata (the runner compile, and any comptime .wo action) succeeds. This is a compiler change needing its own Windows seed cut from a v0.15.1.10+ branch. Windows stays pinned at v0.15.1.8 in seed.lock until it lands; the Linux and macOS lanes bootstrap from v0.15.1.10.
Adding a user-facing data point for this, from a first-time install on Windows 11 rather than from CI.
The same missing Windows LLVM linker metadata failure makes the published release binary unusable out of the box, not just the bootstrap build runner. On a clean Windows 11 Home 10.0.26200 x86_64 machine with no prior With and no system LLVM:
# with-windows-x86_64.exe from the v0.15.2.1 release# sha256 8f4817f2c4a3a916515ec93fd8a8f228bc9cfcd423689c5977dc564efc02a115# (matches the with-windows-x86_64.exe pin in seed.lock)
with.exe -e 'print("hi")'
error: missing Windows LLVM linker metadata (C:\Users\<user>\.with\bin/runtime/llvm_ld)
and no WITH_LLVM_LD / LLVM_LD / LLVM_PREFIX in the environment
Only with.exe ships as a release asset — there is no runtime/ directory beside it, so <runtime root>/llvm_ld cannot exist for anyone installing from a release. This makes the first command a new Windows user runs fail.
This matches the fix already proposed here — honour WITH_LLVM_LD, then LLVM_PREFIX/bin/lld-link.exe, when llvm_ld is absent. Setting LLVM_PREFIX manually does resolve it and the compiler then works correctly (-e, -n, -p all verified).
Two smaller observations while here:
The error message renders mixed path separators: C:\Users\<user>\.with\bin/runtime/llvm_ld.
Seed is only one way
the other way is bootstrap
I will fix this when i get to it (I will, but it might take a week or so)
But, if you would like to fix it, you aren't blocked -
You can bootstrap using the emit-c path
I'd like to take the user-facing half of this, if it doesn't collide with #1155.
What's left, as far as I can tell: the linker fallback in 3741acde is already in v0.15.2.1, so WITH_LLVM_LD / LLVM_LD / LLVM_PREFIX work when set. But someone installing from withlang.org gets only with.exe in %USERPROFILE%\.local\bin. install.ps1 doesn't fetch an LLVM SDK and the compiler has no default place to look for one, so their first with run hello.w still fails:
error: missing Windows LLVM linker metadata (…\fresh-install/runtime/llvm_ld) and no WITH_LLVM_LD / LLVM_LD / LLVM_PREFIX in the environment
error: run failed
I reproduced that today with a source build of main at 69bf4e70 (seed v0.15.2.1, the selfhost-windows.yml recipe) copied into an empty folder with no LLVM variables set. The release binary fails identically, and with LLVM_PREFIX set both print hi. On main that path also now prints warning: link: could not probe … with 'llvm-nm.exe' (exit -2) when llvm-nm isn't on PATH.
What I'd propose, as small separate PRs, each tested locally from a source build on Windows 11 first:
Installer: once v0.15.2.2 publishes the Windows LLVM SDK asset, install.ps1 / install.cmd download it alongside the compiler and verify its sha256.
Compiler: after the environment variables, look for that SDK in one default location before failing, and resolve llvm-nm the same way.
Error text: say what to install and where, and normalise the mixed path separators in the message.
Two questions before I start: where would you want the SDK to live (beside the binary, or a per-user directory like %USERPROFILE%\.with)? And would you rather the Windows release ship the SDK inside the compiler bundle instead, in which case only (2) and (3) apply?
Triage 2026-10-25, with v0.15.3.0 (main a261b65): does not reproduce. The Windows seed built the release compiler for the 2026-10-25 seed cut (win10, main c88f3ee, out\release\bin\with.exe), and 3741acd resolves lld-link when the llvm_ld metadata is absent. A lone with.exe, copied out of the tree with no LLVM* or WITH* variables set, builds and runs a program:
> copy out\release\bin\with.exe C:\Users\Eric\triage1075\with.exe
> C:\Users\Eric\triage1075\with.exe build hello.w -o hello.exe
> hello.exe
hello from user install
Not isolated: this host has a system lld-link on PATH (C:\Program Files\LLVM\bin), so a machine with no LLVM at all was not tested.
Activity
build: seed.lock pins the published seed; `with build :seed-compat` p…
build driver: retry the build-runner compile once the bootstrap runti…
ehartford commentedon Sep 5, 2026
Precise finding (v0.15.1.12 run 33934126586, with #1035 echoing the .wo action stderr): on both Windows lanes
pcre2-wo-buildfails witherror: missing Windows LLVM linker metadata, theninstall target 'pcre2-wo-install-o' missing source: .../out/wo/pcre2.o.So the blocker is not only the build-runner compile (f5af0c9 addresses that). The
pcre2-wo-buildACTION itself links the pcre2 corpus intopcre2.o, and on Windows every link routes through Link.w's LLVM plan (link_stage_link_with_extras_libs_args_plan,runtime_sysinfo_os() == "Windows"), which reads<runtime root>/llvm_ld+llvm_ld.rsp. Under the comptime evaluator (the runner never links on Windows) that metadata is produced by thebootstrap-llvm-link-metadatatarget, which the seed's build has not run when this action links. #1029's stdio-globals fix and the runner retry both land in v0.15.1.11/.12, but the action still cannot link.Fix: Link.w must resolve the Windows linker without the generated metadata file when it is absent — honor
WITH_LLVM_LD, thenLLVM_PREFIX/bin/lld-link.exewith the Windows SDK lib dirs the workflow already exports — so a link beforebootstrap-llvm-link-metadata(the runner compile, and any comptime .wo action) succeeds. This is a compiler change needing its own Windows seed cut from a v0.15.1.10+ branch. Windows stays pinned at v0.15.1.8 in seed.lock until it lands; the Linux and macOS lanes bootstrap from v0.15.1.10.Link: native Windows resolves lld-link from the environment when the …
docs: fix_windows.md — orientation for the Windows agent (#1081)
joshhickson commentedon Sep 14, 2026
Adding a user-facing data point for this, from a first-time install on Windows 11 rather than from CI.
The same
missing Windows LLVM linker metadatafailure makes the published release binary unusable out of the box, not just the bootstrap build runner. On a clean Windows 11 Home 10.0.26200 x86_64 machine with no prior With and no system LLVM:Only
with.exeships as a release asset — there is noruntime/directory beside it, so<runtime root>/llvm_ldcannot exist for anyone installing from a release. This makes the first command a new Windows user runs fail.This matches the fix already proposed here — honour
WITH_LLVM_LD, thenLLVM_PREFIX/bin/lld-link.exe, whenllvm_ldis absent. SettingLLVM_PREFIXmanually does resolve it and the compiler then works correctly (-e,-n,-pall verified).Two smaller observations while here:
C:\Users\<user>\.with\bin/runtime/llvm_ld.v0.15.2.1,v0.15.2.0,v0.15.1.8,v0.15.1.7), so a user hitting this error on a tagged release has nothing to pointLLVM_PREFIXat without hunting through older nightlies. Filed as Windows LLVM SDK is not published in tagged releases (present in 1 of the last 15), so a released Windows compiler has no SDK to link with #1145; mentioning it here because it makes this issue's user-facing impact considerably worse.Happy to test a fix on real Windows hardware (Win 10 and Win 11, Intel + Nvidia) if that is useful.
ehartford commentedon Sep 16, 2026
Seed is only one way
the other way is bootstrap
I will fix this when i get to it (I will, but it might take a week or so)
But, if you would like to fix it, you aren't blocked -
You can bootstrap using the emit-c path
https://github.com/withlang-dev/with/blob/main/docs/with-bootstrap-runbook.md
ehartford commentedon Sep 16, 2026
here is the nightly Windows SDK
https://github.com/withlang-dev/with/releases/download/nightly-20260907-34132069721-1-8a729db8d01f/with-llvm-sdk-22.1.6-windows-x86_64.tar.gz
ehartford commentedon Sep 16, 2026
I will work on cutting a new release
rt: with_str_from_cstr copies -- an owned str owns its bytes (withlan…
joshhickson commentedon Sep 17, 2026
I'd like to take the user-facing half of this, if it doesn't collide with #1155.
What's left, as far as I can tell: the linker fallback in
3741acdeis already inv0.15.2.1, soWITH_LLVM_LD/LLVM_LD/LLVM_PREFIXwork when set. But someone installing from withlang.org gets onlywith.exein%USERPROFILE%\.local\bin.install.ps1doesn't fetch an LLVM SDK and the compiler has no default place to look for one, so their firstwith run hello.wstill fails:I reproduced that today with a source build of
mainat69bf4e70(seedv0.15.2.1, theselfhost-windows.ymlrecipe) copied into an empty folder with no LLVM variables set. The release binary fails identically, and withLLVM_PREFIXset both printhi. Onmainthat path also now printswarning: link: could not probe … with 'llvm-nm.exe' (exit -2)whenllvm-nmisn't onPATH.What I'd propose, as small separate PRs, each tested locally from a source build on Windows 11 first:
v0.15.2.2publishes the Windows LLVM SDK asset,install.ps1/install.cmddownload it alongside the compiler and verify its sha256.llvm-nmthe same way.Two questions before I start: where would you want the SDK to live (beside the binary, or a per-user directory like
%USERPROFILE%\.with)? And would you rather the Windows release ship the SDK inside the compiler bundle instead, in which case only (2) and (3) apply?ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): does not reproduce. The Windows seed built the release compiler for the 2026-10-25 seed cut (win10, main c88f3ee,out\release\bin\with.exe), and 3741acd resolves lld-link when thellvm_ldmetadata is absent. A lonewith.exe, copied out of the tree with noLLVM*orWITH*variables set, builds and runs a program:Not isolated: this host has a system
lld-linkon PATH (C:\Program Files\LLVM\bin), so a machine with no LLVM at all was not tested.