Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Build qt6.5.3 from source fails due to CMake Error
QtWS25 Last Chance

Build qt6.5.3 from source fails due to CMake Error

Scheduled Pinned Locked Moved Solved General and Desktop
linux desktopbuild qt
7 Posts 4 Posters 1.5k 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.
  • S Offline
    S Offline
    SiGa
    wrote on last edited by
    #1

    cmake version 3.29.3
    Reproduction steps:

    git clone https://code.qt.io/qt/qt5.git qt6
    cd qt6
    git switch 6.5.3
    perl init-repository
    mkdir build
    cd build
    ../configure -cmake-file-api -submodules qtbase,qtwayland -prefix /my/inst/path/
    

    configure output:

    ❯ ../configure -cmake-file-api -submodules qtbase,qtwayland -prefix /my/inst/path/
    + mkdir -p qtbase
    + cd qtbase
    + exec /home/sg/LLT/tmp/test5/qt6/qtbase/configure -top-level -cmake-file-api -submodules qtbase,qtwayland -prefix /my/inst/path/
    '/usr/bin/cmake' '-DQT_BUILD_SUBMODULES=qtbase;qtwayland' '-DCMAKE_INSTALL_PREFIX=/my/inst/path' '-G' 'Ninja' '/home/sg/LLT/tmp/test5/qt6'
    -- The CXX compiler identification is GNU 14.1.1
    -- The C compiler identification is GNU 14.1.1
    -- The ASM compiler identification is GNU
    -- Found assembler: /usr/bin/cc
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Checking dependencies of submodule 'qtbase'
    -- Checking dependencies of submodule 'qtimageformats'
    -- Checking dependencies of submodule 'qtlanguageserver'
    -- Checking dependencies of submodule 'qtshadertools'
    -- Checking dependencies of submodule 'qtsvg'
    -- Checking dependencies of submodule 'qtdeclarative'
    -- Checking dependencies of submodule 'qtwayland'
    -- Configuring submodule 'qtbase'
                -DCMAKE_C_FLAGS_DEBUG=-g
                -DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG
                -DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG
                -DCMAKE_CXX_FLAGS_DEBUG=-g
                -DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG
                -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG
                -DCMAKE_OBJCOPY=/usr/bin/objcopy
                -DCMAKE_C_STANDARD=11
                -DCMAKE_C_STANDARD_REQUIRED=ON
                -DCMAKE_CXX_STANDARD=17
                -DCMAKE_CXX_STANDARD_REQUIRED=ON
                -DCMAKE_MODULE_PATH:STRING=/home/sg/LLT/tmp/test5/qt6/qtbase/cmake/platforms
    CMake Error at qtbase/cmake/QtPublicTargetHelpers.cmake:260 (set_property):
      Attempt to promote imported target "Threads::Threads" to global scope (by
      setting IMPORTED_GLOBAL) which is not built in this directory.
    Call Stack (most recent call first):
      qtbase/cmake/QtFindPackageHelpers.cmake:202 (__qt_internal_promote_target_to_global)
      qtbase/src/corelib/CMakeLists.txt:4 (qt_find_package)
    
    
    -- Configuring submodule 'qtimageformats'
    -- Configuring submodule 'qtlanguageserver'
    -- Configuring submodule 'qtshadertools'
    -- Configuring submodule 'qtsvg'
    -- Configuring submodule 'qtdeclarative'
    -- Configuring submodule 'qtwayland'
    CMake Warning (dev) at build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:404 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qtwayland/src/imports/compositor-extensions/xdgshell/CMakeLists.txt:10 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:404 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qtwayland/src/imports/compositor-extensions/iviapplication/CMakeLists.txt:10 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:404 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qtwayland/src/imports/compositor-extensions/wlshell/CMakeLists.txt:10 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:404 (message):
      INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
      Please port your module to use declarative type registration.
    Call Stack (most recent call first):
      qtwayland/src/imports/compositor-extensions/qtshell/CMakeLists.txt:8 (qt_internal_add_qml_module)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    
    -- Configuration summary shown below. It has also been written to /home/sg/LLT/tmp/test5/qt6/build/config.summary
    -- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.
     
    -- Configure summary:
    
    Building for: linux-g++ (x86_64, CPU features: mmx sse sse2)
    Compiler: gcc 14.1.1
    Build options:
      Mode ................................... release
      Optimize release build for size ........ no
      Fully optimize release builds (-O3) .... no
      Building shared libraries .............. yes
      Using C standard ....................... C11
      Using C++ standard ..................... C++17
      Using ccache ........................... no
      Unity Build ............................ no
      Using new DTAGS ........................ yes
      Relocatable ............................ yes
      Using precompiled headers .............. yes
      Using Link Time Optimization (LTCG) .... no
      Using Intel CET ........................ no
      Target compiler supports:
        x86 Intrinsics ....................... Basic VAES AVX512VBMI2
      Sanitizers:
        Addresses ............................ no
        Threads .............................. no
        Memory ............................... no
        Fuzzer (instrumentation only) ........ no
        Undefined ............................ no
      Build parts ............................ libs tools
    Qt modules and options:
      Qt Concurrent .......................... yes
      Qt D-Bus ............................... yes
      Qt D-Bus directly linked to libdbus .... yes
      Qt Gui ................................. yes
      Qt Network ............................. yes
      Qt PrintSupport ........................ yes
      Qt Sql ................................. yes
      Qt Testlib ............................. yes
      Qt Widgets ............................. yes
      Qt Xml ................................. yes
    Support enabled for:
      Using pkg-config ....................... yes
      udev ................................... yes
      OpenSSL ................................ yes
        Qt directly linked to OpenSSL ........ no
      OpenSSL 1.1 ............................ no
      OpenSSL 3.0 ............................ yes
      Using system zlib ...................... yes
      Zstandard support ...................... yes
      Thread support ......................... yes
    Common build options:
      Linker can resolve circular dependencies  yes
    Qt Core:
      backtrace .............................. yes
      DoubleConversion ....................... yes
        Using system DoubleConversion ........ yes
      GLib ................................... yes
      ICU .................................... yes
      Using system libb2 ..................... yes
      Built-in copy of the MIME database ..... yes
      cpp/winrt base ......................... no
      Tracing backend ........................ <none>
      Logging backends:
        journald ............................. no
        syslog ............................... no
        slog2 ................................ no
      PCRE2 .................................. yes
        Using system PCRE2 ................... yes
      CLONE_PIDFD support in forkfd .......... yes
      Application permissions ................ no
    Qt Sql:
      SQL item models ........................ yes
    Qt Network:
      getifaddrs() ........................... yes
      IPv6 ifname ............................ yes
      libproxy ............................... no
      Linux AF_NETLINK ....................... yes
      DTLS ................................... yes
      OCSP-stapling .......................... yes
      SCTP ................................... no
      Use system proxies ..................... yes
      GSSAPI ................................. yes
      Brotli Decompression Support ........... yes
      qIsEffectiveTLD() ...................... yes
        Built-in publicsuffix database ....... yes
        System publicsuffix database ......... yes
    Core tools:
      Android deployment tool ................ yes
      macOS deployment tool .................. no
      Windows deployment tool ................ no
      qmake .................................. yes
    Qt Gui:
      Accessibility .......................... yes
      FreeType ............................... yes
        Using system FreeType ................ yes
      HarfBuzz ............................... yes
        Using system HarfBuzz ................ yes
      Fontconfig ............................. yes
      Image formats:
        GIF .................................. yes
        ICO .................................. yes
        JPEG ................................. yes
          Using system libjpeg ............... yes
        PNG .................................. yes
          Using system libpng ................ yes
      Text formats:
        HtmlParser ........................... yes
        CssParser ............................ yes
        OdfWriter ............................ yes
        MarkdownReader ....................... yes
          Using system libmd4c ............... yes
        MarkdownWriter ....................... yes
      EGL .................................... yes
      OpenVG ................................. no
      OpenGL:
        Desktop OpenGL ....................... yes
        OpenGL ES 2.0 ........................ no
        OpenGL ES 3.0 ........................ no
        OpenGL ES 3.1 ........................ no
        OpenGL ES 3.2 ........................ no
      Vulkan ................................. yes
      Session Management ..................... yes
    Features used by QPA backends:
      evdev .................................. yes
      libinput ............................... yes
      HiRes wheel support in libinput ........ yes
      INTEGRITY HID .......................... no
      mtdev .................................. yes
      tslib .................................. yes
      xkbcommon .............................. yes
      X11 specific:
        XLib ................................. yes
        XCB Xlib ............................. yes
        EGL on X11 ........................... yes
        xkbcommon-x11 ........................ yes
        xcb-sm ............................... yes
    QPA backends:
      DirectFB ............................... no
      EGLFS .................................. yes
      EGLFS details:
        EGLFS OpenWFD ........................ no
        EGLFS i.Mx6 .......................... no
        EGLFS i.Mx6 Wayland .................. no
        EGLFS RCAR ........................... no
        EGLFS EGLDevice ...................... yes
        EGLFS GBM ............................ yes
        EGLFS VSP2 ........................... no
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... no
        EGLFS X11 ............................ yes
      LinuxFB ................................ yes
      VNC .................................... yes
      VK_KHR_display ......................... yes
      QNX:
        lgmon ................................ no
        IMF .................................. no
      XCB:
        Using system-provided xcb-xinput ..... no
        GL integrations:
          GLX Plugin ......................... yes
            XCB GLX .......................... yes
          EGL-X11 Plugin ..................... yes
      Windows:
        Direct 2D ............................ no
        Direct 2D 1.1 ........................ no
        DirectWrite .......................... no
        DirectWrite 3 ........................ no
    Qt Widgets:
      GTK+ ................................... yes
      Styles ................................. Fusion Windows
    Qt Testlib:
      Tester for item models ................. yes
      Batch tests ............................ no
    Qt PrintSupport:
      CUPS ................................... yes
    Qt Sql Drivers:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. no
      OCI (Oracle) ........................... no
      ODBC ................................... no
      PostgreSQL ............................. no
      SQLite ................................. yes
        Using system provided SQLite ......... no
    Further Image Formats:
      JasPer ................................. yes
      MNG .................................... yes
      TIFF ................................... yes
        Using system libtiff ................. yes
      WEBP ................................... yes
        Using system libwebp ................. yes
    Qt QML:
      QML network support .................... yes
      QML debugging and profiling support .... yes
      QML just-in-time compiler .............. yes
      QML XML http request ................... yes
      QML Locale ............................. yes
    Qt QML Models:
      QML list model ......................... yes
      QML delegate model ..................... yes
    Qt Quick:
      AnimatedImage item ..................... yes
      Canvas item ............................ yes
      Support for Qt Quick Designer .......... yes
      Flipable item .......................... yes
      GridView item .......................... yes
      ListView item .......................... yes
      TableView item ......................... yes
      TreeView item .......................... yes
      Path support ........................... yes
      PathView item .......................... yes
      Positioner items ....................... yes
      Repeater item .......................... yes
      ShaderEffect item ...................... yes
      Sprite item ............................ yes
    Qt Quick Templates 2:
      Hover support .......................... yes
      Multi-touch support .................... yes
      Calendar support ....................... yes
    Qt Quick Controls 2:
      Styles ................................. Basic Fusion Imagine iOS Material Universal macOS Windows
    Qt Wayland TextInput Protocol V4(WIP) .... no
    Qt Wayland Client ........................ yes
    Qt Wayland Compositor .................... yes
    Qt Wayland Drivers:
      EGL .................................... yes
      Raspberry Pi ........................... no
      DRM EGL ................................ yes
      libhybris EGL .......................... no
      Linux dma-buf server buffer integration  yes
      Shm emulation server buffer integration  yes
      Vulkan-based server buffer integration . yes
    Qt Wayland Client Shell Integrations:
      xdg-shell .............................. yes
      ivi-shell .............................. yes
      wl-shell (deprecated) .................. yes
      qt-shell ............................... yes
    Qt Wayland Compositor Layer Plugins:
      VSP2 hardware layer integration ........ no
     
    
    -- 
    
    Qt is now configured for building. Just run 'cmake --build . --parallel'
    
    Once everything is built, you must run 'cmake --install .'
    Qt will be installed into '/my/inst/path'
    
    To configure and build other Qt modules, you can use the following convenience script:
            /my/inst/path/bin/qt-configure-module
    
    If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory
    Alternatively, you can add the --fresh flag to your CMake flags.
    
    -- Configuring incomplete, errors occurred!
    CMake Error at /home/sg/LLT/tmp/test5/qt6/qtbase/cmake/QtProcessConfigureArgs.cmake:993 (message):
      CMake exited with code 1.
    

    So the problem is following error:

    CMake Error at qtbase/cmake/QtPublicTargetHelpers.cmake:260 (set_property):
      Attempt to promote imported target "Threads::Threads" to global scope (by
      setting IMPORTED_GLOBAL) which is not built in this directory.
    Call Stack (most recent call first):
      qtbase/cmake/QtFindPackageHelpers.cmake:202 (__qt_internal_promote_target_to_global)
      qtbase/src/corelib/CMakeLists.txt:4 (qt_find_package)
    

    Is this reproducible for others?
    It configures without errors on the current dev branch.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SiGa
      wrote on last edited by
      #2

      It works for the branch origin/6.7.1
      I will switch to this version, since it makes less problems for me.

      1 Reply Last reply
      0
      • S SiGa has marked this topic as solved on
      • M Offline
        M Offline
        Marcel Thiele
        wrote on last edited by Marcel Thiele
        #3

        Same problem here Ubuntu 24.10 cmake 3.30.2. And SiGa your answer is not satisfying. Because Qt6.5.3 is the last open source version of the Qt 6.5 LTS version. So it would be in the public interest that this problem should be sovled.

        Pl45m4P 1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          There is no such thing like a 'Open Source LTS' version.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Marcel Thiele
            wrote on last edited by
            #5

            Christian Ehrlicher... I mean the Qt 6.5 is an LTS version so the last version which you can download without a license (open source) is 6.5.3. You will need a license for e.g. Qt 6.5.7.

            Christian EhrlicherC 1 Reply Last reply
            0
            • M Marcel Thiele

              Christian Ehrlicher... I mean the Qt 6.5 is an LTS version so the last version which you can download without a license (open source) is 6.5.3. You will need a license for e.g. Qt 6.5.7.

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Marcel-Thiele said in Build qt6.5.3 from source fails due to CMake Error:

              I mean the Qt 6.5 is an LTS version so

              Again: LTS is for paying customers - there is no such thing like a LTS open source version. 6.5.3 open source is as good as 6.6.x or 6.7.x - there is no difference in any terms of support for open source users. So there is no reason to stay on 6.5.3 at all.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1
              • M Marcel Thiele

                Same problem here Ubuntu 24.10 cmake 3.30.2. And SiGa your answer is not satisfying. Because Qt6.5.3 is the last open source version of the Qt 6.5 LTS version. So it would be in the public interest that this problem should be sovled.

                Pl45m4P Offline
                Pl45m4P Offline
                Pl45m4
                wrote on last edited by Pl45m4
                #7

                @Marcel-Thiele said in Build qt6.5.3 from source fails due to CMake Error:

                Same problem here Ubuntu 24.10

                why are you so keen on LTS versions if you don't even use one for your Ubuntu (which is 24.04) ? :))


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                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