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

configure fails when compiling Qt for Android for platforms other than aarch64 with -openssl-linked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.1, 5.15.0 Alpha
    • 5.14.0
    • Build System
    • None
    • Windows 10 1909 / macOS 10.15
      Android NDK r20b
      OpenSSL 1.1.1d
    • Android
    • e52239f525d59f965dbbc5dbe2c28314498690b0 (qt/qtbase/5.14)

    Description

      qmake is always using aarch64 compiler for checking the availability of OpenSSL libs and fails if target arch is not aarch64.

      looking for library openssl
      Trying source 0 (type openssl) of library openssl ...
      $OPENSSL_LIBS is not set.
        => source produced no result.
      Trying source 1 (type inline) of library openssl ...
        => source failed condition 'config.win32'.
      Trying source 2 (type inline) of library openssl ...
        => source failed condition 'config.msvc'.
      Trying source 3 (type inline) of library openssl ...
      + cd /d D:\Qt\build-QtQlwx6m7_ax6nl\config.tests\openssl && D:\Qt\build-QtQlwx6m7_ax6nl\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "INCLUDEPATH += D:\\Jenkins10\\workspace\\Qt\\Qlwx6m7_ax6nl\\buildDir\\OpenSSL1.1.1d-AndroidAPI21-x86_64\\include" -early "CONFIG += cross_compile" "QMAKE_USE += openssl" "QMAKE_LIBS_OPENSSL = D:\\Jenkins10\\workspace\\Qt\\Qlwx6m7_ax6nl\\buildDir\\OpenSSL1.1.1d-AndroidAPI21-x86_64\\lib\\libssl.a D:\\Jenkins10\\workspace\\Qt\\Qlwx6m7_ax6nl\\buildDir\\OpenSSL1.1.1d-AndroidAPI21-x86_64\\lib\\libcrypto.a" D:/Qt/build-QtQlwx6m7_ax6nl/config.tests/openssl
      + cd /d D:\Qt\build-QtQlwx6m7_ax6nl\config.tests\openssl && set MAKEFLAGS=& mingw32-make -j13
      > D:\android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -c -target aarch64-linux-android21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -O2 -fPIC  -I. -ID:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\include -ID:\Qt\qt-everywhere-src-5.14.0\qtbase\mkspecs\android-clang -o main.obj main.cpp
      > D:\android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++ -target aarch64-linux-android21 -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared -o openssl main.obj   D:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\lib\libssl.a D:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\lib\libcrypto.a   -llog -lz -lm -ldl -lc
      > D:\android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: D:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\lib\libssl.a(ssl_lib.o): Relocations in generic ELF (EM: 62)
      > D:\android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: D:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\lib\libssl.a(ssl_lib.o): Relocations in generic ELF (EM: 62)
      > D:\android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: D:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\lib\libssl.a(ssl_lib.o): Relocations in generic ELF (EM: 62)
      > D:\android-ndk-r20b/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: D:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\lib\libssl.a(ssl_lib.o): Relocations in generic ELF (EM: 62)
      > D:\Jenkins10\workspace\Qt\Qlwx6m7_ax6nl\buildDir\OpenSSL1.1.1d-AndroidAPI21-x86_64\lib\libssl.a: error adding symbols: File in wrong format
      > clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      > mingw32-make: *** [Makefile:67: openssl] Error 1
       => source failed verification.
      test config.qtbase_network.libraries.openssl FAILED
      

      Attachments is log from Windows machine.

      Attachments

        1. config.log
          122 kB
          Frank Su
        2. config.opt
          0.8 kB
          Frank Su
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            taipan BogDan Vatra
            fsu0413 Frank Su
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes