Currently the zeromq CMake files for mingw are installed to x86_64-w64-mingw32/CMake, when they should be in x86_64-w64-mingw32/lib/cmake, so take the patch from upstream that puts them in the right place. Noticed this while looking at other depends changes, that might cleanup / remove dirs.
depends: add zeromq patch to fix mingw CMake file install location #33778
pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:mingw_zmq_cmake_install changing 2 files +18 −0-
fanquake commented at 4:37 PM on November 4, 2025: member
-
5b8659a168
depends: add zeromq patch to fix mingw CMake file install
Currently the zeromq CMake files for mingw are installed to `x86_64-w64-mingw32/CMake`, when they should be in `x86_64-w64-mingw32/lib/cmake`, so take the patch from upstream that puts them in the right place. Noticed this while looking at other depends changes, that might cleanup / remove dirs.
- DrahtBot added the label Build system on Nov 4, 2025
-
DrahtBot commented at 4:37 PM on November 4, 2025: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33778.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers Concept ACK hebasto If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
hebasto commented at 4:44 PM on November 4, 2025: member
Concept ACK.
- fanquake added the label DrahtBot Guix build requested on Nov 4, 2025
-
hebasto commented at 5:28 PM on November 4, 2025: member
The current path is valid per the CMake docs.
UPD. ... on Windows, but not when cross-compiling.
On the master branch,
find_package(ZeroMQ)succeeds when cross-compiling for Windows. Here is an excerpt from the build log in debug mode:Prepending the following roots to each prefix: CMAKE_FIND_ROOT_PATH /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32 CMAKE_SYSROOT_COMPILE none CMAKE_SYSROOT_LINK none CMAKE_SYSROOT none find_package considered the following locations for ZeroMQ's Config module: /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/ZeroMQConfig.cmake /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/zeromq-config.cmake /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/CMake/ZeroMQConfig.cmake The file was found at /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/CMake/ZeroMQConfig.cmakeCould you please clarify (1) whether this CMake behaviour is expected and (2) whether the current path is valid?
-
purpleKarrot commented at 7:53 AM on November 5, 2025: contributor
The current path is valid per the CMake docs.
UPD. ... on Windows, but not when cross-compiling.
When taking cross-compiling into account, there are not two, but three scenarios how mingw can be used:
- Building on Windows
- Building on Linux, but packaging for Windows
- Building on and packaging for Linux
CMake searches for packages in different paths depending on the build host platform. The variable
WIN32describes the build target platform. It is not possible to deduce the packaging target platform from either the build host platform nor the build target platform.Without the patch, scenarios 1+2 are supported by default. With the patch, that was also applied upstream (https://github.com/zeromq/libzmq/commit/7a7bfa10e6b0e99210ed9397369b59f9e69cef8e), scenarios 1+3 are supported by default. Whether 1+3 are actually more appropriate as a default than 1+2 is debatable. I would have rejected that change upstream.
But whatever the default, the packager can override it by setting
ZEROMQ_CMAKECONFIG_INSTALL_DIRexplicitly, so all three scenarios are actually supported both with and without the patch.This is also the simplest approach for us. Instead of adding a patch, set
ZEROMQ_CMAKECONFIG_INSTALL_DIR:define $(package)_config_cmds - $($(package)_cmake) -S .. -B . + $($(package)_cmake) -S .. -B . -DZEROMQ_CMAKECONFIG_INSTALL_DIR:STRING=share/ZeroMQ endef - purpleKarrot referenced this in commit 7a7bfa10e6 on Nov 5, 2025
-
DrahtBot commented at 11:31 AM on November 5, 2025: contributor
<!--9cd9c72976c961c55c7acef8f6ba82cd-->
Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]
File commit 4da01123df0f4cb7e05c09dbb1c6b00c064beabe<br>(master) commit c6f096fcf20ca89c3b7852a7c6be921981baf952<br>(pull/33778/merge) *-aarch64-linux-gnu-debug.tar.gz ee972fe244c38c98...7461246157a05636...*-aarch64-linux-gnu.tar.gz d28c77533d1ccef4...d4348f1c0cb9cdbc...*-arm-linux-gnueabihf-debug.tar.gz 9e55fb6210b1381f...a53ca3c6e41e9c3d...*-arm-linux-gnueabihf.tar.gz 567697c14fb23926...5ea59cee62af97ca...*-arm64-apple-darwin-codesigning.tar.gz 98378959d7917f66...d6564539ca02e1a4...*-arm64-apple-darwin-unsigned.tar.gz 1189aac2d7dc5fae...c0e3681648171075...*-arm64-apple-darwin-unsigned.zip e4b97135b032ff19...f257b5b1794737c3...*-powerpc64-linux-gnu-debug.tar.gz 03f31561c86cf173...36e2326288cd8ada...*-powerpc64-linux-gnu.tar.gz 1bbb06d66658b5d6...b6c0acb2c983a455...*-riscv64-linux-gnu-debug.tar.gz 8767a68da6c38872...f3e91684fa7f0e0f...*-riscv64-linux-gnu.tar.gz 28ca5999fd903809...5ae5c0137995377a...*-x86_64-apple-darwin-codesigning.tar.gz 18cd53f4bcb9534f...3af85d8ba53af109...*-x86_64-apple-darwin-unsigned.tar.gz bf8739c16edba9ad...b573417245c32352...*-x86_64-apple-darwin-unsigned.zip 4420310fe732a6d1...22aa5b8365ea2ed8...*-x86_64-linux-gnu-debug.tar.gz 2928d6c0642cf414...5e0584cb87627277...*-x86_64-linux-gnu.tar.gz 6e2d4edc0f83d4f3...2bac62f9cc385a9f...*.tar.gz 118f9572221e79e7...033007a21b6d326d...SHA256SUMS.part 4463c90fb921c935...be93b458ccfa6b22...guix_build.log 84c6b7bbc6c58279...d2f1e86b788dd5ec...guix_build.log.diff a85021af68853b01... - DrahtBot removed the label DrahtBot Guix build requested on Nov 5, 2025
-
fanquake commented at 12:49 PM on November 7, 2025: member
I wont bother changing this for now (also don't want to add to /share given that bundles content we are currently pruning). Maybe we can also convince upstream to rechange their approach.
- fanquake closed this on Nov 7, 2025
- fanquake deleted the branch on Nov 7, 2025