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

dependencies of unit tests of qtbase in android-build incomplete

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.2.0 FF
    • Build System: CMake
    • None
    • Android

      Before building a unit test, is is required to build everything. Otherwise it fails.

      Commands which lead to error:

      basedir=`pwd`
      mkdir qtbase
      pushd qtbase
      /usr/bin/cmake  -DWARNINGS_ARE_ERRORS=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/gcc-11 -DCMAKE_CXX_COMPILER=/usr/bin/g++-11 -G Ninja -DFEATURE_developer_build=ON -DCMAKE_CXX_FLAGS=-Wfatal-errors -DQT_BUILD_TESTS=ON -DQT_BUILD_EXAMPLES=OFF /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_TESTS=ON /home/andreasbuhr/development/qtdev/qtbase
      ninja tst_qmetatype_make_apk
      popd
      

      The error message is

      Source Qt file does not exist: /home/andreasbuhr/development/qtdev/androidbuild/qtbase-android/jar/Qt6Android.jar
      

      Adding a "cmake --build ." before the "ninja tst_qmetatype_make_apk" solves the problem.

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

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

              Created:
              Updated:

                There are no open Gerrit changes