Skip to content

Commit cb70a69

Browse files
fanquakeknst
authored andcommitted
Merge bitcoin#24131: build, qt: Fix Windows cross-compiling with Qt 5.15
BACKPORT NOTE: extra changes in build-windows.md due to missing bitcoin#11438 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#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#22093 (comment)). ACKs for top commit: prusnak: ACK 9796dca Tree-SHA512: 0dc46c5dfab85bd6d2901052cd630e86f9b4e09c08ef87136b44ddecb1783cdf3cd0a6e67b95ac7a78da24cd7adedc88745f61f9a8d9993fbff26d33bf88d874
1 parent 95a29e2 commit cb70a69

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

ci/test/05_before_script.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ fi
2121
if [ -n "$XCODE_VERSION" ] && [ -f "$OSX_SDK_PATH" ]; then
2222
CI_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
2323
fi
24-
if [[ $HOST = *-mingw32 ]]; then
25-
CI_EXEC update-alternatives --set "${HOST}-g++" \$\(which "${HOST}-g++-posix"\)
26-
fi
2724
if [ -z "$NO_DEPENDS" ]; then
2825
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
2926
SHELL_OPTS="CONFIG_SHELL=/bin/dash"

contrib/containers/ci/ci.Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ RUN set -ex; \
3333
zip \
3434
&& rm -rf /var/lib/apt/lists/*
3535

36-
# Make sure std::thread and friends are available
37-
RUN update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix; \
38-
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; \
39-
exit 0
40-
4136
# Install Clang + LLVM and set it as default
4237
RUN set -ex; \
4338
apt-get update && apt-get install ${APT_ARGS} \

doc/build-windows.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,17 @@ See [dependencies.md](dependencies.md) for a complete overview.
3939
## Building for 64-bit Windows
4040

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

43-
sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
44+
```sh
45+
sudo apt install g++-mingw-w64-x86-64-posix
46+
```
47+
48+
- on older systems:
49+
50+
```sh
51+
sudo apt install g++-mingw-w64-x86-64
52+
```
4453

4554
Once the toolchain is installed the build steps are common:
4655

0 commit comments

Comments
 (0)