autocompile: name the resolved interpreter at configure, warn on Cygwin builds

Root-caused on Tomba 1: overlay_autocompile_cmd's bare 'python' resolved
through PATH to the devkitPro MSYS2/Cygwin python (usr/bin precedes the
Windows install), which segfaults (exit 0x0B00, signal 11) under the
kill-on-close job spawn BEFORE writing a byte — so every compile failed
with '(no output captured)' and nothing pointed at the cause; the title
silently ran interpreted.

At configure time, resolve the command's first token exactly as
cmd.exe /C will (SearchPathA with .exe), print the binding once, and
warn loudly when msys-2.0.dll/cygwin1.dll sits beside the resolved
interpreter, recommending the Windows launcher form 'py -3 ...'.
Also fail loudly up front when the token doesn't resolve at all.

Doc'd in ASYNC_OVERLAY_COMPILE.md. Title game.toml fixes (python ->
py -3) ship separately in each game repo.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Matthew Stanley
2026-08-04 14:49:29 -07:00
parent e629d622fa
commit f3d60331a7
2 changed files with 70 additions and 1 deletions
+6 -1
View File
@@ -13,8 +13,13 @@ What this session ADDED to make it work under CPS + match the user's gcc-only pr
2. `overlay_loader.c overlay_loader_apply_live_policy` — when the active backend is gcc, sljit-live
is forced OFF (gcc>interp; toolchain-less stays sljit>interp) — "mutually exclusive" per user.
3. The dev/soak config (`tomba_soak_a.toml`, untracked): `overlay_cache=true` +
`overlay_autocompile_cmd = python ../psxrecomp/tools/compile_overlays.py … --cps`. The PRODUCTION
`overlay_autocompile_cmd = py -3 ../psxrecomp/tools/compile_overlays.py … --cps`. The PRODUCTION
`game.toml` overlay_autocompile_cmd needs `--cps` appended when CPS ships to master.
(Windows recipes must invoke the interpreter as `py -3`, never bare `python`: on machines where
an MSYS2/Cygwin `usr/bin` precedes the Windows Python on PATH, `python` binds to the Cygwin
build, which segfaults under the runtime's job-object spawn before writing any output — every
compile fails with "(no output captured)". The runtime prints the resolved interpreter at
startup and warns when it is a Cygwin binary.)
VALIDATED: autocapture fired (triggers≥1) → background `compile_overlays --cps` produced CPS
overlay DLLs (new CRCs, post-cache-clear) → loader loaded them (`loads`>0) → `dispatch_native`