Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92083

Building console project fails with linker errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.2.0, 6.3.0
    • 5.15.2, 6.x
    • Build System: CMake
    • None
    • Ubuntu 20.04 LTS
      clang 10.0.0
      Qt 5.15.2, Qt dev branch

    Description

      1. Configure a clang-based kit with ASAN in Creator.
        Mine was built with clang 10 and configure options:
        -platform linux-clang -opensource -confirm-license -nomake examples -nomake tests -prefix $PWD/qtbase -release -static -no-gc-binaries -sanitize fuzzer-no-link -sanitize address -no-openssl
        
      2. Create a new CMake-based Qt Console Project for this kit using Creator's wizard.
      3. Try building this project in Creator.
        I'm drowning in hundred thousands (literally) of error messages like:
        14:58:20: Führe Schritte für Projekt untitled2 aus...
        14:58:20: Speichere CMake Status...
        14:58:22: Starte: "/usr/bin/cmake" --build /tmp/testprojekte/build-untitled2-Desktop-Debug --target all
        [1/4 24.9/sec] Automatic MOC and UIC for target untitled2
        [2/4 29.5/sec] Building CXX object CMakeFiles/untitled2.dir/untitled2_autogen/mocs_compilation.cpp.o
        [3/4 1.7/sec] Building CXX object CMakeFiles/untitled2.dir/main.cpp.o
        [4/4 0.8/sec] Linking CXX executable untitled2
        FAILED: untitled2 
        : && /usr/lib/llvm-10/bin/clang++  -g   CMakeFiles/untitled2.dir/untitled2_autogen/mocs_compilation.cpp.o CMakeFiles/untitled2.dir/main.cpp.o  -o untitled2  /home/qtrob/dev/clang-10.0.0/qt-dev-base_svg-03.19-fasan-no-openssl/qtbase/lib/libQt6Core.a  /home/qtrob/dev/clang-10.0.0/qt-dev-base_svg-03.19-fasan-no-openssl/qtbase/lib/libQt6Core_qobject.a  -pthread  /usr/lib/x86_64-linux-gnu/libz.so  -lm  /usr/lib/x86_64-linux-gnu/libicui18n.so  /usr/lib/x86_64-linux-gnu/libicuuc.so  /usr/lib/x86_64-linux-gnu/libicudata.so  /usr/lib/x86_64-linux-gnu/libpcre2-16.so  -ldl  /usr/lib/x86_64-linux-gnu/libglib-2.0.so  /usr/lib/x86_64-linux-gnu/libgthread-2.0.so  /usr/lib/x86_64-linux-gnu/librt.so && :
        /usr/bin/ld: /home/qtrob/dev/clang-10.0.0/qt-dev-base_svg-03.19-fasan-no-openssl/qtbase/lib/libQt6Core.a(qthread_unix.cpp.o): in function `asan.module_ctor':
        qthread_unix.cpp:(.text+0x2): undefined reference to `__asan_init'
        /usr/bin/ld: qthread_unix.cpp:(.text+0x7): undefined reference to `__asan_version_mismatch_check_v8'
        /usr/bin/ld: qthread_unix.cpp:(.text+0x18): undefined reference to `__asan_register_globals'
        /usr/bin/ld: /home/qtrob/dev/clang-10.0.0/qt-dev-base_svg-03.19-fasan-no-openssl/qtbase/lib/libQt6Core.a(qthread_unix.cpp.o): in function `asan.module_dtor':
        qthread_unix.cpp:(.text+0x2e): undefined reference to `__asan_unregister_globals'
        /usr/bin/ld: /home/qtrob/dev/clang-10.0.0/qt-dev-base_svg-03.19-fasan-no-openssl/qtbase/lib/libQt6Core.a(qthread_unix.cpp.o): in function `(anonymous namespace)::destroy_current_thread_data_key_dtor_class_::~destroy_current_thread_data_key_dtor_class_()':
        qthread_unix.cpp:(.text._ZN12_GLOBAL__N_143destroy_current_thread_data_key_dtor_class_D2Ev[_ZN12_GLOBAL__N_143destroy_current_thread_data_key_dtor_class_D2Ev$f0cf93c3fea078ddd129d5ff78e68e56]+0x10): undefined reference to `__sancov_lowest_stack'
        /usr/bin/ld: qthread_unix.cpp
        

      Building a qmake based project with this kit works fine.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes