Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
6.0.1
-
Windows10 x64
-
-
2021wk02
Description
Install 6.0.1 Android binaries (Windows used as host here), compile example gui\analogclock:
c:\Users\joaijala\RTA\qt5\6.0.1\android_arm64_v8a\bin\qt-cmake.bat -S c:\Users\joaijala\RTA\qt5\Examples\Qt-6.0.1\gui\analogclock -B c:\Users\joaijala\RTA\qt5\Examples\Qt-6.0.1\gui\analogclock_bld_arm64 -GNinja -DANDROID_SDK_ROOT=C:\Utils\Android\sdk -DANDROID_NDK_ROOT=C:\Utils\Android\sdk\ndk\21.1.6352462
CMake, Ninja and MinGW added to PATH and set CMAKE_PREFIX_PATH=C:\Users\joaijala\RTA\qt5\6.0.1\android_arm64_v8a\lib\cmake
Command fails:
Environment variable C:\Users\joaijala\RTA\qt5/Tools/CMake_64/bin/cmake.exe not defined
CMake Error at C:/Users/joaijala/RTA/qt5/6.0.1/android_arm64_v8a/lib/cmake/Qt6/qt.toolchain.cmake:27 (set):
Syntax error in cmake code at C:/Users/joaijala/RTA/qt5/6.0.1/android_arm64_v8a/lib/cmake/Qt6/qt.toolchain.cmake:27 when parsing string C:\Users\joaijala\RTA\qt5/6.0.1/mingw81_64 Invalid character escape '\U'.
Call Stack (most recent call first):
C:/Users/joaijala/RTA/qt5/Tools/CMake_64/share/cmake-3.19/Modules/CMakeDetermineSystem.cmake:104 (include)
CMakeLists.txt:4 (project)
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Opening the c:\Users\joaijala\RTA\qt5\6.0.1\android_arm64_v8a\bin\qt-cmake.bat in texteditor show that there is line:
'set C:\Users\joaijala\RTA\qt5/Tools/CMake_64/bin/cmake.exe' which seems invalid syntax.
If same file is opened from ci-files02 (http://ci-files02-hki.intra.qt.io/packages/jenkins/qt/6.0.1/release_content/qtbase/qtbase-Windows-Windows_10-Clang-Android-Android_ANY-ARM64.7z ) the same line has:
'set cmake_path=C:/CMake/bin/cmake.exe'.
Example can be compiled using cmake (cmake.exe -S c:\Users\joaijala\RTA\qt5\Examples\Qt-6.0.1\gui\analogclock -B c:\Users\joaijala\RTA\qt5\Examples\Qt-6.0.1\gui\analogclock_bld_arm64 -GNinja -DQT_HOST_PATH:PATH=C:\Users\joaijala\RTA\qt5\6.0.1\mingw81_64 -DANDROID_SDK_ROOT=C:\Utils\Android\sdk -DCMAKE_TOOLCHAIN_FILE:PATH=C:\Utils\Android\sdk\ndk\21.1.6352462\build\cmake\android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH:PATH=C:\Users\joaijala\RTA\qt5\6.0.1\android_arm64_v8a -DANDROID_NDK_ROOT=C:\Utils\Android\sdk\ndk\21.1.6352462 -DANDROID_ABI:STRING=arm64-v8a) so the actual build does work.
Also if Creator (Qt Creator 4.14.1) is launched and any project compiled with Android and cmake, the build fails:
12:18:07: Running steps for project analogclock... 12:18:07: Starting: "C:\Users\joaijala\RTA\qt5\Tools\CMake_64\bin\cmake.exe" --build . --target all gui_analogclock_prepare_apk_dir [1/6 0.2/sec] Automatic MOC and UIC for target gui_analogclock [2/6 0.2/sec] Building CXX object CMakeFiles/gui_analogclock.dir/gui_analogclock_autogen/mocs_compilation.cpp.o [3/6 0.2/sec] Building CXX object CMakeFiles/gui_analogclock.dir/C_/Users/joaijala/RTA/qt5/Examples/Qt-6.0.1/gui/rasterwindow/rasterwindow.cpp.o [4/6 0.3/sec] Building CXX object CMakeFiles/gui_analogclock.dir/main.cpp.o [5/6 0.4/sec] Linking CXX shared module libgui_analogclock_arm64-v8a.so [6/6 0.4/sec] Copying gui_analogclock binarty to apk folder 12:18:23: The process "C:\Users\joaijala\RTA\qt5\Tools\CMake_64\bin\cmake.exe" exited normally. 12:18:23: Starting: "C:\Users\joaijala\RTA\qt5\6.0.1\mingw81_64\bin\androiddeployqt.exe" --input C:/Users/joaijala/RTA/qt5/Examples/Qt-6.0.1/gui/build-analogclock-Android_Qt_6_0_0_Clang_arm64_v8a-Debug/android-analogclock-deployment-settings.json --output C:/Users/joaijala/RTA/qt5/Examples/Qt-6.0.1/gui/build-analogclock-Android_Qt_6_0_0_Clang_arm64_v8a-Debug/android-build --android-platform android-30 --jdk "C:/Program Files/Java/jdk1.8.0_144" --gradle No target architecture defined in json file. 12:18:25: The process "C:\Users\joaijala\RTA\qt5\6.0.1\mingw81_64\bin\androiddeployqt.exe" exited with code 2. Error while building/deploying project analogclock (kit: Android Qt 6.0.0 Clang arm64-v8a) When executing step "Build Android APK" 12:18:25: Elapsed time: 00:18.
qt-cmake.bat was working in Qt6.0.0 Edit: not a regression after all.
Attachments
Issue Links
- is duplicated by
-
QTBUG-90459 Qt6.1: qt-cmake fails to build example on Android
-
- Closed
-
- mentioned in
-
Page Loading...