Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.1
-
None
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