README: LNK1104 from build scripts in a deep checkout #1118

Closed
github-bot wants to merge 1 commit from gh-pr/1118/head into gh-pr/1118/base
Owner

@⁠AlexandreSchuelter on GitHub · 2026-11-24 11:59 UTC · original
readme-long-path-lnk1104 → main · +4 −0 · 1 files · 1 commits · closed without merging

A first build in a deep folder failed with LNK1104 on a build script, and nothing in the README, issues or PRs mentions it. This adds a short note under Building and usage: the symptom, that LongPathsEnabled does not help (link.exe is not long-path aware), and the fix (a short clone path or CARGO_TARGET_DIR).

What is in it

  • README.md: a Long paths bullet under Building and usage (4 lines)

Tested

  • AMD Radeon RX 6900 XT, driver 32.0.21045.29003; Ryzen 7 5800X3D; Windows NT 10.0.26300, LongPathsEnabled=1; Rust 1.100.0 stable-x86_64-pc-windows-msvc, VS 2022 Build Tools 17.14 (MSVC 14.44)
  • Checkout path of 186 characters, default target\: cargo build --workspace --release failed with LNK1104 on target\release\build\proc-macro2\<hash>\out\build_script_build.exe (263 characters)
  • Reproduced on 47efa2e with a 198-character CARGO_TARGET_DIR: cargo build -p xcl failed with LNK1104 on the build_script_build.exe of windows_x86_64_msvc, quote and serde_json
  • Build-script executables under the target directory measured 60–78 characters past it, hence "about 80" with \target
  • With CARGO_TARGET_DIR at 109 characters the same checkout builds; cargo test --workspace --no-fail-fast -- --test-threads=4 (debug) on 47efa2e: 738 passed, 3 failed, 41 ignored, no SKIPPED GPU tests. The 3 failures are the RDNA2 packed-mip test fixed by #470 / #1028 and its two PoisonError cascades (#673)

Regression run
Not needed: README only.

Not tested

  • The exact threshold for every dependency's build-script path (only the 60–78 range above)
  • Windows 10, other Visual Studio / MSVC versions

AI use

  • Claude Code (Claude Opus 5.5): found the cause, wrote the note, ran the builds and tests above and drafted this description
**@⁠AlexandreSchuelter** on GitHub · 2026-11-24 11:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/1118) `readme-long-path-lnk1104` → `main` · +4 −0 · 1 files · 1 commits · closed without merging A first build in a deep folder failed with `LNK1104` on a build script, and nothing in the README, issues or PRs mentions it. This adds a short note under **Building and usage**: the symptom, that `LongPathsEnabled` does not help (`link.exe` is not long-path aware), and the fix (a short clone path or `CARGO_TARGET_DIR`). **What is in it** - `README.md`: a **Long paths** bullet under **Building and usage** (4 lines) **Tested** - AMD Radeon RX 6900 XT, driver 32.0.21045.29003; Ryzen 7 5800X3D; Windows NT 10.0.26300, `LongPathsEnabled=1`; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, VS 2022 Build Tools 17.14 (MSVC 14.44) - Checkout path of 186 characters, default `target\`: `cargo build --workspace --release` failed with `LNK1104` on `target\release\build\proc-macro2\<hash>\out\build_script_build.exe` (263 characters) - Reproduced on `47efa2e` with a 198-character `CARGO_TARGET_DIR`: `cargo build -p xcl` failed with `LNK1104` on the `build_script_build.exe` of `windows_x86_64_msvc`, `quote` and `serde_json` - Build-script executables under the target directory measured 60–78 characters past it, hence "about 80" with `\target` - With `CARGO_TARGET_DIR` at 109 characters the same checkout builds; `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug) on `47efa2e`: 738 passed, 3 failed, 41 ignored, no SKIPPED GPU tests. The 3 failures are the RDNA2 packed-mip test fixed by #470 / #1028 and its two `PoisonError` cascades (#673) **Regression run** Not needed: README only. **Not tested** - The exact threshold for every dependency's build-script path (only the 60–78 range above) - Windows 10, other Visual Studio / MSVC versions **AI use** - Claude Code (Claude Opus 5.5): found the cause, wrote the note, ran the builds and tests above and drafted this description
Cargo's build-script paths under target\ add 60-78 characters past the
target directory (measured on this tree). With a checkout path of 186
characters, link.exe failed with LNK1104 on
target\release\build\proc-macro2\<hash>\out\build_script_build.exe
(263 characters), with LongPathsEnabled=1 in the registry. A
CARGO_TARGET_DIR of 109 characters built and tested fine. Reproduced on
47efa2e with a 198-character CARGO_TARGET_DIR.

Assisted-by: Claude Code (Claude Opus 5.5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:44:00 +00:00
github-bot closed this pull request 2026-11-26 04:44:00 +00:00
Author
Owner

@⁠Darkkandadr on GitHub · 2026-11-24 16:07 UTC · original

I hit the same failure on a first build, with a newer toolchain. The note matches what I saw.

Tested

  • Windows 11 Pro build 26300, LongPathsEnabled=1. Rust 1.96.0 stable-x86_64-pc-windows-msvc. VS Build Tools 2026 (18.12.1) and Windows SDK 10.0.26100.0, freshly installed.
  • Checkout path of 185 characters, default target\, cargo build --workspace on main 930e8b4: LINK : fatal error LNK1104 on target\debug\build\libc-<hash>\build_script_build-<hash>.exe. The build scripts of windows_x86_64_msvc, proc-macro2, quote and serde_core failed the same way.
  • The same checkout with CARGO_TARGET_DIR=C:\Users\<me>\AppData\Local\Temp\xclt built without warnings or errors.

The README change is 4 lines and only text, and I read it before testing.

Run and written with Claude Code (Claude Opus 5.5).

**@⁠Darkkandadr** on GitHub · 2026-11-24 16:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/1118#issuecomment-7137144031) I hit the same failure on a first build, with a newer toolchain. The note matches what I saw. **Tested** - Windows 11 Pro build 26300, `LongPathsEnabled=1`. Rust 1.96.0 `stable-x86_64-pc-windows-msvc`. VS Build Tools 2026 (18.12.1) and Windows SDK 10.0.26100.0, freshly installed. - Checkout path of 185 characters, default `target\`, `cargo build --workspace` on `main` `930e8b4`: `LINK : fatal error LNK1104` on `target\debug\build\libc-<hash>\build_script_build-<hash>.exe`. The build scripts of `windows_x86_64_msvc`, `proc-macro2`, `quote` and `serde_core` failed the same way. - The same checkout with `CARGO_TARGET_DIR=C:\Users\<me>\AppData\Local\Temp\xclt` built without warnings or errors. The README change is 4 lines and only text, and I read it before testing. _Run and written with Claude Code (Claude Opus 5.5)._

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.