A follow-up reverting #36057, now that we've branched off for 33.x.
Also documents mingw-w64 requirements (#32380).
Revert #36057 & document mingw-w64 requirement #36271
pull fanquake wants to merge 3 commits into bitcoin:master from fanquake:revert_36057 changing 6 files +5 −20-
fanquake commented at 12:36 PM on September 16, 2026: member
-
DrahtBot commented at 12:36 PM on September 16, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
External sites
- Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36271
- Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36271.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36271#author-ralph
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process.
Type Reviewers ACK willcl-ark, hebasto Stale ACK ViniciusCestarii, hodlinator If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #36042 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36042.svg"></sub> (build: Bump g++ minimum supported version to 13 by maflcko)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
- fanquake force-pushed on Sep 16, 2026
-
in depends/README.md:170 in bc63b06914
166 | @@ -167,7 +167,6 @@ Some Ubuntu or Debian versions may not offer a working package. In this case, 167 | you may install `nix-bin` and use the Nix shell from the repository root: 168 | 169 | apt install nix-bin 170 | - NIX_BUILD_SHELL=bash HOST=x86_64-w64-mingw32 nix-shell contrib/devtools/shell-win64-cross.nix # MSVCRT 171 | NIX_BUILD_SHELL=bash HOST=x86_64-w64-mingw32ucrt nix-shell contrib/devtools/shell-win64-cross.nix # UCRT
maflcko commented at 2:01 PM on September 16, 2026:I think this one can be removed as well now:
diff --git a/contrib/devtools/shell-win64-cross.nix b/contrib/devtools/shell-win64-cross.nix index 4fd83b0..7e0da92 100644 --- a/contrib/devtools/shell-win64-cross.nix +++ b/contrib/devtools/shell-win64-cross.nix @@ -10,8 +10,3 @@ let - host = builtins.getEnv "HOST"; - crossPkgs = if host == "x86_64-w64-mingw32ucrt" - then pkgs.pkgsCross.ucrt64 - else if host == "x86_64-w64-mingw32" - then pkgs.pkgsCross.mingwW64 - else throw "Unsupported HOST: ${host}"; + crossPkgs = pkgs.pkgsCross.ucrt64; toolchain = crossPkgs.stdenv.cc.targetPrefix; diff --git a/depends/README.md b/depends/README.md index 3cee78a..f17bcab 100644 --- a/depends/README.md +++ b/depends/README.md @@ -169,4 +169,3 @@ you may install `nix-bin` and use the Nix shell from the repository root: apt install nix-bin - NIX_BUILD_SHELL=bash HOST=x86_64-w64-mingw32ucrt nix-shell contrib/devtools/shell-win64-cross.nix # UCRT + NIX_BUILD_SHELL=bash nix-shell contrib/devtools/shell-win64-cross.nix
fanquake commented at 2:07 PM on September 16, 2026:Sure, dropped.
fanquake force-pushed on Sep 16, 2026DrahtBot added the label CI failed on Sep 16, 2026DrahtBot removed the label CI failed on Sep 16, 2026ViniciusCestarii commented at 7:28 PM on September 16, 2026: contributorACK ce76c082cead6a107d1c95f584a0eff390b3539f
DrahtBot requested review from hebasto on Sep 16, 2026in src/util/threadnames.cpp:36 in ce76c082ce outdated
32 | @@ -35,7 +33,7 @@ static void SetThreadName(const char* name) 33 | pthread_set_name_np(pthread_self(), name); 34 | #elif defined(__APPLE__) 35 | pthread_setname_np(name); 36 | -#elif defined(HAVE_SETTHREADDESCRIPTION) 37 | +#elif defined(WIN32)
hodlinator commented at 11:53 AM on September 21, 2026:One could potentially retain the
HAVE_SETTHREADDESCRIPTIONlogic and make it fail at compile time:#if defined(WIN32) && !defined(HAVE_SETTHREADDESCRIPTION) #error "At least Mingw-w64 version 12.0 is required." #endifBut I'm okay with just documenting the minimum version as well, and dropping
HAVE_SETTHREADDESCRIPTIONto keep build complexity down.hodlinator approvedhodlinator commented at 12:21 PM on September 21, 2026: contributorACK ce76c082cead6a107d1c95f584a0eff390b3539f
Makes sense to drop remaining MSVCRT logic now that #33593 was merged.
Only remaining but probably acceptable references to "MSVCRT" in the repo are now overriding to UCRT:
Completed Linux->Windows cross CI locally:
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'MAKEJOBS="-j$(nproc)" FILE_ENV="./ci/test/00_setup_env_win64.sh" ./ci/test_run_all.sh'(test_run_all.sh calls 02_run_container.py which calls shell-win64-cross.nix since 00_setup_env_win64.sh set
HOST=x86_64-w64-mingw32ucrt).maflcko added this to the milestone 33.0 on Sep 21, 2026hebasto approvedhebasto commented at 9:23 PM on September 22, 2026: memberACK ce76c082cead6a107d1c95f584a0eff390b3539f, I have reviewed the code and it looks OK.
However, I'd like to leave a couple of thoughts regarding versioning of the Windows cross-build toolchain.
The MinGW-w64 version should be logged in the configure summary, along with the compiler version. See the proposal in #36029.
Historically, we were bound to whichever combination of MinGW-w64 and GCC a particular distribution shipped. Switching to Nix opens the door to testing every documented combination (with some patching).
So I tried MinGW-w64 12.0.0 + GCC 12.4.0:
The
wallet_migration.pytest fails. ~I haven't looked into it yet, but it may be a reason to bump the minimum supported MinGW-w64 version to 13.0, which contains many bug fixes.~Requiring GCC 13 or newer for the GUI appears unnecessary. Perhaps I misjudged the minimum toolchain requirements in 0a6724aaae973659b6c44eb5a062aaaaf57be870.
hebasto commented at 11:00 AM on September 23, 2026: member- The
wallet_migration.pytest fails.
This turned out to be a libstdc++ bug. It was fixed on master (GCC 15.1) and backported to GCC 14 (https://github.com/gcc-mirror/gcc/commit/35c98149a5c7af9159fa7615d8d827b3aaa3cc97, first in GCC 14.3.0) and GCC 13 (https://github.com/gcc-mirror/gcc/commit/8b3e47b4099f319e38d357f7c646f51040a13d6e, first in GCC 13.4.0).
GCC 12 never received the backport, so every 12.x release remains broken.
I believe we should handle these cases somehow.
DrahtBot added the label Needs rebase on Sep 24, 2026fanquake force-pushed on Sep 25, 2026fanquake force-pushed on Sep 25, 2026DrahtBot added the label CI failed on Sep 25, 2026DrahtBot removed the label CI failed on Sep 25, 2026DrahtBot removed the label Needs rebase on Sep 25, 2026fanquake requested review from hebasto on Sep 29, 2026fanquake force-pushed on Oct 2, 2026hebasto approvedhebasto commented at 4:29 PM on October 2, 2026: memberACK b6eebe027eb59a7cafc3814b48658708bbc4b8e2.
DrahtBot requested review from ViniciusCestarii on Oct 2, 2026DrahtBot requested review from hodlinator on Oct 2, 20268073ff101fRevert "build: check for SetThreadDescription() at configure time"
This reverts commit bed46bd16c2b34eec62849b96cebbbdbcdd2c1ac.
doc: document mingw-w64 requirement in Windows build docs cd7605a6b7nix: drop MSVCRT build 1c96b08cb6in contrib/devtools/shell-win64-cross.nix:12 in b6eebe027e
13 | - then pkgs.pkgsCross.ucrt64 14 | - else if host == "x86_64-w64-mingw32" 15 | - then pkgs.pkgsCross.mingwW64 16 | - else throw "Unsupported HOST: ${host}"; 17 | + baseCrossPkgs = pkgs.pkgsCross.ucrt64; 18 | crossPkgs = baseCrossPkgs.extend (_: _: {
willcl-ark commented at 9:02 PM on October 2, 2026:In b6eebe027eb59a7cafc3814b48658708bbc4b8e2
I think this slight simplification should work too, if you retouch:
crossPkgs = pkgs.pkgsCross.ucrt64.extend (_: _: {
fanquake commented at 10:12 AM on October 3, 2026:Thanks, taken.
fanquake force-pushed on Oct 3, 2026DrahtBot added the label CI failed on Oct 3, 2026DrahtBot removed the label CI failed on Oct 3, 2026willcl-ark approvedwillcl-ark commented at 9:19 AM on October 5, 2026: memberutACK 1c96b08cb60bee930ed390de019a2cf943445ef5
If i have it all correct, after this PR:
- our Windows cross-build CI, Guix release builds, and Nix shell use UCRT.
- MinGW-w64 12 itself still supports both UCRT and MSVCRT. the version requirement does not force any runtime choice on native windows builders.
- our documented cross-build instructions use UCRT, while native MinGW-w64 builds are not officially tested.
DrahtBot requested review from hebasto on Oct 5, 2026hebasto approvedhebasto commented at 7:03 AM on October 11, 2026: memberre-ACK 1c96b08cb60bee930ed390de019a2cf943445ef5.
hebasto merged this on Oct 11, 2026hebasto closed this on Oct 11, 2026fanquake deleted the branch on Oct 11, 2026
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-11 10:51 UTC
More mirrored repositories can be found on mirror.b10c.me