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

Anroid build fails with openssl 1.1.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.7.0
    • Network: SSL
    • None
    • NDK: r12b

    Description

      It fails with:

      /home/qt-android/Android/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -c -ffunction-sections -funwind-tables -fstack-protector -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID -Wa,--noexecstack -std=c++11 -O2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wno-psabi -W -Wvla -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CORE_LIB -I. -Ikernel -I../../include -I../../include/QtNetwork -I../../include/QtNetwork/5.7.0 -I../../include/QtNetwork/5.7.0/QtNetwork -I../../include/QtCore/5.7.0 -I../../include/QtCore/5.7.0/QtCore -I../../include/QtCore -I.moc -I/home/qt-android/Android/openssl-1.1.0-android64-aarch64/include -isystem /home/qt-android/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /home/qt-android/Android/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include -isystem /home/qt-android/Android/android-ndk/platforms/android-24/arch-arm64/usr/include -I../../mkspecs/android-g++ -o .obj/qsslcontext_openssl.o ssl/qsslcontext_openssl.cpp
      ssl/qsslcertificate_openssl.cpp: In function 'uint qHash(const QSslCertificate&, uint)':
      ssl/qsslcertificate_openssl.cpp:69:30: error: invalid use of incomplete type 'X509 {aka struct x509_st}'
               return qHashBits(x509->sha1_hash, SHA_DIGEST_LENGTH, seed);
                                    ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:119:16: error: forward declaration of 'X509 {aka struct x509_st}'
       typedef struct x509_st X509;
                      ^
      ssl/qsslcertificate_openssl.cpp: In member function 'QByteArray QSslCertificate::version() const':
      ssl/qsslcertificate_openssl.cpp:93:68: error: invalid use of incomplete type 'X509 {aka struct x509_st}'
                   QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
                                                                          ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:119:16: error: forward declaration of 'X509 {aka struct x509_st}'
       typedef struct x509_st X509;
                      ^
      ssl/qsslcertificate_openssl.cpp: In member function 'QByteArray QSslCertificate::serialNumber() const':
      ssl/qsslcertificate_openssl.cpp:102:45: error: invalid use of incomplete type 'X509 {aka struct x509_st}'
               ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
                                                   ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:119:16: error: forward declaration of 'X509 {aka struct x509_st}'
       typedef struct x509_st X509;
                      ^
      ssl/qsslcertificate_openssl.cpp: In member function 'QSslKey QSslCertificate::publicKey() const':
      ssl/qsslcertificate_openssl.cpp:238:32: error: invalid use of incomplete type 'X509 {aka struct x509_st}'
           X509_PUBKEY *xkey = d->x509->cert_info->key;
                                      ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:119:16: error: forward declaration of 'X509 {aka struct x509_st}'
       typedef struct x509_st X509;
                      ^
      ssl/qsslcertificate_openssl.cpp:242:29: error: invalid use of incomplete type 'EVP_PKEY {aka struct evp_pkey_st}'
           if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
                                   ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:93:16: error: forward declaration of 'EVP_PKEY {aka struct evp_pkey_st}'
       typedef struct evp_pkey_st EVP_PKEY;
                      ^
      ssl/qsslcertificate_openssl.cpp:246:36: error: invalid use of incomplete type 'EVP_PKEY {aka struct evp_pkey_st}'
           } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
                                          ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:93:16: error: forward declaration of 'EVP_PKEY {aka struct evp_pkey_st}'
       typedef struct evp_pkey_st EVP_PKEY;
                      ^
      ssl/qsslcertificate_openssl.cpp:251:36: error: invalid use of incomplete type 'EVP_PKEY {aka struct evp_pkey_st}'
           } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_EC) {
                                          ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:93:16: error: forward declaration of 'EVP_PKEY {aka struct evp_pkey_st}'
       typedef struct evp_pkey_st EVP_PKEY;
                      ^
      ssl/qsslcertificate_openssl.cpp:256:36: error: invalid use of incomplete type 'EVP_PKEY {aka struct evp_pkey_st}'
           } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
                                          ^
      In file included from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/crypto.h:31:0,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/comp.h:16,
                       from /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:47,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslsocket_p.h:61,
                       from ssl/qsslsocket_openssl_p.h:69,
                       from ssl/qsslsocket_openssl_symbols_p.h:70,
                       from ssl/qsslcertificate_openssl.cpp:41:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ossl_typ.h:93:16: error: forward declaration of 'EVP_PKEY {aka struct evp_pkey_st}'
       typedef struct evp_pkey_st EVP_PKEY;
                      ^
      In file included from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslsocket_openssl_symbols_p.h:1:0,
                       from ssl/qsslcontext_openssl.cpp:50:
      ssl/qsslcontext_openssl.cpp: In static member function 'static void QSslContext::initSslContext(QSslContext*, QSslSocket::SslMode, const QSslConfiguration&, bool)':
      ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslsocket_openssl_symbols_p.h:522:60: error: 'SSL_CTRL_OPTIONS' was not declared in this scope
       #define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
                                                                  ^
      ssl/qsslcontext_openssl.cpp:195:5: note: in expansion of macro 'q_SSL_CTX_set_options'
           q_SSL_CTX_set_options(sslContext->ctx, options);
           ^
      ssl/qsslcontext_openssl.cpp:336:41: error: 'SSL_CTRL_SET_ECDH_AUTO' was not declared in this scope
               q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_SET_ECDH_AUTO, 1, NULL);
                                               ^
      ssl/qsslcontext_openssl.cpp: In member function 'bool QSslContext::cacheSession(SSL*)':
      ssl/qsslcontext_openssl.cpp:490:50: error: invalid use of incomplete type 'SSL_SESSION {aka struct ssl_session_st}'
                   m_sessionTicketLifeTimeHint = session->tlsext_tick_lifetime_hint;
                                                        ^
      In file included from ../../include/QtNetwork/5.7.0/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:59:0,
                       from ../../include/QtNetwork/5.7.0/QtNetwork/private/qsslcontext_openssl_p.h:1,
                       from ssl/qsslcontext_openssl.cpp:47:
      /home/qt-android/Android/openssl-1.1.0-android64-aarch64/include/openssl/ssl.h:228:16: error: forward declaration of 'SSL_SESSION {aka struct ssl_session_st}'
       typedef struct ssl_session_st SSL_SESSION;
                      ^
      ssl/qsslcertificate_openssl.cpp: In function 'uint qHash(const QSslCertificate&, uint)':
      ssl/qsslcertificate_openssl.cpp:73:1: warning: control reaches end of non-void function [-Wreturn-type]
       }
       ^
      Makefile:21155: recipe for target '.obj/qsslcontext_openssl.o' failed
      
      

      Attachments

        Issue Links

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

          Activity

            People

              richmoore Richard Moore (qtnetwork)
              tuxmaster Frank Büttner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes