Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Qt6 qttools error: ‘OptionalFileEntryRef’ in namespace ‘clang’ does not name a type
Forum Update on Monday, May 27th 2025

Qt6 qttools error: ‘OptionalFileEntryRef’ in namespace ‘clang’ does not name a type

Scheduled Pinned Locked Moved Unsolved Qt 6
1 Posts 1 Posters 251 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jiapei100
    wrote on 10 Jul 2023, 15:03 last edited by jiapei100 7 Oct 2023, 15:04
    #1

    Hi, all:

    I failed to build Qt6 from source a couple of days ago. My environment:

    ➜  build lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 22.04.2 LTS
    Release:	22.04
    Codename:	jammy
    ➜  build gcc --version 
    gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    And the errors are:

    [ 66%] Building CXX object qttools/src/linguist/lupdate/CMakeFiles/lupdate.dir/cpp_clang.cpp.o
    cd /opt/qt/qt-everywhere-src-6.5.1/build/qttools/src/linguist/lupdate && /usr/bin/c++ -DLUPDATE_CLANG_VERSION_MAJOR=16 -DLUPDATE_CLANG_VERSION_MINOR=0 -DLUPDATE_CLANG_VERSION_PATCH=0 -DLUPDATE_CLANG_VERSION_STR=\"\"16.0.0git\"\" -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NETWORK_LIB -DQT_NO_AS_CONST=1 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_QMLINTEGRATION_LIB -DQT_QML_LIB -DQT_TOOLS_LIB -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/opt/qt/qt-everywhere-src-6.5.1/build/qttools/src/linguist/lupdate/lupdate_autogen/include -I/opt/qt/qt-everywhere-src-6.5.1/qttools/src/linguist/lupdate -I/opt/qt/qt-everywhere-src-6.5.1/build/qttools/src/linguist/lupdate -I/opt/qt/qt-everywhere-src-6.5.1/qttools/src/linguist/lupdate/../shared -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/src/corelib -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtCore/6.5.1 -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtCore/6.5.1/QtCore -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtCore -I/opt/qt/qt-everywhere-src-6.5.1/qtbase/mkspecs/linux-g++ -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtTools -I/opt/qt/qt-everywhere-src-6.5.1/qttools/src/global -I/opt/qt/qt-everywhere-src-6.5.1/build/qttools/src/global -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtTools/6.5.1 -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtTools/6.5.1/QtTools -I/opt/qt/qt-everywhere-src-6.5.1/build/qtdeclarative/src/qml -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtQml/6.5.1 -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtQml/6.5.1/QtQml -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtQml -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtQmlIntegration -I/opt/qt/qt-everywhere-src-6.5.1/qtdeclarative/src/qmlintegration -I/opt/qt/qt-everywhere-src-6.5.1/build/qtdeclarative/src/qmlintegration -I/opt/qt/qt-everywhere-src-6.5.1/build/qtbase/include/QtNetwork -std=c++17 -fPIC -DNDEBUG -O2 -std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -Wsuggest-override -fcf-protection=full -MD -MT qttools/src/linguist/lupdate/CMakeFiles/lupdate.dir/cpp_clang.cpp.o -MF CMakeFiles/lupdate.dir/cpp_clang.cpp.o.d -o CMakeFiles/lupdate.dir/cpp_clang.cpp.o -c /opt/qt/qt-everywhere-src-6.5.1/qttools/src/linguist/lupdate/cpp_clang.cpp
    In file included from /opt/qt/qt-everywhere-src-6.5.1/qttools/src/linguist/lupdate/cpp_clang.cpp:7:
    /opt/qt/qt-everywhere-src-6.5.1/qttools/src/linguist/lupdate/lupdatepreprocessoraction.h:56:42: error: ‘OptionalFileEntryRef’ in namespace ‘clang’ does not name a type
       56 |                             const clang::OptionalFileEntryRef file,
          |                                          ^~~~~~~~~~~~~~~~~~~~
    /opt/qt/qt-everywhere-src-6.5.1/qttools/src/linguist/lupdate/lupdatepreprocessoraction.h:52:10: error: ‘void LupdatePPCallbacks::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, int, llvm::StringRef, llvm::StringRef, const clang::Module*, clang::SrcMgr::CharacteristicKind)’ marked ‘override’, but does not override
       52 |     void InclusionDirective(clang::SourceLocation /*hashLoc*/, const clang::Token &/*includeTok*/,
          |          ^~~~~~~~~~~~~~~~~~
    make[2]: *** [qttools/src/linguist/lupdate/CMakeFiles/lupdate.dir/build.make:387: qttools/src/linguist/lupdate/CMakeFiles/lupdate.dir/cpp_clang.cpp.o] Error 1
    make[2]: Leaving directory '/opt/qt/qt-everywhere-src-6.5.1/build'
    make[1]: *** [CMakeFiles/Makefile2:83058: qttools/src/linguist/lupdate/CMakeFiles/lupdate.dir/all] Error 2
    make[1]: Leaving directory '/opt/qt/qt-everywhere-src-6.5.1/build'
    make: *** [Makefile:149: all] Error 2
    

    Can anybody give me a hand?

    Thank you very much.

    Welcome to Longer Vision
    https://www.longervision.com

    1 Reply Last reply
    0

    1/1

    10 Jul 2023, 15:03

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved