From b8d7c6e346ffb62da2d7cb2d42f4a759ed1e3b3a Mon Sep 17 00:00:00 2001 From: "Frank Chiarulli Jr." Date: Tue, 17 Nov 2026 16:31:29 -0400 Subject: [PATCH] Pin the autotools host type on Windows config.guess reports x86_64-w64-mingw32 inside the MSYS2 MINGW64 shell but x86_64-pc-mingw64 (or -pc-msys) from a plain Windows shell, which is how the desktop release builds. libirecovery only picks its native Windows backend for host_os mingw32*; anywhere else it requires libusb, which MSYS2 no longer packages for MINGW64, so the 0.6.3 Windows desktop build failed at libirecovery's configure. Before that, desktop builds quietly used libirecovery's libusb backend while the CLI used the native one. Pass --build/--host=x86_64-w64-mingw32 so every environment configures the same way. --- crates/restorekit-sys/build.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/restorekit-sys/build.rs b/crates/restorekit-sys/build.rs index 5ad64af..b58f01c 100644 --- a/crates/restorekit-sys/build.rs +++ b/crates/restorekit-sys/build.rs @@ -277,6 +277,14 @@ fn build_autotools(src: &Path, name: &str, version: &str, deps: &Deps) { // A stale-timestamp maintainer-mode rebuild can re-invoke aclocal from // configure/make, so keep the sanitized aclocal path in scope on Windows. if deps.windows { + // Pin the host type. config.guess reports x86_64-w64-mingw32 inside the + // MSYS2 MINGW64 shell but x86_64-pc-mingw64 from a plain Windows shell + // (the desktop release builds from PowerShell), and libirecovery only + // picks its native Windows backend for `mingw32*`; otherwise it wants + // libusb, which MSYS2 no longer packages for MINGW64. + configure + .arg("--build=x86_64-w64-mingw32") + .arg("--host=x86_64-w64-mingw32"); configure.env("ACLOCAL_PATH", MSYS_ACLOCAL_PATH); // Several of these projects also build command-line tools whose // Makefiles don't link the Windows system libraries they need, so they