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

Android Build Fails When Configured Run-Time OpenSSL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.1.1
    • 5.1.0 RC2
    • QPA
    • None
    • linux 32-bit, QtCreator-2.7.1
    • 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 -developer-build -xplatform android-g++ -nomake tests
      -nomake examples -android-ndk /home/robert/dev/android-ndk-
      r8e-ma-android-sdk /home/robert/dev/android-sdk-linux -android-ndk-host
      linux-x86 -skip qttranslations -skip qtwebkit -skip qtserialport -skip
      qtwebkit-examples -openssl -I/home/robert/dev/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:

      /home/robert/dev/android-ndk-r8e-ma/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86/bin/arm-linux-androideabi-g++
      -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp
      -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums
      -DANDROID -Wa,--noexecstack -std=gnu++0x
      -I/home/robert/dev/openssl-1.0.1e/include -g -g -marm -O0
      -fno-omit-frame-pointer -fvisibility=hidden
      -fvisibility-inlines-hidden -fno-exceptions -Wall -Wno-psabi -W
      -D_REENTRANT -fPIC -DQT_NO_PRINTDIALOG -DQT_NO_LIBUDEV -DQT_NO_XCB
      -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_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS
      -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS
      -DQT_CORE_LIB -I../../mkspecs/android-g++ -I. -I../../include
      -I../../include/QtNetwork -I../../include/QtNetwork/5.1.1
      -I../../include/QtNetwork/5.1.1/QtNetwork -Ikernel
      -I../../include/QtCore -I../../include/QtCore/5.1.1
      -I../../include/QtCore/5.1.1/QtCore -I.moc/debug-shared
      -I/home/robert/dev/android-ndk-r8e-ma/sources/cxx-stl/gnu-libstdc++/4.7/include
      -I/home/robert/dev/android-ndk-r8e-ma/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include
      -I/home/robert/dev/android-ndk-r8e-ma/platforms/android-9/arch-arm/usr/include
      -o .obj/debug-shared/qsslsocket_openssl_symbols.o
      ssl/qsslsocket_openssl_symbols.cpp
      ssl/qsslsocket_openssl_symbols.cpp: In function 'QStringList libraryPathList()':
      ssl/qsslsocket_openssl_symbols.cpp:426:52: error: 'dl_iterate_phdr'
      was not declared in this scope
      

      Looking at link.h header file in
      android-ndk-r8e-ma/platforms/android-9/arch-arm/usr/include

      the following declarations are in use in link.h:

      #ifdef __arm__
      typedef long unsigned int* _Unwind_Ptr;
      _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int* pcount);
      #else
      int dl_iterate_phdr(int (*cb)(struct dl_phdr_info*, size_t, void*), void*);
      #endif
      

      and instead of dl_iterate_phdr used for _arm_
      dl_unwind_find_exidx

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              coroberti Robert Iakobashvili
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes