From 5526ad83c1d0c0c93ffba05963a08577c1e781bd Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Thu, 29 Oct 2026 01:54:15 +0100 Subject: [PATCH 1/3] ci: install archived hidapi and libusb on windows, removed from msys2 mingw64 MSYS2 dropped mingw64 for hidapi and libusb in October, so pacman fails in the setup-msys2 step with "target not found" and the Windows jobs never reach the build. Remove them from the install list and install the archived packages from repo.msys2.org with pacman -U, checking sha256. Also update the Windows instructions in the README, which still listed both packages and linked an ICU build that no longer exists. Same approach as woodser/monero-cpp#174. Co-authored-by: woodser <13068859+woodser@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/build-windows.yml | 11 +++++++++-- .github/workflows/test.yml | 11 +++++++++-- README.md | 22 +++++++++++++++------- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 897d45e..5b44ca0 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -48,10 +48,8 @@ jobs: mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium - mingw-w64-x86_64-hidapi mingw-w64-x86_64-unbound mingw-w64-x86_64-protobuf - mingw-w64-x86_64-libusb mingw-w64-x86_64-ntldd mingw-w64-x86_64-ccache git @@ -106,6 +104,15 @@ jobs: echo "8486a018aca2e56d1fcd2eed2069011f2e1da02e03af72b38916ee06cbe7203f mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst" | sha256sum -c pacman -U --noconfirm mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst + - name: Install hidapi v0.15.0 and libusb v1.0.30 + run: | + # dropped from the msys2 mingw64 repo, install the archived packages + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst + echo "89fb61549a437d65076a092a367fcb264fc7045ee9ebef48cd81f5a76a5588f8 mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst" | sha256sum -c + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst + echo "124edc26b009678a4c5e759481a364abf63ed7f2f49a53092e8bd0a47c0c0740 mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst" | sha256sum -c + pacman -U --noconfirm mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst + - name: Install boost v1.92.0 run: | wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d038d7e..665f84a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -219,10 +219,8 @@ jobs: mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium - mingw-w64-x86_64-hidapi mingw-w64-x86_64-unbound mingw-w64-x86_64-protobuf - mingw-w64-x86_64-libusb mingw-w64-x86_64-ntldd mingw-w64-x86_64-ccache git @@ -277,6 +275,15 @@ jobs: echo "8486a018aca2e56d1fcd2eed2069011f2e1da02e03af72b38916ee06cbe7203f mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst" | sha256sum -c pacman -U --noconfirm mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst + - name: Install hidapi v0.15.0 and libusb v1.0.30 + run: | + # dropped from the msys2 mingw64 repo, install the archived packages + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst + echo "89fb61549a437d65076a092a367fcb264fc7045ee9ebef48cd81f5a76a5588f8 mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst" | sha256sum -c + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst + echo "124edc26b009678a4c5e759481a364abf63ed7f2f49a53092e8bd0a47c0c0740 mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst" | sha256sum -c + pacman -U --noconfirm mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst + - name: Install boost v1.92.0 run: | wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst diff --git a/README.md b/README.md index 0a17370..039d04e 100644 --- a/README.md +++ b/README.md @@ -157,13 +157,21 @@ wallet_full.close(True) 4. Relaunch MSYS2 (if necessary) and install dependencies: ``` - pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-unbound mingw-w64-x86_64-protobuf git mingw-w64-x86_64-libusb gettext base-devel - wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-icu-75.1-2-any.pkg.tar.zst - pacman -U mingw-w64-x86_64-icu-75.1-2-any.pkg.tar.zst - wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.87.0-3-any.pkg.tar.zst - pacman -U mingw-w64-x86_64-boost-1.87.0-3-any.pkg.tar.zst - wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst - pacman -U mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst + pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-unbound mingw-w64-x86_64-protobuf git gettext base-devel wget + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst + echo "8486a018aca2e56d1fcd2eed2069011f2e1da02e03af72b38916ee06cbe7203f mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst" | sha256sum -c + pacman -U mingw-w64-x86_64-icu-78.3-4-any.pkg.tar.zst + # hidapi and libusb were removed from the msys2 mingw64 repo, install the archived packages + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst + echo "89fb61549a437d65076a092a367fcb264fc7045ee9ebef48cd81f5a76a5588f8 mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst" | sha256sum -c + echo "124edc26b009678a4c5e759481a364abf63ed7f2f49a53092e8bd0a47c0c0740 mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst" | sha256sum -c + pacman -U mingw-w64-x86_64-hidapi-0.15.0-2-any.pkg.tar.zst mingw-w64-x86_64-libusb-1.0.30-1-any.pkg.tar.zst + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst + echo "8d5a7621778e955a52755940fe16ead78c0e57a2ff443418b43c25388df1ba2a mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst" | sha256sum -c + pacman -U mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst + echo "5b56ad87bc544336b2d51edb8bb0614f46542571362daf4d7e53bf23120175a1 mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst" | sha256sum -c + pacman -U mingw-w64-x86_64-pybind11-2.13.6-2-any.pkg.tar.zst ``` 5. Clone repo: `git clone --recurse-submodules https://github.com/everoddandeven/monero-python.git` From d5cb76304aadebdac1137401d6d3e8a8e15d31ef Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Thu, 29 Oct 2026 02:20:54 +0100 Subject: [PATCH 2/3] ci: fix pinned windows toolchain after msys2 split gcc-libs Since gcc 16.2.0-4 msys2 splits gcc-libs into libgcc, libstdc++ and cc-libs, which conflict with the pinned gcc-libs 16.2.0-3, so the pacman -U of the pinned toolchain fails. Remove the split packages before the downgrade. Also pin boost-libs 1.92.0-3 next to boost: the rebuilt boost-libs in the repo depends on libquadmath, which conflicts with the pinned gcc-libs. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/build-windows.yml | 12 +++++++++++- .github/workflows/test.yml | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 5b44ca0..55540f1 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -84,6 +84,13 @@ jobs: echo "f8e25ea67bb796e7f65550f0dca9fce4cdde8aaa3dadafe4d13c6a8233c8de26 mingw-w64-x86_64-gcc-libs-16.2.0-3-any.pkg.tar.zst" | sha256sum -c wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst echo "8b37c953ae12f3d8fa05c854236463231ea0a294dff423007cbd93d4d8089f9f mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst" | sha256sum -c + # gcc-libs is split into libgcc, libstdc++ and cc-libs since 16.2.0-4 and the + # new packages conflict with the pinned gcc-libs, so drop them before the downgrade + for p in libgcc libstdc++ cc-libs; do + if pacman -Q mingw-w64-x86_64-$p > /dev/null 2>&1; then + pacman -Rdd --noconfirm mingw-w64-x86_64-$p + fi + done pacman -U --noconfirm \ mingw-w64-x86_64-headers-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \ mingw-w64-x86_64-crt-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \ @@ -117,7 +124,10 @@ jobs: run: | wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst echo "8d5a7621778e955a52755940fe16ead78c0e57a2ff443418b43c25388df1ba2a mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst" | sha256sum -c - pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst + echo "832ee9a748c387fc70e0fb90f3bd6d513db627d3c283512123aeb904f4b2dc5a mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst" | sha256sum -c + # boost-libs in the repo is a newer rebuild that needs the split gcc runtime + pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst - name: Install pybind11 v2.13.6 run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 665f84a..a654b44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -255,6 +255,13 @@ jobs: echo "f8e25ea67bb796e7f65550f0dca9fce4cdde8aaa3dadafe4d13c6a8233c8de26 mingw-w64-x86_64-gcc-libs-16.2.0-3-any.pkg.tar.zst" | sha256sum -c wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst echo "8b37c953ae12f3d8fa05c854236463231ea0a294dff423007cbd93d4d8089f9f mingw-w64-x86_64-gcc-16.2.0-3-any.pkg.tar.zst" | sha256sum -c + # gcc-libs is split into libgcc, libstdc++ and cc-libs since 16.2.0-4 and the + # new packages conflict with the pinned gcc-libs, so drop them before the downgrade + for p in libgcc libstdc++ cc-libs; do + if pacman -Q mingw-w64-x86_64-$p > /dev/null 2>&1; then + pacman -Rdd --noconfirm mingw-w64-x86_64-$p + fi + done pacman -U --noconfirm \ mingw-w64-x86_64-headers-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \ mingw-w64-x86_64-crt-14.0.0.r375.g9c1abbbf5-1-any.pkg.tar.zst \ @@ -288,7 +295,10 @@ jobs: run: | wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst echo "8d5a7621778e955a52755940fe16ead78c0e57a2ff443418b43c25388df1ba2a mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst" | sha256sum -c - pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst + wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst + echo "832ee9a748c387fc70e0fb90f3bd6d513db627d3c283512123aeb904f4b2dc5a mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst" | sha256sum -c + # boost-libs in the repo is a newer rebuild that needs the split gcc runtime + pacman -U --noconfirm mingw-w64-x86_64-boost-1.92.0-3-any.pkg.tar.zst mingw-w64-x86_64-boost-libs-1.92.0-3-any.pkg.tar.zst - name: Install pybind11 v2.13.6 run: | From cf603bf589ac8f27fe063a94c5174c22e6d90a1f Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Thu, 29 Oct 2026 03:05:08 +0100 Subject: [PATCH 3/3] ci: build in parallel on windows The Windows jobs ran make and cmake --build without -j, so monero was compiled one file at a time while Linux and macOS use -j3. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/build-windows.yml | 5 +++-- .github/workflows/test.yml | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 55540f1..2321ca8 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -160,7 +160,7 @@ jobs: -D CMAKE_TOOLCHAIN_FILE="../../cmake/64-bit-toolchain.cmake" \ -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) \ ../../ - make wallet cryptonote_protocol + make -j$(nproc) wallet cryptonote_protocol - name: Build monero-cpp run: | @@ -168,11 +168,12 @@ jobs: mkdir -p build cd build cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - cmake --build . + cmake --build . --parallel $(nproc) - name: Build wheel run: | export WIN_PYTHON_EXE=$(cygpath -u "$pythonLocation/python.exe") + export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) "$WIN_PYTHON_EXE" -m pip wheel . -w dist --no-build-isolation \ -C cmake.define.Python3_EXECUTABLE="$WIN_PYTHON_EXE" \ -C cmake.define.Python3_FIND_STRATEGY=LOCATION \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a654b44..da944bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -331,7 +331,7 @@ jobs: -D CMAKE_TOOLCHAIN_FILE="../../cmake/64-bit-toolchain.cmake" \ -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) \ ../../ - make wallet cryptonote_protocol + make -j$(nproc) wallet cryptonote_protocol - name: Build monero-cpp run: | @@ -339,7 +339,7 @@ jobs: mkdir -p build cd build cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - cmake --build . + cmake --build . --parallel $(nproc) - name: Build monero-python run: | @@ -349,7 +349,7 @@ jobs: cmake .. -DPython3_EXECUTABLE="$WIN_PYTHON_EXE" \ -DPython3_FIND_STRATEGY=LOCATION \ -DPython3_FIND_REGISTRY=NEVER - cmake --build . + cmake --build . --parallel $(nproc) mkdir -p ../dist cp *.pyd ../dist/monero.pyd cd ../dist