Solved Is this still the way to get SSL working on Android: http://doc.qt.io/qt-5/opensslsupport.html
-
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
-
What version of the NDK, SDK, JDK are you using ?
-
@SGaist
I am using NDK android-ndk-r16b
The SDK is for API-27java 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???
-
This post is deleted! -
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...
-
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.htmlBuilding 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.
-
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.
-
Thank you ! I will if it works with the recommended version.
-
@vvvvv you should use NDK r10e
perhaps this can help you: https://github.com/ekke/android-openssl-qt -
@ekkescorner
It seem to be working now. I have used the NDK10e and SDK version21
Thank you for all,cheers
-
@vvvvv great to hear