setup.sh / build.sh on a current Arch host: four blockers, three of them one-liners #72

Closed
opened 2026-12-01 14:18:21 +00:00 by github-bot · 0 comments
Owner

@⁠Aruku448 on GitHub · 2026-12-01 14:17 UTC · original

Ran the whole thing end to end on Arch (Nyarch) with wine-staging 11.22-1.1, clang 23.1.5, Mesa 26.3.1.
The runtime itself is fine once built; these are the four places the build stopped, in the order they hit,
with what worked. Filing them together rather than as four issues.

1. setup.sh sdk cannot run unattended

step_sdk runs xwin ... splat without --accept-license, so it stops at the licence prompt:

Do you accept the license at https://go.microsoft.com/fwlink/?LinkId=2086102 (yes | no)?
Error: unknown response to license request

Running the same command by hand with --accept-license works, and --cache-dir lets the 1.1 GiB of
downloads survive between attempts. (setup.sh also rm -rfs the cache and the binary on success, so
a retry pays for the download again — minor.)

2. The Windows SDK must not be generated onto a case-folding filesystem

Not a script bug, but it is the failure that looks most like a script bug. An SDK splatted onto NTFS (a
shared Windows volume) comes out with Windows.h where the SDK has windows.h, so on Linux the first C
compile dies:

c_src/mimalloc/v3/include/mimalloc/atomic.h(16,10): fatal error: 'windows.h' file not found

Generating deps/msvc on the Linux filesystem fixes it. Worth a line in the README next to the "extract
the ZIP to a writable folder" step, since a dump on an NTFS volume invites putting everything next to it.

3. build.sh and clang 23 disagree about the spelling of winsysroot

export CFLAGS_x86_64_pc_windows_msvc="--target=x86_64-pc-windows-msvc ... /winsysroot$sdk"

Clang 23 builds its include paths out of that as ":/…/deps/msvc/VC/Tools/MSVC/include" — a leading
colon, then ignoring nonexistent directory for every SDK path, then the same windows.h error as
above. The space-separated spelling is what this clang accepts:

-CFLAGS_x86_64_pc_windows_msvc="--target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link /winsysroot$sdk"
+CFLAGS_x86_64_pc_windows_msvc="--target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link -winsysroot $sdk"

-Clink-arg=/winsysroot:$sdk for lld-link is correct as it stands; only the clang-cl one needs it.
With that, the build is 1 min 40 s incremental and works.

4. The wineserver setup.sh wine builds speaks a different protocol than the distro's Wine

step_wine takes the reference from "$WINE_BIN" --version, strips to wine-11.22, and builds
server/wineserver from that tag. Distro wine-staging 11.22-1.1 here has client protocol 980
(its staging patches bump it); the upstream tag generates 979, and the runtime dies before the
window exists:

wine client error:0: version mismatch 979/980.
Your wineserver binary was not upgraded correctly, or you have an older one somewhere in your PATH.

The message is client/server, so 979/980 is the built server talking to a newer client. Two ways out:
use the wineserver setup.sh just built by pointing PATCHED_WINESERVER at it (what I do — it also
carries the rbtree view patch, which a title mapping 7.4 M views wants), or skip the patch entirely with
VICTORY_WINE_VIEW_TREE=0 and let the distro's own server run. Related to #5.

5. build.sh's systemd-run memory cap OOM-kills the build on a normal desktop

exec systemd-run --user --scope --collect -q -p "MemoryHigh=${MEM_HIGH:-$((ram*2/5))}M" -p "MemoryMax=${MEM_MAX:-$((ram*9/20))}M" ...

On a 32 GiB machine with a session already using ~11 GiB, the scope is OOM-killed mid-build
(Memory cgroup out of memory, exit 137) — with the defaults, and again with MemoryMax raised to
24 GiB and 30 GiB, and with -j 6. Running the same cargo build --release -j 6 -p victory outside the
scope finishes without trouble. If the cap is there to protect the desktop, it may need to be relative to
MemAvailable (as run.sh already does with KEEP_FREE) rather than to MemTotal.

Environment, for the record

  • RX 7800 XT (NAVI32), Ryzen 7 5700X3D, 32 GB, Arch (kernel 7.3.6-cachyos), clang 23.1.5, rust 1.98.1 per rust-toolchain.toml
  • 37bb30f; Mesa 26.3.1 + patches/mesa.patch, vkd3d-proton 71cae09 + patches, DXC v1.9.2609, all as pinned

With the four fixes the whole thing builds and runs; numbers are in the separate RDNA3 report issue.

**@⁠Aruku448** on GitHub · 2026-12-01 14:17 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/72) Ran the whole thing end to end on Arch (Nyarch) with wine-staging 11.22-1.1, clang 23.1.5, Mesa 26.3.1. The runtime itself is fine once built; these are the four places the build stopped, in the order they hit, with what worked. Filing them together rather than as four issues. ### 1. `setup.sh sdk` cannot run unattended `step_sdk` runs `xwin ... splat` without `--accept-license`, so it stops at the licence prompt: ``` Do you accept the license at https://go.microsoft.com/fwlink/?LinkId=2086102 (yes | no)? Error: unknown response to license request ``` Running the same command by hand with `--accept-license` works, and `--cache-dir` lets the 1.1 GiB of downloads survive between attempts. (`setup.sh` also `rm -rf`s the cache and the binary on success, so a retry pays for the download again — minor.) ### 2. The Windows SDK must not be generated onto a case-folding filesystem Not a script bug, but it is the failure that looks most like a script bug. An SDK splatted onto NTFS (a shared Windows volume) comes out with `Windows.h` where the SDK has `windows.h`, so on Linux the first C compile dies: ``` c_src/mimalloc/v3/include/mimalloc/atomic.h(16,10): fatal error: 'windows.h' file not found ``` Generating `deps/msvc` on the Linux filesystem fixes it. Worth a line in the README next to the "extract the ZIP to a writable folder" step, since a dump on an NTFS volume invites putting everything next to it. ### 3. `build.sh` and clang 23 disagree about the spelling of `winsysroot` ```sh export CFLAGS_x86_64_pc_windows_msvc="--target=x86_64-pc-windows-msvc ... /winsysroot$sdk" ``` Clang 23 builds its include paths out of that as `":/…/deps/msvc/VC/Tools/MSVC/include"` — a leading colon, then `ignoring nonexistent directory` for every SDK path, then the same `windows.h` error as above. The space-separated spelling is what this clang accepts: ```diff -CFLAGS_x86_64_pc_windows_msvc="--target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link /winsysroot$sdk" +CFLAGS_x86_64_pc_windows_msvc="--target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link -winsysroot $sdk" ``` `-Clink-arg=/winsysroot:$sdk` for `lld-link` is correct as it stands; only the `clang-cl` one needs it. With that, the build is 1 min 40 s incremental and works. ### 4. The wineserver `setup.sh wine` builds speaks a different protocol than the distro's Wine `step_wine` takes the reference from `"$WINE_BIN" --version`, strips to `wine-11.22`, and builds `server/wineserver` from that tag. Distro `wine-staging 11.22-1.1` here has client protocol **980** (its staging patches bump it); the upstream tag generates **979**, and the runtime dies before the window exists: ``` wine client error:0: version mismatch 979/980. Your wineserver binary was not upgraded correctly, or you have an older one somewhere in your PATH. ``` The message is `client/server`, so 979/980 is the built server talking to a newer client. Two ways out: use the wineserver `setup.sh` just built by pointing `PATCHED_WINESERVER` at it (what I do — it also carries the rbtree view patch, which a title mapping 7.4 M views wants), or skip the patch entirely with `VICTORY_WINE_VIEW_TREE=0` and let the distro's own server run. Related to #5. ### 5. `build.sh`'s `systemd-run` memory cap OOM-kills the build on a normal desktop ```sh exec systemd-run --user --scope --collect -q -p "MemoryHigh=${MEM_HIGH:-$((ram*2/5))}M" -p "MemoryMax=${MEM_MAX:-$((ram*9/20))}M" ... ``` On a 32 GiB machine with a session already using ~11 GiB, the scope is OOM-killed mid-build (`Memory cgroup out of memory`, exit 137) — with the defaults, and again with `MemoryMax` raised to 24 GiB and 30 GiB, and with `-j 6`. Running the same `cargo build --release -j 6 -p victory` outside the scope finishes without trouble. If the cap is there to protect the desktop, it may need to be relative to `MemAvailable` (as `run.sh` already does with `KEEP_FREE`) rather than to `MemTotal`. ### Environment, for the record - RX 7800 XT (NAVI32), Ryzen 7 5700X3D, 32 GB, Arch (kernel 7.3.6-cachyos), clang 23.1.5, rust 1.98.1 per `rust-toolchain.toml` - `37bb30f`; Mesa 26.3.1 + `patches/mesa.patch`, vkd3d-proton `71cae09` + patches, DXC v1.9.2609, all as pinned With the four fixes the whole thing builds and runs; numbers are in the separate RDNA3 report issue.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 14:18:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/lobomfz--VIctory-xmem#72
No description provided.