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

Qt 6.1.0 compile failure

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.1.1, 6.2.0 FF
    • 6.1.0
    • Build System: CMake, QPA
    • None
    • macOS 11.3.1 / CentOS 8.3
      NDK r21e
      OpenSSL 1.1.1k
    • Android

    Description

      Same error occurs on every architecture on macOS / Linux hosted builds.
      Following is the macOS hosted build of x86_64 arch, taken as an example.

      cmake configuration:

       cmake -GNinja -DCMAKE_INSTALL_PREFIX=/Users/fs/JenkinsCentOS/workspace/Qt/q6_1mx6_ax6nl/buildDir/Qt6.1.0-Android-x86_64-Clang-NDKr21e-xmacOS-x86_64-AppleClang12.0.5 -DQT_HOST_PATH=/Users/fs/JenkinsCentOS/workspace/Qt/q6_1mx6_ax6nl/buildDir/Qt6.1.0-macOS-x86_64-AppleClang12.0.5-static -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DQT_QMAKE_TARGET_MKSPEC=android-clang -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DFEATURE_doubleconversion=ON -DFEATURE_system_doubleconversion=OFF -DFEATURE_system_zlib=OFF -DFEATURE_system_pcre2=OFF -DFEATURE_icu=OFF -DFEATURE_opengles2=ON -DFEATURE_ssl=ON -DINPUT_openssl=linked -DOPENSSL_ROOT_DIR=/Users/fs/JenkinsCentOS/workspace/Qt/q6_1mx6_ax6nl/buildDir/OpenSSL1.1.1k-Android-x86_64-NDKr21eAPI24/ -DFEATURE_sql_sqlite=ON -DANDROID_SDK_ROOT=/opt/env/android-sdk-mac-2/ -DCMAKE_TOOLCHAIN_FILE=/opt/env/android-ndk-r21e//build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=24 -DANDROID_ABI=x86_64 /opt/sources/qt-everywhere-src-6.1.0
      

      Build log of failed file is as following.

      13:39:01 FAILED: qtbase/src/plugins/platforms/android/CMakeFiles/QAndroidIntegrationPlugin.dir/qandroidplatformvulkanwindow.cpp.o 
      13:39:01 /opt/env/android-ndk-r21e/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=x86_64-none-linux-android24 --gcc-toolchain=/opt/env/android-ndk-r21e/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/opt/env/android-ndk-r21e/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DQAndroidIntegrationPlugin_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_PLUGIN -DQT_USE_QSTRINGBUILDER -Iqtbase/src/plugins/platforms/android/QAndroidIntegrationPlugin_autogen/include -I/opt/sources/qt-everywhere-src-6.1.0/qtbase/src/plugins/platforms/android -Iqtbase/src/plugins/platforms/android -Iqtbase/include -I/opt/sources/qt-everywhere-src-6.1.0/qtbase/src/3rdparty/android -Iqtbase/include/QtCore -I/opt/sources/qt-everywhere-src-6.1.0/qtbase/mkspecs/android-clang -Iqtbase/src/corelib -Iqtbase/include/QtCore/6.1.0 -Iqtbase/include/QtCore/6.1.0/QtCore -Iqtbase/include/QtGui -Iqtbase/src/gui -Iqtbase/include/QtGui/6.1.0 -Iqtbase/include/QtGui/6.1.0/QtGui -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -DNDEBUG -Oz -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -pthread -std=c++17 -MD -MT qtbase/src/plugins/platforms/android/CMakeFiles/QAndroidIntegrationPlugin.dir/qandroidplatformvulkanwindow.cpp.o -MF qtbase/src/plugins/platforms/android/CMakeFiles/QAndroidIntegrationPlugin.dir/qandroidplatformvulkanwindow.cpp.o.d -o qtbase/src/plugins/platforms/android/CMakeFiles/QAndroidIntegrationPlugin.dir/qandroidplatformvulkanwindow.cpp.o -c /opt/sources/qt-everywhere-src-6.1.0/qtbase/src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp
      13:39:01 /opt/sources/qt-everywhere-src-6.1.0/qtbase/src/plugins/platforms/android/qandroidplatformvulkanwindow.cpp:176:26: error: no matching function for call to 'ANativeWindow_fromSurface'
      13:39:01         m_nativeWindow = ANativeWindow_fromSurface(env, m_androidSurfaceObject.object());
      13:39:01                          ^~~~~~~~~~~~~~~~~~~~~~~~~
      13:39:01 /opt/env/android-ndk-r21e/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/android/native_window_jni.h:45:16: note: candidate function not viable: no known conversion from 'QJniEnvironment' to 'JNIEnv *' (aka '_JNIEnv *') for 1st argument
      13:39:01 ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
      13:39:01                ^
      13:39:01 1 error generated.
      

      Attachments

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

        Activity

          People

            assam Assam Boudjelthia
            fsu0413 Frank Su
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes