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

cmake: multi-ABI Android builds do not work in-tree

    XMLWordPrintable

Details

    • Android
    • 97007e1ace (qt/qtbase/dev) 97007e1ace (qt/tqtc-qtbase/dev) df8ef04229 (qt/qtbase/6.4) df8ef04229 (qt/tqtc-qtbase/6.4) df8ef04229 (qt/tqtc-qtbase/6.4.1) df8ef04229 (qt/tqtc-qtbase/tqtc/qtinsight-6.4)

    Description

      Setup: Qt 6.4.0 from the installer: all 4 Android platforms + Linux desktop

      Building an app for in multi-ABI mode inside the source directory with something like:

      qt-cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DQT_HOST_PATH=... -DQT_ANDROID_SDK_BUILD_TOOLS_REVISION=30.0.3 \ -DANDROID_NATIVE_API_LEVEL=23  -DQT_ANDROID_BUILD_ALL_ABIS=TRUE  -DANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/... -DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT} .

      correctly detects all ABIs:

      Configuring '<app>' for the following Android ABIs: arm64-v8a (default), armeabi-v7a, x86, x86_64

      but the sub-cmake runs for the extra (non-default) ABIs are then thoroughly confused and think they are for am64-v8a as well:

      Found android platform plugin at: .../Qt/6.4.0/android_arm64_v8a/./plugins/platforms/libplugins_platforms_qtforandroid_arm64-v8a.so

      And in the end, the build fails with with cmake --build complaining:

      Error: could not load cache

      You can see a full log of such a failed run in this GitHub CI log for an open-source project of mine: I have attached the relevant part of the build log, but the full one is also available until it expires: https://github.com/rgriebl/brickstore/actions/runs/3290035763/jobs/5422338121

      Switching the CI to do a shadow build instead, instantly made the multi-ABI build work.

       

      Attachments

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

        Activity

          People

            semlanik Alexey Edelev
            rgriebl Robert Griebl
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes