Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jan 23, 2022

While changes introduced in #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 #22093 (comment)).

@fanquake
Copy link
Member

after bumping Qt up to 5.15 the cross-compiling of

We bumped to Qt 5.15 (#23489) more than a month before #22093 was merged. Seems like that PR needed more testing given this isn't the only issue its caused, i.e #24056.

@hebasto
Copy link
Member Author

hebasto commented Jan 25, 2022

after bumping Qt up to 5.15 the cross-compiling of

We bumped to Qt 5.15 (#23489) more than a month before #22093 was merged.

Correct. But PR #22093 branch was not rebased on top of #23489:

$(package)_version=5.12.11

I apologize for that.


Seems like that PR needed more testing given this isn't the only issue its caused, i.e #24056.

Sure. Btw, I still not able to reproduce #24056.

This change allows to drop the `update-alternatives` step if the
`g++-mingw-w64-x86-64` package has been installed.
@hebasto
Copy link
Member Author

hebasto commented Feb 2, 2022

Rebased 9ab1eca -> 9796dca (pr24131.01 -> pr24131.02) due to the conflict with #24212.

@@ -163,6 +163,7 @@ $(package)_config_opts_mingw32 += -no-dbus
$(package)_config_opts_mingw32 += -no-freetype
$(package)_config_opts_mingw32 += -xplatform win32-g++
$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'"
Copy link
Contributor

@prusnak prusnak Feb 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm this single line fixes the Qt build issue with Mingw for me. The rest of the PR is not required for the fix, but still worth merging in.

However, when I inspect Makefile.Release files created by qmake I see the following:

CC            = @echo compiling $< && x86_64-w64-mingw32-gcc
CXX           = @echo compiling $< && x86_64-w64-mingw32-g++-posix

I feel we should do the same for CC so this won't explode in the future. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've noticed this as well when was working on this PR.

I'm not aware of difference between x86_64-w64-mingw32-gcc-posix and x86_64-w64-mingw32-gcc-win32.

Anyway, on the master branch we actually use the latter. So it was not my intention to change the status quo in this PR.

Copy link
Contributor

@prusnak prusnak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9796dca

I tested that make -C depends HOST=x86_64-w64-mingw32 builds Qt with mingw32 sucessfully.

@fanquake fanquake merged commit c194293 into bitcoin:master Feb 3, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 3, 2022
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
@hebasto hebasto deleted the 220123-mingw branch February 3, 2022 21:13
@bitcoin bitcoin locked and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants