Follows up to #31048 (review).
We definitely cannot claim that Bitcoin Core is “supported and extensively tested on” on Windows 7.
Note that #30997 is also increasing the minimum required Windows version (for the GUI) to 10.
Follows up to #31048 (review).
We definitely cannot claim that Bitcoin Core is “supported and extensively tested on” on Windows 7.
Note that #30997 is also increasing the minimum required Windows version (for the GUI) to 10.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31172.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | hodlinator, hebasto |
Concept ACK | laanwj, sipsorcery, jarolrod, 1440000bytes |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Tested 49994fadb3b71552fd99acd8671c52e08284b5e9.
The cross-compiled on Ubuntu 24.10 bitcoind.exe
fails to run on Windows 11 Pro 23H2.
UPD:
0> .\bitcoind.exe
1> $LASTEXITCODE
2-1073741701
UPD2. If I’m not mistaken, this means STATUS_INVALID_IMAGE_FORMAT
.
The cross-compiled on Ubuntu 24.10 bitcoind.exe fails to run on Windows 11 Pro 23H2.
Can you provide some actionable information? The CI and cross-compiled unit tests have run & passed.
The cross-compiled on Ubuntu 24.10 bitcoind.exe fails to run on Windows 11 Pro 23H2.
Can you provide some actionable information? The CI and cross-compiled unit tests have run & passed.
The only difference from CI is that I run bitcoind.exe
on Windows, not under Wine.
297@@ -298,9 +298,9 @@ if(WIN32)
298 # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
299 try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_interface SKIP_LINK)
300 try_append_linker_flag("-static" TARGET core_interface)
301- # We require Windows 7 (NT 6.1) or later.
302- try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface)
303- try_append_linker_flag("-Wl,--minor-subsystem-version,1" TARGET core_interface)
304+ # We require Windows 10 (NT10.0) or later.
Concept ACK.
tACK 49994fadb3b71552fd99acd8671c52e08284b5e9 on Win11 23H2 msvc (via cmake).
The cross-compiled on Ubuntu 24.10 bitcoind.exe fails to run on Windows 11 Pro 23H2.
Can you provide some actionable information? The CI and cross-compiled unit tests have run & passed.
The only difference from CI is that I run
bitcoind.exe
on Windows, not under Wine.
This seems like even more reason to do #31071.
This branch @ 7dd0ee89a092c6ec4e305fbdb0cf3afa9e41cab6 rebased on top of the #31176 fails to run bitcoind.exe -version
on Windows: https://github.com/hebasto/bitcoin/actions/runs/11573661347/job/32217245422.
Using GUIX to produce binaries, I’m able to run the base commit of this PR (bitcoin-da10e0bab4a3-win64-setup-unsigned.exe), but unable to run the binaries installed from the current PR commit (bitcoin-7dd0ee89a092-win64-setup-unsigned.exe):
System: Edition Windows 11 Home Version 23H2 OS build 22631.4317
Reproduced the same crash in Windows 10 22H2 (Build 19045.5011)
It appears that windows subsystem versions above 6,2 require some buffer canary features that we can’t have with MinGW (similar downstream issue in kde’s QBS and upstream bug report in mingw) it seems vestigial support in MinGW for the /GS
features were removed since they did not work properly, and the relevant mailing list thread seems to suggest that MinGW won’t fix this in their CRT layer over MSVCRT and suggest linking against UCRT instead.
I also tested mingw binaries built without the subsystem linker flags, and confirmed that they run without issue on the same Windows 10 build as above, and Windows 7 x64 SP1.
Edit: mingw-w64 has switched to building with UCRT by default from mingw versions after 12: https://github.com/mingw-w64/mingw-w64/blob/0d42217123d3aec0341b79f6d959c76e09648a1e/mingw-w64-doc/howto-build/ucrt-vs-msvcrt.txt
I’ve built this branch on Fedora 41, linking against UCRT (see this workflow), but the issue persists.
+1: built this branch on Fedora 40 doing a similar workflow and the same crash occurred:
0ucrt64-make -C depends/ HOST=x86_64-w64-mingw32 -j $(nproc) # rpm macro: /usr/lib/rpm/macros.d/macros.ucrt64
1cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
2cmake --build build -j $(nproc)
I was mistaken above, linking against UCRT doesn’t make the executable build with /GS
enabled.
What was being said on MinGW mailing list was that partial support for /GS
had previously been faked only to mitigate some other issue that could be better solved by linking against UCRT.
Partial solution: bumping the subsystem version to 6,2 works as intended on Windows 7 1, preventing execution with the error [program.exe] is not a valid Win32 application
But, executables will still launch on Windows 8.1 in my testing.2
I tested a mingw+UCRT build (w/ no subsys version flags) and executables fail on base installs of W8.1 but after installing all updates they work.
Nit:
Maybe update depends/hosts/mingw32.mk
:
0--- a/depends/hosts/mingw32.mk
1+++ b/depends/hosts/mingw32.mk
2
3 mingw32_cmake_system_name=Windows
4-# Windows 7 (NT 6.1).
5+# Windows 10 (NT 10.0).
6-mingw32_cmake_system_version=6.1
7+mingw32_cmake_system_version=10.0
We could also set the PE header values that according to MS docs represent the minimum OS version, but Windows doesn’t do anything with this afaict:
0--- a/CMakeLists.txt
1+++ b/CMakeLists.txt
2
3 # We require Windows 10 (NT10.0) or later.
4+ try_append_linker_flag("-Wl,--major-os-version,10" TARGET core_interface)
5+ try_append_linker_flag("-Wl,--minor-os-version,0" TARGET core_interface)
6 try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface)
7 try_append_linker_flag("-Wl,--minor-subsystem-version,2" TARGET core_interface)
Windows 7 x64 SP1 ISO from: https://archive.org/details/win-7-pro-sp1-english
0$ sha256sum Win7_Pro_SP1_English_x64.iso
13dae1a531b90fa72e59b4a86b20216188d398c8c070da4a5c5a44fe08b1b6e55 Win7_Pro_SP1_English_x64.iso
Windows 8.1 x64 ISO from: https://archive.org/details/win-8.1 Product key from Microsoft: https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys#earlier-versions-of-windows-client
0$ sha256sum Win8.1_EnglishUS_x64.iso
1d8333cf427eb3318ff6ab755eb1dd9d433f0e2ae43745312c1cd23e83ca1ce51 Win8.1_EnglishUS_x64.iso
42@@ -43,7 +43,7 @@ Compatibility
43 ==============
44
45 Bitcoin Core is supported and extensively tested on operating systems
46-using the Linux Kernel 3.17+, macOS 13.0+, and Windows 7 and newer. Bitcoin
47+using the Linux Kernel 3.17+, macOS 13.0+, and Windows 10 and newer. Bitcoin
CI is only testing one of Windows 10, or Windows 11. So I think claiming that both are “extensively” tested may not be true, as limited feedback is available about local testing efforts. (Same for the Linux kernel and macOS).
Maybe just drop “extensively”?
My Guix build:
0aarch64
1061fe1fb0c9d3ce9f564c19d1ddc60127a8fb3cae0cb24b4726c27dd41498c04 guix-build-0440c406eedb/output/dist-archive/bitcoin-0440c406eedb.tar.gz
22a0198646e6cbf8c61baf683bf36a25a826d19b8941e7b3a9cfeb04914d39aed guix-build-0440c406eedb/output/x86_64-w64-mingw32/SHA256SUMS.part
3bdc9fb82b0f1a5dd361392f41aa09fe158448009f92c9914c04096d9ca47458c guix-build-0440c406eedb/output/x86_64-w64-mingw32/bitcoin-0440c406eedb-win64-debug.zip
4896dcec8adae706035a693bf56a8ec8b3a88a5fb44e889851b1d650db5380c0f guix-build-0440c406eedb/output/x86_64-w64-mingw32/bitcoin-0440c406eedb-win64-setup-unsigned.exe
5ddbc0fd56134360f7d28b2d5dad95dbf94514c89cd5f162dee0c9a8a855b5c0c guix-build-0440c406eedb/output/x86_64-w64-mingw32/bitcoin-0440c406eedb-win64-unsigned.tar.gz
65c4adf6823929ebe1d91aa7be07c7af3a341dc7eddf734151e6d201399121637 guix-build-0440c406eedb/output/x86_64-w64-mingw32/bitcoin-0440c406eedb-win64.zip
test_bitcoin.exe
, bitcoind.exe
, bitcoin-qt.exe
, and the installer have been tested on Windows 11 Pro 23H2.
292@@ -293,9 +293,12 @@ if(WIN32)
293 # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412.
294 try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_interface SKIP_LINK)
295 try_append_linker_flag("-static" TARGET core_interface)
296- # We require Windows 7 (NT 6.1) or later.
297+ # We support Windows 10+, however it's not possible to set these values accordingly,
298+ # due to a bug in mingw-w64 when using CRT. See https://sourceforge.net/p/mingw-w64/bugs/968/.
299+ # As a best effort, set these values to target Windows 8, until we switch to building
300+ # against UCRT.
however it’s not possible to set these values accordingly, due to a bug in mingw-w64 when using CRT
I think blaming it on the CRT is incorrect? See comment:
I was mistaken above, linking against UCRT doesn’t make the executable build with /GS enabled.
Reviewed 0440c406eedbc16fa1ce6c77a802b7ea60a79057
Left one concern about comment block.
Runs fine on my Windows 11.
I don’t like error messages like “bitcoind.exe is not a valid Win32 application.” on Windows 7. Until we introduce a real dependency on Windows 10, I would prefer a custom MessageBox saying “Requires Windows 10” during startup. But maybe we’ll introduce such a dependency soon, making it not worth the effort.
Also experimented with making the NSIS installer require Windows 10 but didn’t find a robust way of doing it (ManifestSupportedOS Win10
in setup.nsi still seemed to execute without any issues on Win7 VM). Maybe migrating to a more robust installer generator could be a way forward (msitools might be something? haven’t tried it). Users might just download the .ZIP archive though, bypassing the installer.
While we will only outwardly support Windows 10+, due to an issue in
mingw-w64, we can't set the *-subsystem-version values higher than to
target Windows 8, so do that as a best effort.
We no-longer support GCC 10.
cr-ACK ee1128ead846698db5e5633f193883837f2fbc64
git range-diff master 0440c40 ee1128e
:
Guix build:
0606d0909c4591fc7dac3759e230e7bd3de00555c1c535d437ca8bc19df85fc70 guix-build-ee1128ead846/output/aarch64-linux-gnu/SHA256SUMS.part
14aca1c476b6824d485044c6636ce2ecf45f542a89bc501493f4868cf16c13d1f guix-build-ee1128ead846/output/aarch64-linux-gnu/bitcoin-ee1128ead846-aarch64-linux-gnu-debug.tar.gz
246d17a50226b60af12124b9c2b70cdab1c257a2034463999c0340d8a8b573cdd guix-build-ee1128ead846/output/aarch64-linux-gnu/bitcoin-ee1128ead846-aarch64-linux-gnu.tar.gz
3d82c381c8d4e888ea552ba947dbb4ef85dadefc1d9f12c0dfd7cfbcca8866d15 guix-build-ee1128ead846/output/arm-linux-gnueabihf/SHA256SUMS.part
4affb095d17f1ca2611b01ae3a09337c10d369f2d45ac14fa3790e08600f90a7f guix-build-ee1128ead846/output/arm-linux-gnueabihf/bitcoin-ee1128ead846-arm-linux-gnueabihf-debug.tar.gz
5a44a0c72c26c0f7eb83ba0996bf36bb4de4045b4312bb3b53fff9bee31bf0de9 guix-build-ee1128ead846/output/arm-linux-gnueabihf/bitcoin-ee1128ead846-arm-linux-gnueabihf.tar.gz
61b8f57869d6175d4ea77a430656b502b104406d239b47c1bede0500d416582dc guix-build-ee1128ead846/output/arm64-apple-darwin/SHA256SUMS.part
7192fbfe0286b237135c760847c18e9f589e8e7eda0006e327b6c58a78e6aa921 guix-build-ee1128ead846/output/arm64-apple-darwin/bitcoin-ee1128ead846-arm64-apple-darwin-unsigned.tar.gz
84023daf0a98d2f8a2649a513c6a3ad37a5fff473a4214e05710a2b339eb7a154 guix-build-ee1128ead846/output/arm64-apple-darwin/bitcoin-ee1128ead846-arm64-apple-darwin-unsigned.zip
9ac91f9d78f6e2bfbd78b6850c5875c4f57328c8bd9e66846b2fec3d09ff56011 guix-build-ee1128ead846/output/arm64-apple-darwin/bitcoin-ee1128ead846-arm64-apple-darwin.tar.gz
10193db567f96b6077fb56250de3ce7881b5bd7fbef2d6038cfd11334678273e75 guix-build-ee1128ead846/output/dist-archive/bitcoin-ee1128ead846.tar.gz
11f10fa8c859a4fdffbfcf5403f8afa7d2a5d360f4cac3d1110794597e39ad1a2a guix-build-ee1128ead846/output/powerpc64-linux-gnu/SHA256SUMS.part
127ab698e6b137f63d931e6dc669940d70970574d03f0bcc95da2fd0e222856452 guix-build-ee1128ead846/output/powerpc64-linux-gnu/bitcoin-ee1128ead846-powerpc64-linux-gnu-debug.tar.gz
13c11531f80b52512ef769b195395c2c3135bcee001a7b437682977052025f2b4d guix-build-ee1128ead846/output/powerpc64-linux-gnu/bitcoin-ee1128ead846-powerpc64-linux-gnu.tar.gz
14028782bb9b3938ecb595feebd4a2c1721abf11b188017710bfbe94f6811ab890 guix-build-ee1128ead846/output/riscv64-linux-gnu/SHA256SUMS.part
1517fbb3f0e146e7bcfb82aafc474984489696fdc61364630414799b73537236a6 guix-build-ee1128ead846/output/riscv64-linux-gnu/bitcoin-ee1128ead846-riscv64-linux-gnu-debug.tar.gz
168405dd2c0257f937745eed6e3b91f1fe5e12d6eb8686207de35fcff230533888 guix-build-ee1128ead846/output/riscv64-linux-gnu/bitcoin-ee1128ead846-riscv64-linux-gnu.tar.gz
17aefdb7dfc2b19fd6f04b0f3edfa28d5aa5ffb9d04821c98b0010722598877959 guix-build-ee1128ead846/output/x86_64-apple-darwin/SHA256SUMS.part
18000432b47f9c7ae0b2383185039bf7b28fa4676dcd1a27e201d55f90f41df1f0 guix-build-ee1128ead846/output/x86_64-apple-darwin/bitcoin-ee1128ead846-x86_64-apple-darwin-unsigned.tar.gz
19965d6f620e1cde736b6abc7497ee9101994752bb38b0ae6a834d28ecc816765c guix-build-ee1128ead846/output/x86_64-apple-darwin/bitcoin-ee1128ead846-x86_64-apple-darwin-unsigned.zip
203f3d7b69b7536ff1434686ac746d4c51b7f7d540bb33b93190d778140f022456 guix-build-ee1128ead846/output/x86_64-apple-darwin/bitcoin-ee1128ead846-x86_64-apple-darwin.tar.gz
212ffb03ac8dd368732da06c68b7229a90a7e890293d511666d7e41e951fde5839 guix-build-ee1128ead846/output/x86_64-linux-gnu/SHA256SUMS.part
22eb026202a6f7f50431959ef68428f93f09b6ff33daaf0aca7b0b692707ebadb8 guix-build-ee1128ead846/output/x86_64-linux-gnu/bitcoin-ee1128ead846-x86_64-linux-gnu-debug.tar.gz
238a48c7ef316ab8d09c1f564f8379736956d5d3fc31591bb5df9ddfdba0098535 guix-build-ee1128ead846/output/x86_64-linux-gnu/bitcoin-ee1128ead846-x86_64-linux-gnu.tar.gz
24a7860b5b16fffe6a15ae5960ae9b3163029e4afc569c5379e91256c7b84675d1 guix-build-ee1128ead846/output/x86_64-w64-mingw32/SHA256SUMS.part
2585b36d60604e5f3e2ab443aa532530a05a7420d30b55bf64dc1997d5c77cd1a4 guix-build-ee1128ead846/output/x86_64-w64-mingw32/bitcoin-ee1128ead846-win64-debug.zip
26d829d29f4333d087e9be1e76e190dd6485d8e3baa8aa8cfe4c5c56c4c563fc11 guix-build-ee1128ead846/output/x86_64-w64-mingw32/bitcoin-ee1128ead846-win64-setup-unsigned.exe
27c1a986667086ebe69f07ebfbcbaaea987231230693bc095d4211592109337267 guix-build-ee1128ead846/output/x86_64-w64-mingw32/bitcoin-ee1128ead846-win64-unsigned.tar.gz
282b08307bd83467ca35e1df66a36eb0c72f2d1901c0e9217f96686ab02edd3b13 guix-build-ee1128ead846/output/x86_64-w64-mingw32/bitcoin-ee1128ead846-win64.zip
fanquake
DrahtBot
hebasto
laanwj
sipsorcery
jarolrod
1440000bytes
hodlinator
davidgumberg
maflcko
TheCharlatan
Labels
Build system
Milestone
29.0