Build Error unknown type name ‘QStringRef’; did you mean ‘CFStringRef’? #21901

issue Kalanamith openend this issue on May 10, 2021
  1. Kalanamith commented at 2:32 am on May 10, 2021: none

    Getting the following error when building

    0/usr/local/Cellar/qt@5/5.15.2/lib/QtCore.framework/Headers/qlocale.h:1033:25: error: 
    1      unknown type name 'QStringRef'; did you mean 'CFStringRef'?
    2    ulong toULong(const QStringRef &s, bool *ok = nullptr) const;
    3                        ^~~~~~~~~~
    4                        CFStringRef
    5/usr/local/include/QtCore/qdebug.h:473:1: note: 'CFStringRef' declared here
    6Q_FORWARD_DECLARE_CF_TYPE(CFString);
    
  2. Kalanamith added the label Bug on May 10, 2021
  3. fanquake added the label macOS on May 10, 2021
  4. fanquake commented at 2:46 am on May 10, 2021: member
    Do you have qt 5 and 6 installed via brew? If so, you will need to uninstall qt6 before configuring / compiling.
  5. fanquake commented at 2:46 am on May 10, 2021: member
    Do you have qt 5 and 6 installed via brew? If so, you will need to uninstall qt6 before configuring / compiling.
  6. Kalanamith commented at 3:12 am on May 10, 2021: none
    Yep install qt5 as per installation guide
  7. fanquake commented at 5:11 am on August 12, 2021: member
    Not much more we can do here without more info. Can you provide a config.log or similar? Which version of the source are you building? etc. Will reopen when we’ve got more info.
  8. fanquake closed this on Aug 12, 2021

  9. gcsfred2 commented at 4:49 pm on January 13, 2022: none
    I have the same error. Is there an alternative that is not downgrading qt?
  10. hebasto commented at 5:24 pm on January 13, 2022: member

    @gcsfred2

    Not much more we can do here without more info. Can you provide a config.log or similar? Which version of the source are you building? etc. Will reopen when we’ve got more info.

  11. da2ce7 commented at 9:49 pm on August 28, 2022: none

    Hello @hebasto and @fanquake

    I get the same qt compiler error:

     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

  12. bitcoin locked this on Aug 28, 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 12:12 UTC

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