docs: record the Zig cache workaround for the two archive fixtures #1088

Merged
ChazY11 merged 1 commit from upstream-pr/1095 into main 2026-11-24 01:36:05 +00:00
ChazY11 commented 2026-11-24 00:56:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T00:56:06Z.


What

cmake --build --preset dev stopped twice on this host on the two Zig fixtures, archive_reader and
archive_texture_reader, each with:

C:\WINDOWS\system32\cmd.exe /C "cd /D ... && ...\python.exe -m ziglang build-exe ...
  -femit-bin=D:/.../archive_reader.exe"
error: AccessDenied

Running the same command by hand gave the more specific error: unable to create compilation: AccessDenied.
Pointing both Zig caches at writable directories built both targets, and the rest of the dev preset, with no other
change:

$env:ZIG_GLOBAL_CACHE_DIR = 'out/zig-global'
$env:ZIG_LOCAL_CACHE_DIR  = 'out/zig-local'

This adds one bullet to Windows build notes in README.md and the measured before/after in
docs/experiments.md, under the section that already documents the pinned Zig compiler.

Measured

Host: Windows 11 build 26300.9974, x64, Core Ultra 9 285H, MSVC 14.44.35207 (VS 2022 Build Tools),
Windows SDK 10.0.26100, CMake + Ninja from the VS component, Python 3.12.10.
Venv from requirements-dev.txt (pefile==2024.8.26, iced-x86==1.21.0, ziglang==0.13.0).
Commit: 110e186.

Run Cache variables Result
cmake --build --preset dev unset FAILED: archive_reader.exe, FAILED: archive_texture_reader.exe, error: AccessDenied, build stops
same command by hand unset error: unable to create compilation: AccessDenied, exit 1
same command by hand ZIG_GLOBAL_CACHE_DIR + ZIG_LOCAL_CACHE_DIR set exit 0, reader_probe.exe written
cmake --build --preset dev both set exit 0, no FAILED: line
ctest --preset dev -N both set Total Tests: 603

Two negative controls, both from the same failing host:

  • %LOCALAPPDATA%\zig did not exist in the failing runs, and pre-creating it did not change the failure, so the
    default location is not simply a missing directory.
  • The output path was writable throughout: the same -femit-bin target wrote successfully once the two variables
    were set, and the rest of the preset had already written thousands of objects into out/build/dev.

So the failing step is the cache, not the output path. Which path the packed compiler resolves by default on this
host is not established; the note records the two settings, not a cause. Controlled Folder Access reported 0
(off) and no Defender ASR rules are configured here, so I am not claiming either as the mechanism.

Tested

python -m compileall -q make_game.py tools tests     # not applicable here; this repo instead:
.\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py
  Self-test passed. Checked 15 Markdown files and 243 links.
.\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py
  Self-test passed. Checked 913 tracked source, script and build/CI files: no bidirectional controls.

Docs only. No source, test, fixture or CMake change.

Notes

  • AI-assisted; the measurement, commands and outputs are from this machine.
  • Refs: no issue — small fix, opened directly as a PR per CONTRIBUTING.md ("Small fixes can start with a PR").
    Say the word and I will move it into an issue first.
  • Nothing from a game: no files, dumps, distribution links or logs quoting them.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6572121543 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1095). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T00:56:06Z. --- ## What `cmake --build --preset dev` stopped twice on this host on the two Zig fixtures, `archive_reader` and `archive_texture_reader`, each with: ```text C:\WINDOWS\system32\cmd.exe /C "cd /D ... && ...\python.exe -m ziglang build-exe ... -femit-bin=D:/.../archive_reader.exe" error: AccessDenied ``` Running the same command by hand gave the more specific `error: unable to create compilation: AccessDenied`. Pointing both Zig caches at writable directories built both targets, and the rest of the dev preset, with no other change: ```powershell $env:ZIG_GLOBAL_CACHE_DIR = 'out/zig-global' $env:ZIG_LOCAL_CACHE_DIR = 'out/zig-local' ``` This adds one bullet to **Windows build notes** in `README.md` and the measured before/after in `docs/experiments.md`, under the section that already documents the pinned Zig compiler. ## Measured Host: Windows 11 build 26300.9974, x64, Core Ultra 9 285H, MSVC 14.44.35207 (VS 2022 Build Tools), Windows SDK 10.0.26100, CMake + Ninja from the VS component, Python 3.12.10. Venv from `requirements-dev.txt` (`pefile==2024.8.26`, `iced-x86==1.21.0`, `ziglang==0.13.0`). Commit: `110e186`. | Run | Cache variables | Result | |---|---|---| | `cmake --build --preset dev` | unset | `FAILED: archive_reader.exe`, `FAILED: archive_texture_reader.exe`, `error: AccessDenied`, build stops | | same command by hand | unset | `error: unable to create compilation: AccessDenied`, exit 1 | | same command by hand | `ZIG_GLOBAL_CACHE_DIR` + `ZIG_LOCAL_CACHE_DIR` set | exit 0, `reader_probe.exe` written | | `cmake --build --preset dev` | both set | exit 0, no `FAILED:` line | | `ctest --preset dev -N` | both set | `Total Tests: 603` | Two negative controls, both from the same failing host: - `%LOCALAPPDATA%\zig` did not exist in the failing runs, and pre-creating it did not change the failure, so the default location is not simply a missing directory. - The output path was writable throughout: the same `-femit-bin` target wrote successfully once the two variables were set, and the rest of the preset had already written thousands of objects into `out/build/dev`. So the failing step is the cache, not the output path. **Which** path the packed compiler resolves by default on this host is not established; the note records the two settings, not a cause. Controlled Folder Access reported `0` (off) and no Defender ASR rules are configured here, so I am not claiming either as the mechanism. ## Tested ```text python -m compileall -q make_game.py tools tests # not applicable here; this repo instead: .\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py Self-test passed. Checked 15 Markdown files and 243 links. .\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py Self-test passed. Checked 913 tracked source, script and build/CI files: no bidirectional controls. ``` Docs only. No source, test, fixture or CMake change. ## Notes - AI-assisted; the measurement, commands and outputs are from this machine. - `Refs`: no issue — small fix, opened directly as a PR per `CONTRIBUTING.md` ("Small fixes can start with a PR"). Say the word and I will move it into an issue first. - Nothing from a game: no files, dumps, distribution links or logs quoting them.
upstream-sync closed this pull request 2026-11-24 06:46:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1088
No description provided.