Skip to content

Commit c194293

Browse files
committed
Merge bitcoin/bitcoin#24131: build, qt: Fix Windows cross-compiling with Qt 5.15
9796dca doc: Install only "-posix" MinGW compiler when possible (Hennadii Stepanov) 0bbae23 ci: Drop no longer needed `update-alternatives` (Hennadii Stepanov) 01d1845 build, qt: Specify QMAKE_CXX explicitly (Hennadii Stepanov) Pull request description: While changes introduced in bitcoin/bitcoin#22093 worked fine with Qt 5.12, after bumping Qt up to 5.15 the cross-compiling of `qt` package for Windows fails with `error: ‘mutex’ in namespace ‘std’ does not name a type`. The first commit fixes this bug. The second commit cleans up a related CI script. The third commit improves related docs (see bitcoin/bitcoin#22093 (comment)). ACKs for top commit: prusnak: ACK 9796dca Tree-SHA512: 0dc46c5dfab85bd6d2901052cd630e86f9b4e09c08ef87136b44ddecb1783cdf3cd0a6e67b95ac7a78da24cd7adedc88745f61f9a8d9993fbff26d33bf88d874
2 parents 0f43fb5 + 9796dca commit c194293

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

ci/test/05_before_script.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
4343
CI_EXEC "contrib/install_db4.sh \$(pwd) --enable-umrw CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
4444
fi
4545

46-
if [[ $HOST = *-mingw32 ]]; then
47-
CI_EXEC update-alternatives --set "${HOST}-g++" \$\(which "${HOST}-g++-posix"\)
48-
fi
4946
if [ -z "$NO_DEPENDS" ]; then
5047
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
5148
# CentOS has problems building the depends if the config shell is not explicitly set

depends/packages/qt.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ $(package)_config_opts_mingw32 += -no-dbus
163163
$(package)_config_opts_mingw32 += -no-freetype
164164
$(package)_config_opts_mingw32 += -xplatform win32-g++
165165
$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
166+
$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'"
166167
$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
167168
$(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'"
168169
$(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-"

doc/build-windows.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,17 @@ Acquire the source in the usual way:
4848
## Building for 64-bit Windows
4949

5050
The first step is to install the mingw-w64 cross-compilation tool chain:
51+
- on modern systems (Ubuntu 21.04 Hirsute Hippo or newer, Debian 11 Bullseye or newer):
5152

52-
sudo apt install g++-mingw-w64-x86-64
53+
```sh
54+
sudo apt install g++-mingw-w64-x86-64-posix
55+
```
56+
57+
- on older systems:
58+
59+
```sh
60+
sudo apt install g++-mingw-w64-x86-64
61+
```
5362

5463
Once the toolchain is installed the build steps are common:
5564

0 commit comments

Comments
 (0)