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

Android Build Fails When Configured Run-Time OpenSSL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.1.1
    • 5.1.1
    • Build System
    • None
    • Windows 7 64 bit
    • Android
    • 61fbdc00fb03eba82309860487954d87460852a3

    Description

      To enable run-time support and usage for openssl related functions in my application, I've configured it with added flags -openssl and -I/path-to-openssl-headers.

      configure.bat -developer-build -platform win32-g++ -opengl es2 -xplatform 
      android-g++ -android-ndk C:\AndroidSdk\android-ndk-r8e -android-sdk C:\AndroidSdk\sdk -android-toolchain-version 4.7 -opensource -confirm-license -nomake tests -nomake examples 
      -openssl -I C:\openssl-1.0.1e\include
      

      and seen that openssl run-time support is indeed configured.
      Trying to make, I'm getting the following compilation error:

      C:/AndroidSdk/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/wind
      ows/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softf
      p -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enu
      ms -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -mthumb -Os -fomit-frame-pointer
       -fno-strict-aliasing -finline-limit=64 -fvisibility=hidden -fvisibility-inlines
      -hidden -fno-exceptions -Wall -Wno-psabi -W -D_REENTRANT -fPIC -DQT_NO_PRINTER -
      DQT_NO_PRINTDIALOG -DQT_NO_XKBCOMMON -DQT_NO_USING_NAMESPACE -DQT_BUILD_NETWORK_
      LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COM
      PAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEF
      ORE=0x050000 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CORE_LIB -I..\..\mkspecs\andr
      oid-g++ -I. -IC:\openssl-1.0.1e\include -I..\..\include -I..\..\include\QtNetwor
      k -I..\..\include\QtNetwork\5.1.2 -I..\..\include\QtNetwork\5.1.2\QtNetwork -Ike
      rnel -I..\..\include\QtCore -I..\..\include\QtCore\5.1.2 -I..\..\include\QtCore\
      5.1.2\QtCore -I.moc\release_shared -IC:\AndroidSdk\android-ndk-r8e\sources\cxx-s
      tl\gnu-libstdc++\4.7\include -IC:\AndroidSdk\android-ndk-r8e\sources\cxx-stl\gnu
      -libstdc++\4.7\libs\armeabi-v7a\include -IC:\AndroidSdk\android-ndk-r8e\platform
      s\android-9\arch-arm\usr\include -o .obj\release_shared\qhttpnetworkreply.obj ac
      cess\qhttpnetworkreply.cpp
      In file included from ..\..\include\QtNetwork\5.1.2\QtNetwork/private/../../../.
      ./../src/network/ssl/qsslcontext_p.h:49:0,
                       from ..\..\include\QtNetwork\5.1.2\QtNetwork/private/qsslcontex
      t_p.h:1,
                       from access\qhttpnetworkconnection_p.h:76,
                       from access\qhttpnetworkreply.cpp:43:
      C:\openssl-1.0.1e\include/openssl/ssl.h:1:1: error: expected unqualified-id befo
      re '.' token
      In file included from ..\..\include\QtNetwork\5.1.2\QtNetwork/private/qsslcontex
      t_p.h:1:0,
                       from access\qhttpnetworkconnection_p.h:76,
                       from access\qhttpnetworkreply.cpp:43:
      ..\..\include\QtNetwork\5.1.2\QtNetwork/private/../../../../../src/network/ssl/q
      sslcontext_p.h:69:5: error: 'SSL' does not name a type
      ..\..\include\QtNetwork\5.1.2\QtNetwork/private/../../../../../src/network/ssl/q
      sslcontext_p.h:70:23: error: 'SSL' has not been declared
      ..\..\include\QtNetwork\5.1.2\QtNetwork/private/../../../../../src/network/ssl/q
      sslcontext_p.h:76:5: error: 'SSL_CTX' does not name a type
      ..\..\include\QtNetwork\5.1.2\QtNetwork/private/../../../../../src/network/ssl/q
      sslcontext_p.h:77:5: error: 'EVP_PKEY' does not name a type
      ..\..\include\QtNetwork\5.1.2\QtNetwork/private/../../../../../src/network/ssl/q
      sslcontext_p.h:78:5: error: 'SSL_SESSION' does not name a type
      Makefile:18896: recipe for target '.obj\release_shared\qhttpnetworkreply.obj' fa
      iled
      mingw32-make[3]: *** [.obj\release_shared\qhttpnetworkreply.obj] Error 1
      mingw32-make[3]: Leaving directory 'C:/qt5/qtbase/src/network'
      Makefile:157: recipe for target 'sub-network-make_first' failed
      mingw32-make[2]: *** [sub-network-make_first] Error 2
      mingw32-make[2]: Leaving directory 'C:/qt5/qtbase/src'
      Makefile:41: recipe for target 'sub-src-make_first' failed
      mingw32-make[1]: *** [sub-src-make_first] Error 2
      mingw32-make[1]: Leaving directory 'C:/qt5/qtbase'
      makefile:57: recipe for target 'module-qtbase-make_first' failed
      mingw32-make: *** [module-qtbase-make_first] Error 2
      

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            jonesy Antonio Gabriele
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes