setup.sh --win ran `sudo apt-get install` (and update-alternatives) unconditionally, forcing the whole run under sudo even when mingw-w64 was already present. Running setup as root makes the daemon cross-compile run as root, leaving root-owned artifacts under external/dragonx that break `make clean` on a later non-sudo build (stale objects relink -> mingw link failure recurs). Gate the apt/update-alternatives block behind a presence check so `./setup.sh --win` runs sudo-free (and the daemon build as the invoking user) when the toolchain is already installed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
34 KiB
Executable File
34 KiB
Executable File