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

QtAndroid build failure with cmake 3.18.4 (qt 6.3)

    XMLWordPrintable

Details

    • Android
    • e38c7618be (qt/qtbase/dev) e38c7618be (qt/tqtc-qtbase/dev) 4e656d6142 (qt/qtbase/6.4) 4e656d6142 (qt/tqtc-qtbase/6.4) 2ada760348 (qt/qtbase/6.3) 2ada760348 (qt/tqtc-qtbase/6.3)

    Description

      When configuring qt for android  on linux, with cmake 3.18.4 I have this error

      Configuring submodule 'qttools'
       – Could NOT find Clang (missing: Clang_DIR)
       – Could NOT find Clang (missing: Clang_DIR)
       CMake Error at debian/build-x86_64/qtbase/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:556:EVAL:1 (cmake_language):
       cmake_language called with unknown meta-operation
       Call Stack (most recent call first):
       debian/build-x86_64/qtbase/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:556 (cmake_language)
       debian/build-x86_64/qtbase/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:514 (_qt_internal_collect_apk_dependencies_defer)
       debian/build-x86_64/qtbase/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:1029 (qt6_android_add_apk_target)
       qtbase/cmake/QtExecutableHelpers.cmake:24 (_qt_internal_android_executable_finalizer)
       qtbase/cmake/QtAppHelpers.cmake:24 (qt_internal_add_executable)
       qttools/src/linguist/linguist/CMakeLists.txt:7 (qt_internal_add_app)
      

      This is due to this line in code of qtbase/src/corelib/Qt6AndroidMacros.cmake

      cmake_language(EVAL CODE "cmake_language(DEFER DIRECTORY \"${CMAKE_SOURCE_DIR}\"
       CALL _qt_internal_collect_apk_dependencies)")
      

      It seems faulty because there is a call to a function that doesn't exist in 3.18.4. It appeared with 3.19

      cmake_language(DEFER <options>... CALL <command> [<arg>...])
      

      https://cmake.org/cmake/help/v3.18/command/cmake_language.html

       

      → There was no problem with Qt 6.2.3

      → Upgrading to cmake 3.24.0 fixes the issue

       

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            ban F S
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes