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

Cannot build Android examples on Windows

    XMLWordPrintable

    Details

      Description

      When trying to build applications for android on a Windows target, the build fails with:

      13:07:39: Running steps for project wiggly...
      13:07:39: Configuration unchanged, skipping qmake step.
      13:07:39: Starting: "C:\utils\Android\android-ndk-r18b\prebuilt\windows\bin\make.exe" -j8
      C:\utils\Android\android-ndk-r18b/toolchains/llvm/prebuilt/windows/bin/clang++
       -c -D__ANDROID_API__=21 -target armv7-none-linux-androideabi 
      -gcc-toolchain 
      C:\utils\Android\android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows
      -DANDROID_HAS_WSTRING 
      --sysroot=C:\utils\Android\android-ndk-r18b/sysroot -isystem 
      C:\utils\Android\android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi
       -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++/include 
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/android/support/include
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/include
       -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp 
      -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -Wall -W -D_REENTRANT 
      -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB
      -DQT_GUI_LIB -DQT_CORE_LIB -I. 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtWidgets 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtGui 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtCore
      -I. 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\mkspecs\android-clang 
      -o wigglywidget.obj wigglywidget.cpp
      C:\utils\Android\android-ndk-r18b/toolchains/llvm/prebuilt/windows/bin/clang++
       -c -D__ANDROID_API__=21 -target armv7-none-linux-androideabi 
      -gcc-toolchain 
      C:\utils\Android\android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows
      -DANDROID_HAS_WSTRING 
      --sysroot=C:\utils\Android\android-ndk-r18b/sysroot -isystem 
      C:\utils\Android\android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi
       -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++/include 
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/android/support/include
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/include
       -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp 
      -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -Wall -W -D_REENTRANT 
      -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB
      -DQT_GUI_LIB -DQT_CORE_LIB -I. 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtWidgets 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtGui 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtCore
      -I. 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\mkspecs\android-clang 
      -o dialog.obj dialog.cpp
      C:\utils\Android\android-ndk-r18b/toolchains/llvm/prebuilt/windows/bin/clang++
       -c -D__ANDROID_API__=21 -target armv7-none-linux-androideabi 
      -gcc-toolchain 
      C:\utils\Android\android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows
      -DANDROID_HAS_WSTRING 
      --sysroot=C:\utils\Android\android-ndk-r18b/sysroot -isystem 
      C:\utils\Android\android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi
       -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++/include 
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/android/support/include
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/include
       -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp 
      -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -Wall -W -D_REENTRANT 
      -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB
      -DQT_GUI_LIB -DQT_CORE_LIB -I. 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtWidgets 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtGui 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\include\QtCore
      -I. 
      -IC:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\mkspecs\android-clang 
      -o main.obj main.cpp
      C:\utils\Android\android-ndk-r18b/toolchains/llvm/prebuilt/windows/bin/clang++
       -D__ANDROID_API__=21 -target armv7-none-linux-androideabi 
      -gcc-toolchain 
      C:\utils\Android\android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows
      -DANDROID_HAS_WSTRING 
      --sysroot=C:\utils\Android\android-ndk-r18b/sysroot -isystem 
      C:\utils\Android\android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi
       -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++/include 
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/android/support/include
      -isystem 
      C:\utils\Android\android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/include
       -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp 
      -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -Wall -W -dM -E -o 
      moc_predefs.h 
      C:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\mkspecs\features\data\dummy.cpp
      C:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\bin\moc.exe
       -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include 
      C:/Users/QT/RTA/qt5121ent/Examples/Qt-5.13.0/widgets/widgets/wiggly/moc_predefs.h
       -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/mkspecs/android-clang
      -IC:/Users/QT/RTA/qt5121ent/Examples/Qt-5.13.0/widgets/widgets/wiggly 
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include 
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include/QtWidgets 
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include/QtGui
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include/QtCore 
      -IC:/utils/Android/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi
       -IC:/utils/Android/android-ndk-r18b/sources/cxx-stl/llvm-libc++/include
       -IC:/utils/Android/android-ndk-r18b/sources/android/support/include
      -IC:/utils/Android/android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/include
       
      -IC:/utils/Android/android-ndk-r18b/toolchains/llvm/prebuilt/windows/lib/clang/7.0.2/include
       -IC:/utils/Android/android-ndk-r18b/sysroot/usr/include wigglywidget.h 
      -o moc_wigglywidget.cpp
      C:\Users\QT\RTA\qt5121ent\5.13.0\android_armv7\bin\moc.exe
       -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include 
      C:/Users/QT/RTA/qt5121ent/Examples/Qt-5.13.0/widgets/widgets/wiggly/moc_predefs.h
       -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/mkspecs/android-clang
      -IC:/Users/QT/RTA/qt5121ent/Examples/Qt-5.13.0/widgets/widgets/wiggly 
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include 
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include/QtWidgets 
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include/QtGui
      -IC:/Users/QT/RTA/qt5121ent/5.13.0/android_armv7/include/QtCore 
      -IC:/utils/Android/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi
       -IC:/utils/Android/android-ndk-r18b/sources/cxx-stl/llvm-libc++/include
       -IC:/utils/Android/android-ndk-r18b/sources/android/support/include
      -IC:/utils/Android/android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/include
       
      -IC:/utils/Android/android-ndk-r18b/toolchains/llvm/prebuilt/windows/lib/clang/7.0.2/include
       -IC:/utils/Android/android-ndk-r18b/sysroot/usr/include dialog.h -o 
      moc_dialog.cpp
      make: *** [moc_dialog.cpp] Error -1073741515
      make: *** Waiting for unfinished jobs....
      make: *** [moc_wigglywidget.cpp] Error -1073741515
      13:07:42: The process "C:\utils\Android\android-ndk-r18b\prebuilt\windows\bin\make.exe" exited with code 2.
      Error while building/deploying project wiggly (kit: Android for armeabi-v7a (Clang Qt 5.13.0 for Android ARMv7))
      When executing step "Make"
      13:07:42: Elapsed time: 00:03.

      The android environment used was the same than what's provisioned to Qt's Coin machines. Provision script used: qt5/coin/provisioning/qtci-windows-10-x86_64/40-android.ps1 (5.13).

      Building the application from command line however seems to be working (libwiggly.so gets created). This was reproducing with Qt Creator 4.9.0-beta1 as well as Qt Creator 4.8.2 (the latest released version).

      Also the .so gets created if you run those build commands above on command line separately. Cannot tell if this is a Qt Creator bug or a Qt bug.  The same android env (sdk, platforms, build-tools, ndk) and using the same Qt Creator versions on Qt 5.12.1 doesn't reproduce this build error.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              aksalova Akseli Salovaara
              Reporter:
              mipohjan Milla Pohjanheimo
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes