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.
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.
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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33778.
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.
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:
0 Prepending the following roots to each prefix:
1
2 CMAKE_FIND_ROOT_PATH
3
4 /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32
5
6 CMAKE_SYSROOT_COMPILE
7
8 none
9
10 CMAKE_SYSROOT_LINK
11
12 none
13
14 CMAKE_SYSROOT
15
16 none
17
18 find_package considered the following locations for ZeroMQ's Config module:
19
20 /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/ZeroMQConfig.cmake
21 /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/zeromq-config.cmake
22 /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/CMake/ZeroMQConfig.cmake
23
24 The file was found at
25
26 /home/hebasto/dev/bitcoin/depends/x86_64-w64-mingw32/CMake/ZeroMQConfig.cmake
Could you please clarify (1) whether this CMake behaviour is expected and (2) whether the current path is valid?
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:
CMake searches for packages in different paths depending on the build host platform. The variable WIN32 describes 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_DIR explicitly, 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:
0 define $(package)_config_cmds
1- $($(package)_cmake) -S .. -B .
2+ $($(package)_cmake) -S .. -B . -DZEROMQ_CMAKECONFIG_INSTALL_DIR:STRING=share/ZeroMQ
3 endef
| File | commit 4da01123df0f4cb7e05c09dbb1c6b00c064beabe(master) | commit c6f096fcf20ca89c3b7852a7c6be921981baf952(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... |