MacOS Build Error: Qt 5 and 6 Simultaneously Installed. #25947

issue da2ce7 openend this issue on August 28, 2022
  1. da2ce7 commented at 10:08 pm on August 28, 2022: none

    This error seems to appear when brew install qt@5 is installed at the same time as: brew install qt. (ie, qt version 6):

    0% brew list --version | grep qt
    1
    2qt 6.3.1_1
    3qt@5 5.15.5_1
    
     0Making all in src
     1  CXX      qt/libbitcoinqt_a-bantablemodel.o
     2In file included from qt/bantablemodel.cpp:14:
     3In file included from /usr/local/Cellar/qt@5/5.15.5_1/lib/QtCore.framework/Headers/QLocale:1:
     4/usr/local/Cellar/qt@5/5.15.5_1/lib/QtCore.framework/Headers/qlocale.h:1028:25: error: unknown type name 'QStringRef'; did you mean 'CFStringRef'?
     5    short toShort(const QStringRef &s, bool *ok = nullptr) const;
     6                        ^~~~~~~~~~
     7                        CFStringRef
     8/usr/local/include/QtCore/qdebug.h:531:1: note: 'CFStringRef' declared here
     9Q_FORWARD_DECLARE_CF_TYPE(CFString);
    10^
    11/usr/local/include/QtCore/qglobal.h:802:77: note: expanded from macro 'Q_FORWARD_DECLARE_CF_TYPE'
    12#  define Q_FORWARD_DECLARE_CF_TYPE(type) typedef const struct __ ## type * type ## Ref
    13                                                                            ^
    14<scratch space>:112:1: note: expanded from here
    15CFStringRef
    16^
    
    0% git clean -ffxd
    1% git rev-parse HEAD
    2e191fac4f3c37820f0618f72f0a8e8b524531ab8
    3% ./autogen.sh
    4% ./configure
    5% make
    

    output: https://gist.github.com/da2ce7/c697259e204c961876ad7f7057e95b34

    config.log: https://gist.github.com/da2ce7/ec7276de7d0284681cd73b0cdcb90f3b

    brew list –version –formulae: https://gist.github.com/da2ce7/25d6473224a1d69a28cf24e44abb55b7

    Originally posted by @da2ce7 in #21901 (comment)

  2. hebasto commented at 10:30 pm on August 28, 2022: member

    @da2ce7

    This error seems to appear when brew install qt@5 is installed at the same time as: brew install qt.

    This is unsupported configuration. See: https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md#qt

    Could be fixed after #25797.

  3. hebasto closed this on Aug 28, 2022

  4. da2ce7 referenced this in commit 94d1505dbe on Aug 29, 2022
  5. luke-jr commented at 1:24 am on September 9, 2022: member
    This should be reopened. Unrelated packages shouldn’t break things.
  6. hebasto reopened this on Sep 9, 2022

  7. hebasto added the label macOS on Sep 9, 2022
  8. hebasto added the label Build system on Sep 9, 2022
  9. fanquake commented at 10:25 am on September 9, 2022: member
    There’s more to this than just qt5 and qt6 being installed via brew. I’ve tested building on a macOS (M1) system, with both installed, and there are no compilation problems.
  10. hebasto commented at 6:45 pm on September 9, 2022: member

    I was going to fix this issue, and already had a draft of the patch, but…

    macOS Monterey 12.6 (21G115, Intel):

    0% brew list --version | grep qt
    1qt 6.3.1_3
    2qt@5 5.15.5_2
    

    ~Having the same result as @fanquake:~

    ~there are no compilation problems.~

    ~Definitely, I observed problems in the past, but not now.~

    ~So, @da2ce7 and other devs, who observe such an issue, please provide more details about your systems to let us to reproduce it. Also try to update brew’s packages.~

    EDIT: The build above was configured with --enable-suppress-external-warnings. Without this option I do observe the issue.

  11. hebasto commented at 9:55 pm on September 9, 2022: member
    A fix suggested in #26056 (comment).
  12. fanquake closed this on Sep 14, 2022

  13. fanquake referenced this in commit c67d6f5b5f on Sep 14, 2022
  14. sidhujag referenced this in commit f9a8249fff on Sep 14, 2022
  15. bitcoin locked this on Sep 14, 2023

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: 2024-11-21 09:12 UTC

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