Having qt(@6) breaks build for qt@5 on macOS 15.0 and 13.7 #31009

issue Sjors openend this issue on October 1, 2024
  1. Sjors commented at 12:39 pm on October 1, 2024: member

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    Building bitcoin-qt produces a flood of errors:

    0In file included from /Users/sjors/dev/bitcoin/src/qt/csvmodelwriter.cpp:5:
    1In file included from /Users/sjors/dev/bitcoin/src/qt/csvmodelwriter.h:8:
    2In file included from /usr/local/opt/qt@5/lib/QtCore.framework/Headers/QList:1:
    3In file included from /usr/local/opt/qt@5/lib/QtCore.framework/Headers/qlist.h:48:
    4/usr/local/include/QtCore/qvector.h:20:32: error: no template named 'QMutableListIterator'
    5   20 | using QMutableVectorIterator = QMutableListIterator<T>;
    6      |                                ^
    7/usr/local/include/QtCore/qvector.h:22:25: error: no template named 'QListIterator'
    8   22 | using QVectorIterator = QListIterator<T>;
    9      |                         ^
    

    Building with depends works fine (qt 5.15.14).

    Homebrew is still at version 5.15.13. I don’t know if 5.15.14 fixes something, or if there’s another reason why depends works but homebrew doesn’t. There’s currently no open PR to bump homebrew’s version, an earlier attempt was abandoned: https://github.com/Homebrew/homebrew-core/pull/172934

    I’m not sure when this started happening. E.g. the commit 338bc2cd261ba3daf7fb494f8cb4a534762e292c which introduced cmake has the same issue.

    I though perhaps it’s a change in macOS itself. But I also tried on macOS 13.7 Ventura, with Xcode 15.2 which gives me similar errors.

    Another possibility could be recent homebrew qt change: https://github.com/Homebrew/homebrew-core/commits/master/Formula/q/qt%405.rb

    Expected behaviour

    To build bitcoin-qt.

    Steps to reproduce

    Install qt@5 via homebrew, 5.15.13 is the latest version.

    0cmake -B build -DBUILD_GUI=ON
    

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master@fc642c33ef28829eda0119a0fe39fd9bc4b84051

    Operating system and version

    macOS 15.0

    Machine specifications

    No response

  2. Sjors renamed this:
    Qt build fails on macOS 15.0
    Qt build fails on macOS 15.0 and 13.7
    on Oct 1, 2024
  3. Sjors commented at 12:42 pm on October 1, 2024: member

    Oh, the problem is the presence of qt (6) in combination with qt@5, which I installed for testing #30997.

    brew remove qt “fixes” it.

  4. Sjors renamed this:
    Qt build fails on macOS 15.0 and 13.7
    Having qt(@6) breaks build for qt@5 on macOS 15.0 and 13.7
    on Oct 1, 2024
  5. fanquake commented at 12:57 pm on October 1, 2024: member
    I assume this is related to AUTOMOC, and CMake getting confused and picking the wrong tooling to use.
  6. bitcoin deleted a comment on Oct 2, 2024
  7. jarolrod commented at 9:17 pm on October 2, 2024: member

    Confirming the same issue when building the current master with both qt@6 and qt@5 installed (on macOS 14.6). No issue (to the builder) when building the Qt6 PR branch. Interesting that we have this regression again, assuming related to the CMAKE migration. Related discussions:

    Previous version of this regression fixed by: https://github.com/bitcoin/bitcoin/pull/26056

  8. maflcko added the label macOS on Oct 24, 2024
  9. maflcko added the label Build system on Oct 24, 2024
  10. fanquake commented at 12:34 pm on March 5, 2025: member
    Looks like this is still an issue. So this should either be documented for macOS builders (that they’ll need to uninstall qt if it happens to be installed, whch is decently likely (and increasingly so into the future)), or the underlying issue fixed?
  11. fanquake added this to the milestone 29.0 on Mar 5, 2025
  12. Sjors commented at 12:40 pm on March 5, 2025: member

    I ran into it again a week or so ago, so I don’t think it’s fixed.

    (though I didn’t compare the exact error, building worked again once I uninstalled qt6)

  13. Sjors commented at 10:03 am on March 7, 2025: member
    I opened #32017 to document this behavior. I suggest we add that PR to the milestone and remove this issue from it. The actual problem can be solved later.
  14. hebasto commented at 1:54 pm on March 7, 2025: member

    I’m not sure when this started happening. E.g. the commit 338bc2c which introduced cmake has the same issue.

    I can confirm that this is a regression after migrating to CMake.

  15. hebasto commented at 2:54 pm on March 7, 2025: member

    I assume this is related to AUTOMOC, and CMake getting confused and picking the wrong tooling to use.

    From my perspective, Qt messes with included directories when compiling qt/bitcoinqt_autogen/mocs_compilation.cpp.

  16. hebasto commented at 3:05 pm on March 7, 2025: member

    I opened #32017 to document this behavior. I suggest we add that PR to the milestone and remove this issue from it. The actual problem can be solved later.

    In that case, this issue shouldn’t be a blocker for the v29.0 release.

  17. hebasto referenced this in commit 5f732089d6 on Mar 8, 2025
  18. hebasto removed this from the milestone 29.0 on Mar 8, 2025
  19. hebasto commented at 11:32 am on March 8, 2025: member

    I opened #32017 to document this behavior. I suggest we add that PR to the milestone and remove this issue from it. The actual problem can be solved later.

    In that case, this issue shouldn’t be a blocker for the v29.0 release.

    Removed from the 29.0 milestone.


github-metadata-mirror

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: 2025-03-31 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me