From 0bb7a9809a78526da554df7ea4aa643402c76d6a Mon Sep 17 00:00:00 2001 From: jwinterm Date: Thu, 21 May 2026 20:59:45 -0400 Subject: [PATCH] Windows CI: prefer Git for Windows' mingw64 over Flutter's mingit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flutter ships a 2017-vintage mingit (its bundled Git), whose libwinpthread-1.dll predates the pthread_cond_timedwait64 export that modern MinGW-w64 libpthread emits and that the monero_c prebuilt wallet DLLs use. Wallet creation crashed at runtime: The procedure entry point pthread_cond_timedwait64 could not be located in the dynamic link library libwownero_wallet2_api_c.dll. Git for Windows' bundled mingw64/bin/libwinpthread-1.dll dates from 2026-04 — modern enough to have the symbol. Reorder the runtime-DLL search to prefer Git for Windows first, Flutter mingit last. --- .github/workflows/build-windows.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index bd83a26e..51a63798 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -181,11 +181,16 @@ jobs: # *.dll.a import libs), so we source them from Git Bash's bundled # MinGW-w64 distribution, which ships the same x86_64-w64-mingw32 # ABI used to build the wallet libs. + # ORDERING MATTERS: monero_c's prebuilt wallet DLLs are built against + # recent MinGW-w64 (post-2022 winpthreads ABI with pthread_cond_timedwait64). + # Flutter's bundled mingit ships a 2017-vintage libwinpthread that's + # missing newer symbols and crashes wallet creation at runtime. Prefer + # Git for Windows' mingw64/bin which is updated frequently. RUNTIME_PATHS=( - "/c/flutter/bin/mingit/mingw64/bin" # Flutter's bundled mingit — guaranteed present since Flutter is - "$SRC" # monero_c bundle + "/c/Program Files/Git/mingw64/bin" # Git for Windows — modern MinGW runtime (preferred) + "$SRC" # monero_c bundle (in case it grows DLLs) "/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin" # choco install -y mingw - "/c/Program Files/Git/mingw64/bin" # Git for Windows (may be overwritten by other tools) + "/c/flutter/bin/mingit/mingw64/bin" # Flutter's bundled mingit — old (2017), use only as last resort "/mingw64/bin" # MSYS2 fallback ) for runtime in libssp-0.dll libwinpthread-1.dll; do -- 2.50.1 (Apple Git-155)