Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Failed to build Qt6.3.0 with Clang-12
Qt 6.11 is out! See what's new in the release blog

Failed to build Qt6.3.0 with Clang-12

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 289 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.
  • jiapei100J Offline
    jiapei100J Offline
    jiapei100
    wrote on last edited by
    #1

    Hi, all:

    My ENV:

    ➜  ~ uname -r
    5.15.0-27-generic
    ➜  ~ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 22.04 LTS
    Release:	22.04
    Codename:	jammy
    ➜  ~ pwd
    /home/longervision
    ➜  ~ clang --version
    clang version 14.0.3
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /usr/local/bin
    

    I configured Qt-6.3.0 as:

     CMAKE_CXX_COMPILER               /usr/local/bin/clang++
     CMAKE_CXX_COMPILER_AR            /usr/local/bin/llvm-ar
     CMAKE_CXX_COMPILER_RANLIB        /usr/local/bin/llvm-ranlib
    ...
     CMAKE_C_COMPILER                 /usr/local/bin/clang
     CMAKE_C_COMPILER_AR              /usr/local/bin/llvm-ar
     CMAKE_C_COMPILER_RANLIB          /usr/local/bin/llvm-ranlib
    

    and Qt-6.3.0 is wrongly built with the following ERROR message:

    [ 65%] Linking CXX executable ../../../../qtbase/bin/lupdate
    cd ....../qt-everywhere-src-6.3.0/build/qttools/src/linguist/lupdate && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/lupdate.dir/link.txt --verbose=1
    /usr/local/bin/clang++ -DNDEBUG -O2 -Wl,--enable-new-dtags CMakeFiles/lupdate.dir/lupdate_autogen/mocs_compilation.cpp.o CMakeFiles/lupdate.dir/__/shared/numerus.cpp.o CMakeFiles/lupdate.dir/__/shared/po.cpp.o CMakeFiles/lupdate.dir/__/shared/projectdescriptionreader.cpp.o CMakeFiles/lupdate.dir/__/shared/qm.cpp.o CMakeFiles/lupdate.dir/__/shared/qph.cpp.o CMakeFiles/lupdate.dir/__/shared/qrcreader.cpp.o CMakeFiles/lupdate.dir/__/shared/runqttool.cpp.o CMakeFiles/lupdate.dir/__/shared/simtexth.cpp.o CMakeFiles/lupdate.dir/__/shared/translator.cpp.o CMakeFiles/lupdate.dir/__/shared/translatormessage.cpp.o CMakeFiles/lupdate.dir/__/shared/ts.cpp.o CMakeFiles/lupdate.dir/__/shared/xliff.cpp.o CMakeFiles/lupdate.dir/__/shared/xmlparser.cpp.o CMakeFiles/lupdate.dir/cpp.cpp.o CMakeFiles/lupdate.dir/java.cpp.o CMakeFiles/lupdate.dir/python.cpp.o CMakeFiles/lupdate.dir/main.cpp.o CMakeFiles/lupdate.dir/merge.cpp.o CMakeFiles/lupdate.dir/ui.cpp.o CMakeFiles/lupdate.dir/qdeclarative.cpp.o CMakeFiles/lupdate.dir/clangtoolastreader.cpp.o CMakeFiles/lupdate.dir/cpp_clang.cpp.o CMakeFiles/lupdate.dir/lupdatepreprocessoraction.cpp.o -o ../../../../qtbase/bin/lupdate  -Wl,-rpath,....../qt-everywhere-src-6.3.0/build/qtbase/lib: ../../../../qtbase/lib/libQt6Qml.so.6.3.0 ../../../../qtbase/lib/libQt6Network.so.6.3.0 ../../../../qtbase/lib/libQt6Core.so.6.3.0 /usr/local/lib/libclang.so.14.0.3 /usr/local/lib/libclangHandleCXX.so.14 
    /usr/bin/ld: CMakeFiles/lupdate.dir/cpp_clang.cpp.o: undefined reference to symbol '_ZN5clang7tooling9ClangToolC1ERKNS0_19CompilationDatabaseEN4llvm8ArrayRefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrINS_22PCHContainerOperationsEENS5_18IntrusiveRefCntPtrINS5_3vfs10FileSystemEEENSH_INS_11FileManagerEEE'
    /usr/bin/ld: /usr/local/lib/libclangTooling.so.14: error adding symbols: DSO missing from command line
    clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [qttools/src/linguist/lupdate/CMakeFiles/lupdate.dir/build.make:468: qtbase/bin/lupdate] Error 1
    make[2]: Leaving directory '....../qt-everywhere-src-6.3.0/build'
    make[1]: *** [CMakeFiles/Makefile2:53308: qttools/src/linguist/lupdate/CMakeFiles/lupdate.dir/all] Error 2
    make[1]: Leaving directory '....../qt-everywhere-src-6.3.0/build'
    make: *** [Makefile:149: all] Error 2
    

    Where is _ZN5clang7tooling9ClangToolC1ERKNS0_19CompilationDatabaseEN4llvm8ArrayRefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrINS_22PCHContainerOperationsEENS5_18IntrusiveRefCntPtrINS5_3vfs10FileSystemEEENSH_INS_11FileManagerEEE?

    Thank you

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

    1 Reply Last reply
    0

    • Login

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