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

in-tree build of tests for Android fail

    XMLWordPrintable

Details

    • Android

    Description

      Trying to build tests for Android in qtbase in-tree leads to the error

      Cannot find template directory /src/3rdparty/gradle

      This error es generated in
      qtbase/src/tools/androiddeployqt/main.cpp:1141

      The reason is that options.qtInstallDirectory is empty.
      options.qtInstallDirectory is read from
      qtbase-android/tests/auto/corelib/time/qdatetime/android-tst_qdatetime-deployment-settings.json
      (I attached the file)

      The code generating this json file is in
      qtbase/mkspecs/features/android/android_deployment_settings.prf,
      the relevant line is

      FILE_CONTENT += "   \"qt\": $$emitString($$[QT_INSTALL_PREFIX]),"
      

      The commands I use to build qtbase are

      basedir=`pwd`
      mkdir qtbase
      pushd qtbase
      /usr/bin/cmake  -DWARNINGS_ARE_ERRORS=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 -G Ninja -DFEATURE_developer_build=ON -DCMAKE_CXX_FLAGS=-Wfatal-errors -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_WITH_PCH=OFF -DQT_BUILD_TESTS=ON -DQT_BUILD_EXAMPLES=ON /home/andreasbuhr/development/qtdev/qtbase
      /usr/bin/cmake --build .
      popd
      
      mkdir qtbase-android
      pushd qtbase-android
      /usr/bin/cmake  -DWARNINGS_ARE_ERRORS=OFF -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_TOOLCHAIN_FILE=/home/andreasbuhr/Android/Sdk/ndk/21.3.6528147/build/cmake/android.toolchain.cmake -DANDROID_SDK_ROOT=/home/andreasbuhr/Android/Sdk -DQT_HOST_PATH=$basedir/qtbase -DFEATURE_developer_build=ON -DCMAKE_CXX_FLAGS=-Wfatal-errors -DQT_BUILD_EXAMPLES=ON -DQT_BUILD_TESTS=ON /home/andreasbuhr/development/qtdev/qtbase
      /usr/bin/cmake --build .
      ninja tst_qdatetime_make_apk
      popd
      
      

      The log is attached in full_log.txt

      Attachments

        1. .reproduce
          1 kB
        2. 2021_04_13_full_output.txt.gz
          968 kB
        3. android-tst_qdatetime-deployment-settings.json
          1.0 kB
        4. full_log.txt
          1.31 MB
        5. image-2021-04-12-14-57-34-567.png
          image-2021-04-12-14-57-34-567.png
          79 kB
        6. image-2021-04-12-14-58-05-963.png
          image-2021-04-12-14-58-05-963.png
          46 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtandroidteam Qt Android Team
            andreasbuhr Andreas Buhr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes