Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Is this still the way to get SSL working on Android: http://doc.qt.io/qt-5/opensslsupport.html
Forum Updated to NodeBB v4.3 + New Features

Is this still the way to get SSL working on Android: http://doc.qt.io/qt-5/opensslsupport.html

Scheduled Pinned Locked Moved Solved Mobile and Embedded
16 Posts 3 Posters 5.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vvvvv
    wrote on last edited by vvvvv
    #6

    And with the trace option on:

    make --trace CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs  |more
    Makefile:288: target 'build_crypto' does not exist
    dir=crypto; target=all; if expr " crypto ssl engines apps test tools " : ".* $dir 
    " >/dev/null 2>&1; then if [ -d "$dir" ]; then (	cd $dir && echo "making $t
    arget in $dir..." && TOP= && unset TOP ${LIB+LIB} ${LIBS+LIBS} ${INCLUDE+INCLUDE} 
    ${INCLUDES+INCLUDES} ${DIR+DIR} ${DIRS+DIRS} ${SRC+SRC} ${LIBSRC+LIBSRC} ${LIBOBJ+
    LIBOBJ} ${ALL+ALL} ${EXHEADER+EXHEADER} ${HEADER+HEADER} ${GENERAL+GENERAL} ${CFLA
    GS+CFLAGS} ${ASFLAGS+ASFLAGS} ${AFLAGS+AFLAGS} ${LDCMD+LDCMD} ${LDFLAGS+LDFLAGS} $
    {SCRIPTS+SCRIPTS} ${SHAREDCMD+SHAREDCMD} ${SHAREDFLAGS+SHAREDFLAGS} ${SHARED_LIB+S
    HARED_LIB} ${LIBEXTRAS+LIBEXTRAS} ${APPS+APPS} && make -e LC_ALL=C PLATFORM='andro
    id' PROCESSOR='' CC='arm-linux-androideabi-gcc' CFLAG='-fPIC -DOPENSSL_PIC -DOPENS
    SL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid *-I/home/wvw/sslbuild/
    android-ndk-r16b/platforms/android-27/arch-arm/usr/include* -B/home/wvw/sslbuild/an
    droid-ndk-r16b/platforms/android-27/arch-arm/usr/lib -O3 -fomit-frame-pointer -Wal
    l' AS='arm-linux-androideabi-gcc' ASFLAG='-fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D
    _REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I/home/wvw/sslbuild/android-ndk-r
    16b/platforms/android-27/arch-arm/usr/include -B/home/wvw/sslbuild/android-ndk-r16
    b/platforms/android-27/arch-arm/usr/lib -O3 -fomit-frame-pointer -Wall -c' AR='arm
    -linux-androideabi-ar  r' NM='arm-linux-androideabi-nm' RANLIB='arm-linux-androide
    abi-ranlib' RC='arm-linux-androideabi-windres' CROSS_COMPILE='arm-linux-androideab
    i-' PERL='/usr/bin/perl' ENGDIRS='ccgost' SDIRS='objects md4 md5 sha mdc2 hmac rip
    emd whrlpool des aes rc2 rc4 idea bf cast camellia seed modes bn ec rsa dsa ecdsa 
    dh ecdh dso engine buffer bio stack lhash rand err evp asn1 pem x509 x509v3 conf t
    xt_db pkcs7 pkcs12 comp ocsp ui krb5 cms pqueue ts srp cmac' LIBRPATH='/usr/local/
    ssl/lib' INSTALL_PREFIX='' INSTALLTOP='/usr/local/ssl' OPENSSLDIR='/usr/local/ssl'
     LIBDIR='lib' MAKEDEPEND='$${TOP}/util/domd $${TOP} -MD arm-linux-androideabi-gcc'
     DEPFLAG='-DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GM
    P -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DO
    PENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_SSL2 -DOPE
    NSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST -DOPENSSL_NO_WEAK_SSL_CIPHERS' MAKEDEPPROG='a
    rm-linux-androideabi-gcc' SHARED_LDFLAGS='' KRB5_INCLUDES='' LIBKRB5='' ZLIB_INCLU
    DE='' LIBZLIB='' EXE_EXT='' SHARED_LIBS='libcrypto.so.1.0.0 libssl.so.1.0.0' SHLIB
    _EXT='.so.1.0.0' SHLIB_TARGET='linux-shared' PEX_LIBS='' EX_LIBS='-ldl' CPUID_OBJ=
    'mem_clr.o' BN_ASM='bn_asm.o' EC_ASM='' DES_ENC='des_enc.o fcrypt_b.o' AES_ENC='ae
    s_core.o aes_cbc.o' CMLL_ENC='camellia.o cmll_misc.o cmll_cbc.o' BF_ENC='bf_enc.o'
     CAST_ENC='c_enc.o' RC4_ENC='rc4_enc.o rc4_skey.o' RC5_ENC='rc5_enc.o' SHA1_ASM_OB
    J='' MD5_ASM_OBJ='' RMD160_ASM_OBJ='' WP_ASM_OBJ='wp_block.o' MODES_ASM_OBJ='' ENG
    INES_ASM_OBJ='' PERLASM_SCHEME='void' FIPSLIBDIR='' FIPSDIR='/usr/local/ssl/fips-2
    .0' FIPSCANLIB="${FIPSCANLIB:-}" THIS=${THIS:-build_crypto} MAKEFILE=Makefile MAKE
    OVERRIDES= TOP=.. DIR=$dir $target ) || exit 1; fi; fi
    making all in crypto...
    make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto'
    --More--In file included from cryptlib.c:117:0:
    cryptlib.h:62:21: fatal error: stdlib.h: No such file or directory
     # include <stdlib.h>
                         ^
    compilation terminated.
    make[1]: *** [cryptlib.o] Error 1
    make: *** [build_crypto] Error 1
    
    
    ```<builtin>: update target 'cryptlib.o' due to: cryptlib.c ../e_os.h ../include/open
    ssl/bio.h ../include/openssl/buffer.h ../include/openssl/crypto.h ../include/opens
    sl/e_os2.h ../include/openssl/err.h ../include/openssl/lhash.h ../include/openssl/
    opensslconf.h ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h ../inclu
    de/openssl/safestack.h ../include/openssl/stack.h ../include/openssl/symhacks.h cr
    yptlib.h
    arm-linux-androideabi-gcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THR
    EADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I/home/wvw/sslbuild/androi
    d-ndk-r16b/platforms/android-27/arch-arm/usr/include -B/home/wvw/sslbuild/android-
    ndk-r16b/platforms/android-27/arch-arm/usr/lib -O3 -fomit-frame-pointer -Wall   -c
     -o cryptlib.o cryptlib.c
    <builtin>: recipe for target 'cryptlib.o' failed
    make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto'
    Makefile:288: recipe for target 'build_crypto' failed
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #7

      What version of the NDK, SDK, JDK are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      V 1 Reply Last reply
      0
      • SGaistS SGaist

        What version of the NDK, SDK, JDK are you using ?

        V Offline
        V Offline
        vvvvv
        wrote on last edited by
        #8

        @SGaist
        I am using NDK android-ndk-r16b
        The SDK is for API-27

        java version "1.8.0_121"
        Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
        Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

        The strange thing is that it seems from the trace that the right include path are there???

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vvvvv
          wrote on last edited by
          #9
          This post is deleted!
          1 Reply Last reply
          0
          • V Offline
            V Offline
            vvvvv
            wrote on last edited by
            #10

            these is the result from a command to get the used include path

            echo | arm-linux-androideabi-gcc -Wp,-v -x c++ - -fsyntax-only
            ignoring nonexistent directory "/home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/include"
            ignoring nonexistent directory "/home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/../../include/c++/4.9.x"
            ignoring nonexistent directory "/home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/../../include/c++/4.9.x/arm-linux-androideabi"
            ignoring nonexistent directory "/home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/../../include/c++/4.9.x/backward"
            ignoring duplicate directory "/home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/../../lib/gcc/arm-linux-androideabi/4.9.x/include"
            ignoring nonexistent directory "/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/sysroot/usr/local/include"
            ignoring duplicate directory "/home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/../../lib/gcc/arm-linux-androideabi/4.9.x/include-fixed"
            ignoring nonexistent directory "/home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/../../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/include"
            ignoring nonexistent directory "/tmp/7b21daf2c1357ae66bd1633d4faf8a6d/sysroot/usr/include"
            #include "..." search starts here:
            #include <...> search starts here:
             /home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/include
             /home/wvw/sslbuild/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/include-fixed
            End of search list.
            wvw@wvw-Aspire-F5-573G:~/sslbuild/openssl-1.0.2n/include/openssl$ 
            
            

            It complains about non existing include path, I will check these later...

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vvvvv
              wrote on last edited by
              #11

              Some progress.....

              I have noticed a difference between NDK16b and e.g. NDK12b

              In the later android NDK distributions header files seem te be located in de sysroot directory.
              https://developer.android.com/ndk/guides/standalone_toolchain.html

              Building using the instructions http://doc.qt.io/qt-5/opensslsupport.html is working for the older NDK not for the newer. I will have to see if I can fix the Setenv_android.sh script to make it work for the newer NDK's too.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #12

                Android has a tendency to break compatibility from one release of the NDK to the other.

                You can find in the Android Getting Started of Qt's documentation the recommended versions of these dependencies.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vvvvv
                  wrote on last edited by
                  #13

                  Thank you ! I will if it works with the recommended version.

                  ekkescornerE 1 Reply Last reply
                  0
                  • V vvvvv

                    Thank you ! I will if it works with the recommended version.

                    ekkescornerE Offline
                    ekkescornerE Offline
                    ekkescorner
                    Qt Champions 2016
                    wrote on last edited by
                    #14

                    @vvvvv you should use NDK r10e
                    perhaps this can help you: https://github.com/ekke/android-openssl-qt

                    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                    5.15 --> 6.9 https://t1p.de/ekkeChecklist
                    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                    V 1 Reply Last reply
                    1
                    • ekkescornerE ekkescorner

                      @vvvvv you should use NDK r10e
                      perhaps this can help you: https://github.com/ekke/android-openssl-qt

                      V Offline
                      V Offline
                      vvvvv
                      wrote on last edited by
                      #15

                      @ekkescorner
                      It seem to be working now. I have used the NDK10e and SDK version21
                      Thank you for all,

                      cheers

                      ekkescornerE 1 Reply Last reply
                      0
                      • V vvvvv

                        @ekkescorner
                        It seem to be working now. I have used the NDK10e and SDK version21
                        Thank you for all,

                        cheers

                        ekkescornerE Offline
                        ekkescornerE Offline
                        ekkescorner
                        Qt Champions 2016
                        wrote on last edited by
                        #16

                        @vvvvv great to hear

                        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                        5.15 --> 6.9 https://t1p.de/ekkeChecklist
                        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved