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

CMake projects for Android not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: Extras: Android
    • Labels:
    • Platform/s:
      Windows

      Description

      1. Create QtQuck Empty project and select Android armv8 kit
      2. After you've clicked Finish
      Running C:\Dev\Tools\CMake\bin\cmake.exe "-GCodeBlocks - Ninja" C:/Dev/Projects/tests/QtQuick-empty in C:\Users\dmitry\AppData\Local\Temp\QtCreator-eyrtwb\qtc-cmake-XsotvqDI.
      -- Check for working CXX compiler: C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
      -- Check for working CXX compiler: C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- broken
      CMake Error at C:/Dev/Tools/CMake/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
        The C++ compiler
      
          "C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe"
      
        is not able to compile a simple test program.
      
        It fails with the following output:
      
          Change Dir: C:/Users/dmitry/AppData/Local/Temp/QtCreator-eyrtwb/qtc-cmake-XsotvqDI/CMakeFiles/CMakeTmp
          
          Run Build Command(s):C:/Dev/Tools/Ninja/ninja.exe cmTC_b7963 && [1/2] Building CXX object CMakeFiles/cmTC_b7963.dir/testCXXCompiler.cxx.o
          [2/2] Linking CXX executable cmTC_b7963
          FAILED: cmTC_b7963 
          cmd.exe /C "cd . && C:\Dev\Tools\Android\Sdk\ndk\21.1.6352462\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/sysroot  -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections CMakeFiles/cmTC_b7963.dir/testCXXCompiler.cxx.o  -o cmTC_b7963  -latomic -lm && cd ."
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find crtbegin_dynamic.o: No such file or directory
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lm
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lc++
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lm
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lcompiler_rt-extras
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -ldl
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lc
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lcompiler_rt-extras
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -ldl
          C:/Dev/Tools/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find crtend_android.o: No such file or directory
          clang++: error: linker command failed with exit code 1 (use -v to see invocation)
          ninja: build stopped: subcommand failed.
          
          
      
        
      
        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:3 (project)
      
      
      -- Configuring incomplete, errors occurred!
      See also "C:/Users/dmitry/AppData/Local/Temp/QtCreator-eyrtwb/qtc-cmake-XsotvqDI/CMakeFiles/CMakeOutput.log".
      See also "C:/Users/dmitry/AppData/Local/Temp/QtCreator-eyrtwb/qtc-cmake-XsotvqDI/CMakeFiles/CMakeError.log".
      CMake process exited with exit code 1.
      Elapsed time: 00:00.
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              rampe Rami Potinkara
              Reporter:
              dmitry.sokolov Dmitry Sokolov
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes