This PR fixes https://github.com/bitcoin-core/gui/issues/906:
<img width="561" height="179" alt="image" src="https://github.com/user-attachments/assets/6bb6d12b-91a6-4659-b6eb-be64093ec86d" />
This PR fixes https://github.com/bitcoin-core/gui/issues/906:
<img width="561" height="179" alt="image" src="https://github.com/user-attachments/assets/6bb6d12b-91a6-4659-b6eb-be64093ec86d" />
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33906.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | waketraindev, fanquake |
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
Possible typos and grammar issues:
<sup>drahtbot_id_5_m</sup>
ACK 8558902e576e2c2d66f6083b66953dd6cc464de4
Tested on Windows 11 (Dark Theme) (wsl/depends cross build) x86_64-w64-mingw32 [Release config] Tested on Windows 11 (Dark Theme) (guix build) x86_64-w64-mingw32
<img width="781" height="161" alt="image" src="https://github.com/user-attachments/assets/9400b604-86a5-4635-9fa5-07e21b80e32e" />
My Guix build:
aarch64
15ff16a4958d217927fb68c99c0dcd19bf51595517c59aae8b442b3e1b4529e2 guix-build-8558902e576e/output/aarch64-linux-gnu/SHA256SUMS.part
db8080232c5216f0f9cb06ce7052fe81156f9dab6a15964be187f1186f24e47e guix-build-8558902e576e/output/aarch64-linux-gnu/bitcoin-8558902e576e-aarch64-linux-gnu-debug.tar.gz
e3c053d21dcab9234a1943af0e61a2c7c9270429238e0eb11fb0378378bcf87e guix-build-8558902e576e/output/aarch64-linux-gnu/bitcoin-8558902e576e-aarch64-linux-gnu.tar.gz
1194b7e6e382fb001d616da835c9761ee11f0dbd8af66edf607a32640979b733 guix-build-8558902e576e/output/arm-linux-gnueabihf/SHA256SUMS.part
ab5bdd0b000a80a6b6bdb1c0f3fb79bee56f7abf24df31ee298c37fbdc175c8c guix-build-8558902e576e/output/arm-linux-gnueabihf/bitcoin-8558902e576e-arm-linux-gnueabihf-debug.tar.gz
ee144d6242f16c5a35721db8ce4630ac3449c93bd77042f78cf33ac56ba6269b guix-build-8558902e576e/output/arm-linux-gnueabihf/bitcoin-8558902e576e-arm-linux-gnueabihf.tar.gz
391aabaa846d250ee688a50b70197572135925467c0e8e82fdc65c0b87df1c46 guix-build-8558902e576e/output/arm64-apple-darwin/SHA256SUMS.part
cf051aed651410ff322e8db6ee5680921cf46fed7a9134583c2ae9a9425bfd1b guix-build-8558902e576e/output/arm64-apple-darwin/bitcoin-8558902e576e-arm64-apple-darwin-codesigning.tar.gz
ab8b8cb5b8a78f7f7b16189987a515c62190d1a8084090545b0ec2aaa087de27 guix-build-8558902e576e/output/arm64-apple-darwin/bitcoin-8558902e576e-arm64-apple-darwin-unsigned.tar.gz
38bd598d81e3dfc4f2c95b64e48254e3e59fa1df8d2bffecb4a86a21bff8e5e8 guix-build-8558902e576e/output/arm64-apple-darwin/bitcoin-8558902e576e-arm64-apple-darwin-unsigned.zip
6d741dc4705f40f8b75abb084e232a2918565a22b2d000587fb952d91c1d8637 guix-build-8558902e576e/output/dist-archive/bitcoin-8558902e576e.tar.gz
256e197aaacdf80cc2211c039ff3cf8849f2bb3bbdc93ca40272a6405403a11f guix-build-8558902e576e/output/powerpc64-linux-gnu/SHA256SUMS.part
a7cf9be7059a7e54e0e6d1afc773dfbad9c84cb4a00fc13176b2e4d2c50e0d26 guix-build-8558902e576e/output/powerpc64-linux-gnu/bitcoin-8558902e576e-powerpc64-linux-gnu-debug.tar.gz
928705be4e1b11e5f6c73b1a73682a25eb750db9132d7da376a7b263b0a896e3 guix-build-8558902e576e/output/powerpc64-linux-gnu/bitcoin-8558902e576e-powerpc64-linux-gnu.tar.gz
9d598132b77ce381b9afe5cf4a534c093cb2e42e3606eeae4214c4c824ed8050 guix-build-8558902e576e/output/riscv64-linux-gnu/SHA256SUMS.part
ab5ad1ea8ea2ca4893af2b4acde092201ea86045a56db4251d05dafa96a6a308 guix-build-8558902e576e/output/riscv64-linux-gnu/bitcoin-8558902e576e-riscv64-linux-gnu-debug.tar.gz
685d8b9cf3283b3474b5fcf73794f5ad7d6e9b8c934e09943803bdd9ef260612 guix-build-8558902e576e/output/riscv64-linux-gnu/bitcoin-8558902e576e-riscv64-linux-gnu.tar.gz
fecd398f3192f41ae284b7eaa6f5cb8f2b71adb52c04fa76aa3e3cc0adfd0c11 guix-build-8558902e576e/output/x86_64-apple-darwin/SHA256SUMS.part
4bc6f845db5e40dbb8a5d4e930efecf5cbef7c23d1ee3067e3a1546dd3165e0d guix-build-8558902e576e/output/x86_64-apple-darwin/bitcoin-8558902e576e-x86_64-apple-darwin-codesigning.tar.gz
f17ea91b569df77a64d9a112a16c249bda84b474b5573fb270ab1c9cecb43a79 guix-build-8558902e576e/output/x86_64-apple-darwin/bitcoin-8558902e576e-x86_64-apple-darwin-unsigned.tar.gz
e3c727048fe2148ed870b14ab0dafc06d5a31be158019027f88e0632c4476448 guix-build-8558902e576e/output/x86_64-apple-darwin/bitcoin-8558902e576e-x86_64-apple-darwin-unsigned.zip
b2c436449a3eb45c3b8276414f540566fe87160d7760a550dc896987b55aa175 guix-build-8558902e576e/output/x86_64-linux-gnu/SHA256SUMS.part
cdea44cd319f2d2a8888fc7f68c5b8d89d8baa63bc019d949c26c141021c5e43 guix-build-8558902e576e/output/x86_64-linux-gnu/bitcoin-8558902e576e-x86_64-linux-gnu-debug.tar.gz
64dd0fa4fd0c08a9561b0aaaa5e8f1642d4f1ff475be43e3ebf9f94857175292 guix-build-8558902e576e/output/x86_64-linux-gnu/bitcoin-8558902e576e-x86_64-linux-gnu.tar.gz
f37da8124a6392893fc7b18cfd72c616cac022eaed66725b1632b9e0011e1391 guix-build-8558902e576e/output/x86_64-w64-mingw32/SHA256SUMS.part
aa44003342fd3e4fb9d8c1693d12d31788626988cd9f47840e21afe9203deef0 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-codesigning.tar.gz
ad14fac93313dcaaba144f944cd0058ef1581bc582645d20f5c414a0db116e14 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-debug.zip
3ae1c3daa2a7932e83a84b2ea1b9a8ebcc912fbfe2dfad9b98b3f38ce402f292 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-setup-unsigned.exe
59f31a2c09aac36b3b666217443f311945199255a85f5c78751ae7d9936083a5 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-unsigned.zip
f37da8124a6392893fc7b18cfd72c616cac022eaed66725b1632b9e0011e1391 guix-build-8558902e576e/output/x86_64-w64-mingw32/SHA256SUMS.part
aa44003342fd3e4fb9d8c1693d12d31788626988cd9f47840e21afe9203deef0 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-codesigning.tar.gz
ad14fac93313dcaaba144f944cd0058ef1581bc582645d20f5c414a0db116e14 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-debug.zip
3ae1c3daa2a7932e83a84b2ea1b9a8ebcc912fbfe2dfad9b98b3f38ce402f292 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-setup-unsigned.exe
59f31a2c09aac36b3b666217443f311945199255a85f5c78751ae7d9936083a5 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-unsigned.zip
Can we just update Qt?
minimum GCC version for Windows cross-compilation to 13.1.
Have you checked that it doesn't work with 12? According to the documentation, Qt 6.7 (which we currently use) doesn't support any of our Linux compilers. i.e GCC 12+: https://doc.qt.io/archives/qt-6.7/supported-platforms.html#linux-x11, or macOS cross-compilation using Clang: https://doc.qt.io/archives/qt-6.7/supported-platforms.html#macos. So its not clear why we would need to bump things or can't use anyhting other than what Qt claims to support, but only for Windows?
For reference, this is what I get building master x86_64-w64-mingw32-gcc (GCC) 13-posix WSL/Depends build
without this patch (issue: https://github.com/bitcoin-core/gui/issues/906)
<img width="776" height="158" alt="image" src="https://github.com/user-attachments/assets/8ad1ffec-4331-4439-b22e-df008eabc57e" />
The amount inputbox/spinner is too small and inputed amount is not visible.
minimum GCC version for Windows cross-compilation to 13.1.
Have you checked that it doesn't work with 12?
This branch fails to cross-compile on Debian Bookworm with GCC 12.2.0:
/home/hebasto/bitcoin/depends/work/build/x86_64-w64-mingw32/qt/6.9.3-d5ebe8f681b/qtbase/src/3rdparty/pcre2/src/pcre2_compile.c: In function ‘pcre2_compile_16’:
/home/hebasto/bitcoin/depends/work/build/x86_64-w64-mingw32/qt/6.9.3-d5ebe8f681b/qtbase/src/3rdparty/pcre2/src/pcre2_compile.c:11093:1: internal compiler error: in i386_pe_seh_unwind_emit, at config/i386/winnt.cc:1274
I'd say it is fine to bump the minimum required to 13 for win-cross compilation:
diff --git a/doc/build-windows.md b/doc/build-windows.md
index ce822dd0dc..9d3ec9cd86 100644
--- a/doc/build-windows.md
+++ b/doc/build-windows.md
@@ -15,6 +15,7 @@ Other options which may work, but which have not been extensively tested are (pl
The instructions below work on Ubuntu and Debian. Make sure the distribution's `g++-mingw-w64-x86-64-posix`
package meets the minimum required `g++` version specified in [dependencies.md](dependencies.md).
+If compiling with the GUI (default in depends), at least g++ version 13 is required.
Installing Windows Subsystem for Linux
---------------------------------------
But no strong opinion. Either way is fine.
Either way is fine.
We should also bear in mind that the fix for the original issue needs to be backported to 30.x.
This branch fails to cross-compile on Debian Bookworm with GCC 12.2.0:
That's the same issue we work around in CMake, which is fixed by just turning off stack-clash-protection: https://github.com/fanquake/bitcoin/commit/26e809127d9fb4c30c8c1bc36f430920c392abaf. However it looks like there are other issues, possibly due to https://github.com/qt/qtbase/commit/d25d9f2c2673bc287590d9a83bd7ef1357d7021a#diff-4ae1a340d7e79a6402009cb635708b4950b1633f4bc850aba49ab592becee725. That commit is a bit confusing, because it says:
as of v13.1.0, MinGW supports most of the definitions in these headers.
However there is no v13.1.0 of mingw-w64: https://www.mingw-w64.org/changelog/. The latest release is v13.0.0, and at the time of that commit, it was v11.0.1. So v13.1.0 seems to be in reference to the version of GCC, rather than the version of the headers used.
as of v13.1.0, MinGW supports most of the definitions in these headers.
However there is no v13.1.0 of mingw-w64: https://www.mingw-w64.org/changelog/. The latest release is v13.0.0, and at the time of that commit, it was v11.0.1. So v13.1.0 seems to be in reference to the version of GCC, rather than the version of the headers used.
I assume they were referring to the GCC cross-compiler version, not mingw-w64 itself.
Friendly ping @davidgumberg @hodlinator :)
Concept ACK on applying the patch for now.
Guix Build (x86_64):
6d741dc4705f40f8b75abb084e232a2918565a22b2d000587fb952d91c1d8637 guix-build-8558902e576e/output/dist-archive/bitcoin-8558902e576e.tar.gz
f37da8124a6392893fc7b18cfd72c616cac022eaed66725b1632b9e0011e1391 guix-build-8558902e576e/output/x86_64-w64-mingw32/SHA256SUMS.part
aa44003342fd3e4fb9d8c1693d12d31788626988cd9f47840e21afe9203deef0 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-codesigning.tar.gz
ad14fac93313dcaaba144f944cd0058ef1581bc582645d20f5c414a0db116e14 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-debug.zip
3ae1c3daa2a7932e83a84b2ea1b9a8ebcc912fbfe2dfad9b98b3f38ce402f292 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-setup-unsigned.exe
59f31a2c09aac36b3b666217443f311945199255a85f5c78751ae7d9936083a5 guix-build-8558902e576e/output/x86_64-w64-mingw32/bitcoin-8558902e576e-win64-unsigned.zip
ACK 8558902e576e2c2d66f6083b66953dd6cc464de4 - did not test on Windows.