Is this still the way to get SSL working on Android: http://doc.qt.io/qt-5/opensslsupport.html
-
Hi and welcome to devnet,
What error are you getting ?
Where did you get the OpenSSL librairies from ?
What version of Qt are you building ?
On what OS ? -
@SGaist
My enviroment is linux (lubuntu 17.11) .
android-ndk-r16b
openssl-1.1.0gII have followed all instructions
When I run the Setenv_android.sh script this is the output
. ./Setenv-android.sh ANDROID_NDK_ROOT: /home/wvw/wlshare/codedev/android-ndk-r16b ANDROID_ARCH: arch-arm ANDROID_EABI: arm-linux-androideabi-4.9 ANDROID_API: android-27 ANDROID_SYSROOT: /home/wvw/wlshare/codedev/android-ndk-r16b/platforms/android-27/arch-arm ANDROID_TOOLCHAIN: /home/wvw/wlshare/codedev/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin FIPS_SIG: /home/wvw/wlshare/codedev/ejdk1.8.0_121/openssl-1.1.0g/util/incore CROSS_COMPILE: arm-linux-androideabi- ANDROID_DEV: /home/wvw/wlshare/codedev/android-ndk-r16b/platforms/android-27/arch-arm/usr
Then I run the Configure script in the openssl directory
./Configure shared android File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. at ./Configure line 270. Configuring OpenSSL version 1.1.0g (0x1010007fL) no-asan [default] OPENSSL_NO_ASAN no-crypto-mdebug [default] OPENSSL_NO_CRYPTO_MDEBUG no-crypto-mdebug-backtrace [default] OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128 no-egd [default] OPENSSL_NO_EGD no-fuzz-afl [default] OPENSSL_NO_FUZZ_AFL no-fuzz-libfuzzer [default] OPENSSL_NO_FUZZ_LIBFUZZER no-heartbeats [default] OPENSSL_NO_HEARTBEATS no-md2 [default] OPENSSL_NO_MD2 (skip dir) no-msan [default] OPENSSL_NO_MSAN no-rc5 [default] OPENSSL_NO_RC5 (skip dir) no-sctp [default] OPENSSL_NO_SCTP no-ssl-trace [default] OPENSSL_NO_SSL_TRACE no-ssl3 [default] OPENSSL_NO_SSL3 no-ssl3-method [default] OPENSSL_NO_SSL3_METHOD no-ubsan [default] OPENSSL_NO_UBSAN no-unit-test [default] OPENSSL_NO_UNIT_TEST no-weak-ssl-ciphers [default] OPENSSL_NO_WEAK_SSL_CIPHERS no-zlib [default] no-zlib-dynamic [default] Configuring for android CC =arm-linux-androideabi-gcc CFLAG =-Wall -O3 -pthread -mandroid -fPIC --sysroot=$(CROSS_SYSROOT) -Wa,--noexecstack SHARED_CFLAG =-fPIC -DOPENSSL_USE_NODELETE DEFINES =DSO_DLFCN HAVE_DLFCN_H NDEBUG OPENSSL_THREADS OPENSSL_NO_STATIC_ENGINE OPENSSL_PIC LFLAG = PLIB_LFLAG = EX_LIBS =-ldl APPS_OBJ = CPUID_OBJ =mem_clr.o UPLINK_OBJ = BN_ASM =bn_asm.o EC_ASM = DES_ENC =des_enc.o fcrypt_b.o AES_ENC =aes_core.o aes_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 MD5_OBJ_ASM = SHA1_OBJ_ASM = RMD160_OBJ_ASM= CMLL_ENC =camellia.o cmll_misc.o cmll_cbc.o MODES_OBJ = PADLOCK_OBJ = CHACHA_ENC =chacha_enc.o POLY1305_OBJ = BLAKE2_OBJ = PROCESSOR = RANLIB =arm-linux-androideabi-ranlib ARFLAGS = PERL =/usr/bin/perl THIRTY_TWO_BIT mode BN_LLONG mode RC4 uses unsigned char Configured for android.
And the last step: make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs to build the libcrypto and libssl shared libraries that are not versioned.
make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs make depend && make _build_libs make[1]: Entering directory '/home/wvw/wlshare/codedev/openssl-1.1.0g' make[1]: Leaving directory '/home/wvw/wlshare/codedev/openssl-1.1.0g' make[1]: Entering directory '/home/wvw/wlshare/codedev/openssl-1.1.0g' arm-linux-androideabi-gcc -I. -Icrypto/include -Iinclude -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -Wall -O3 -pthread -mandroid -fPIC --sysroot=/home/wvw/wlshare/codedev/android-ndk-r16b/platforms/android-27/arch-arm -Wa,--noexecstack -fPIC -DOPENSSL_USE_NODELETE -MMD -MF crypto/aes/aes_cbc.d.tmp -MT crypto/aes/aes_cbc.o -c -o crypto/aes/aes_cbc.o crypto/aes/aes_cbc.c arm-linux-androideabi-gcc -I. -Icrypto/include -Iinclude -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -Wall -O3 -pthread -mandroid -fPIC --sysroot=/home/wvw/wlshare/codedev/android-ndk-r16b/platforms/android-27/arch-arm -Wa,--noexecstack -fPIC -DOPENSSL_USE_NODELETE -MMD -MF crypto/aes/aes_cfb.d.tmp -MT crypto/aes/aes_cfb.o -c -o crypto/aes/aes_cfb.o crypto/aes/aes_cfb.c arm-linux-androideabi-gcc -I. -Icrypto/include -Iinclude -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -Wall -O3 -pthread -mandroid -fPIC --sysroot=/home/wvw/wlshare/codedev/android-ndk-r16b/platforms/android-27/arch-arm -Wa,--noexecstack -fPIC -DOPENSSL_USE_NODELETE -MMD -MF crypto/aes/aes_core.d.tmp -MT crypto/aes/aes_core.o -c -o crypto/aes/aes_core.o crypto/aes/aes_core.c crypto/aes/aes_core.c:39:20: fatal error: assert.h: No such file or directory #include <assert.h> ^ compilation terminated. Makefile:674: recipe for target 'crypto/aes/aes_core.o' failed make[1]: *** [crypto/aes/aes_core.o] Error 1 make[1]: Leaving directory '/home/wvw/wlshare/codedev/openssl-1.1.0g' Makefile:133: recipe for target 'build_libs' failed make: *** [build_libs] Error 2
-
Try again with the latest of the OpenSSL 1.0 series.
-
Here are the results
wvw@wvw-Aspire-F5-573G:~/sslbuild/openssl-1.0.2n$ ./Configure shared androidConfiguring for android no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir) no-gmp [default] OPENSSL_NO_GMP (skip dir) no-jpake [experimental] OPENSSL_NO_JPAKE (skip dir) no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5 no-libunbound [experimental] OPENSSL_NO_LIBUNBOUND (skip dir) no-md2 [default] OPENSSL_NO_MD2 (skip dir) no-rc5 [default] OPENSSL_NO_RC5 (skip dir) no-rfc3779 [default] OPENSSL_NO_RFC3779 (skip dir) no-sctp [default] OPENSSL_NO_SCTP (skip dir) no-ssl-trace [default] OPENSSL_NO_SSL_TRACE (skip dir) no-ssl2 [default] OPENSSL_NO_SSL2 (skip dir) no-store [experimental] OPENSSL_NO_STORE (skip dir) no-unit-test [default] OPENSSL_NO_UNIT_TEST (skip dir) no-weak-ssl-ciphers [default] OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir) no-zlib [default] no-zlib-dynamic [default] IsMK1MF=0 CC =gcc CFLAG =-fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I$(ANDROID_DEV)/include -B$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall 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 =aes_core.o aes_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 MD5_OBJ_ASM = SHA1_OBJ_ASM = RMD160_OBJ_ASM= CMLL_ENC =camellia.o cmll_misc.o cmll_cbc.o MODES_OBJ = ENGINES_OBJ = PROCESSOR = RANLIB =/usr/bin/ranlib ARFLAGS = PERL =/usr/bin/perl THIRTY_TWO_BIT mode DES_UNROLL used DES_INT used BN_LLONG mode RC4 uses uchar RC4_CHUNK is unsigned long BF_PTR used created directory `include/openssl' e_os2.h => include/openssl/e_os2.h making links in crypto... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto' crypto.h => ../include/openssl/crypto.h opensslv.h => ../include/openssl/opensslv.h opensslconf.h => ../include/openssl/opensslconf.h ebcdic.h => ../include/openssl/ebcdic.h symhacks.h => ../include/openssl/symhacks.h ossl_typ.h => ../include/openssl/ossl_typ.h constant_time_test.c => ../test/constant_time_test.c making links in crypto/objects... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/objects' objects.h => ../../include/openssl/objects.h obj_mac.h => ../../include/openssl/obj_mac.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/objects' making links in crypto/md4... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/md4' md4.h => ../../include/openssl/md4.h md4test.c => ../../test/md4test.c md4.c => ../../apps/md4.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/md4' making links in crypto/md5... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/md5' md5.h => ../../include/openssl/md5.h md5test.c => ../../test/md5test.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/md5' making links in crypto/sha... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/sha' sha.h => ../../include/openssl/sha.h shatest.c => ../../test/shatest.c sha1test.c => ../../test/sha1test.c sha256t.c => ../../test/sha256t.c sha512t.c => ../../test/sha512t.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/sha' making links in crypto/mdc2... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/mdc2' mdc2.h => ../../include/openssl/mdc2.h mdc2test.c => ../../test/mdc2test.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/mdc2' making links in crypto/hmac... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/hmac' hmac.h => ../../include/openssl/hmac.h hmactest.c => ../../test/hmactest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/hmac' making links in crypto/ripemd... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ripemd' ripemd.h => ../../include/openssl/ripemd.h rmdtest.c => ../../test/rmdtest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ripemd' making links in crypto/whrlpool... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/whrlpool' whrlpool.h => ../../include/openssl/whrlpool.h wp_test.c => ../../test/wp_test.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/whrlpool' making links in crypto/des... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/des' des.h => ../../include/openssl/des.h des_old.h => ../../include/openssl/des_old.h destest.c => ../../test/destest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/des' making links in crypto/aes... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/aes' aes.h => ../../include/openssl/aes.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/aes' making links in crypto/rc2... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rc2' rc2.h => ../../include/openssl/rc2.h rc2test.c => ../../test/rc2test.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rc2' making links in crypto/rc4... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rc4' rc4.h => ../../include/openssl/rc4.h rc4test.c => ../../test/rc4test.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rc4' making links in crypto/idea... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/idea' idea.h => ../../include/openssl/idea.h ideatest.c => ../../test/ideatest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/idea' making links in crypto/bf... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/bf' blowfish.h => ../../include/openssl/blowfish.h bftest.c => ../../test/bftest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/bf' making links in crypto/cast... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/cast' cast.h => ../../include/openssl/cast.h casttest.c => ../../test/casttest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/cast' making links in crypto/camellia... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/camellia' camellia.h => ../../include/openssl/camellia.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/camellia' making links in crypto/seed... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/seed' seed.h => ../../include/openssl/seed.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/seed' making links in crypto/modes... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/modes' modes.h => ../../include/openssl/modes.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/modes' making links in crypto/bn... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/bn' bn.h => ../../include/openssl/bn.h bntest.c => ../../test/bntest.c exptest.c => ../../test/exptest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/bn' making links in crypto/ec... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ec' ec.h => ../../include/openssl/ec.h ectest.c => ../../test/ectest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ec' making links in crypto/rsa... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rsa' rsa.h => ../../include/openssl/rsa.h rsa_test.c => ../../test/rsa_test.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rsa' making links in crypto/dsa... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/dsa' dsa.h => ../../include/openssl/dsa.h dsatest.c => ../../test/dsatest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/dsa' making links in crypto/ecdsa... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ecdsa' ecdsa.h => ../../include/openssl/ecdsa.h ecdsatest.c => ../../test/ecdsatest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ecdsa' making links in crypto/dh... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/dh' dh.h => ../../include/openssl/dh.h dhtest.c => ../../test/dhtest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/dh' making links in crypto/ecdh... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ecdh' ecdh.h => ../../include/openssl/ecdh.h ecdhtest.c => ../../test/ecdhtest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ecdh' making links in crypto/dso... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/dso' dso.h => ../../include/openssl/dso.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/dso' making links in crypto/engine... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/engine' engine.h => ../../include/openssl/engine.h enginetest.c => ../../test/enginetest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/engine' making links in crypto/buffer... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/buffer' buffer.h => ../../include/openssl/buffer.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/buffer' making links in crypto/bio... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/bio' bio.h => ../../include/openssl/bio.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/bio' making links in crypto/stack... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/stack' stack.h => ../../include/openssl/stack.h safestack.h => ../../include/openssl/safestack.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/stack' making links in crypto/lhash... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/lhash' lhash.h => ../../include/openssl/lhash.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/lhash' making links in crypto/rand... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rand' rand.h => ../../include/openssl/rand.h randtest.c => ../../test/randtest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/rand' making links in crypto/err... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/err' err.h => ../../include/openssl/err.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/err' making links in crypto/evp... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/evp' evp.h => ../../include/openssl/evp.h evp_test.c => ../../test/evp_test.c evp_extra_test.c => ../../test/evp_extra_test.c evptests.txt -> ../../test/evptests.txt make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/evp' making links in crypto/asn1... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/asn1' asn1.h => ../../include/openssl/asn1.h asn1_mac.h => ../../include/openssl/asn1_mac.h asn1t.h => ../../include/openssl/asn1t.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/asn1' making links in crypto/pem... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pem' pem.h => ../../include/openssl/pem.h pem2.h => ../../include/openssl/pem2.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pem' making links in crypto/x509... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/x509' x509.h => ../../include/openssl/x509.h x509_vfy.h => ../../include/openssl/x509_vfy.h verify_extra_test.c => ../../test/verify_extra_test.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/x509' making links in crypto/x509v3... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/x509v3' x509v3.h => ../../include/openssl/x509v3.h v3nametest.c => ../../test/v3nametest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/x509v3' making links in crypto/conf... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/conf' conf.h => ../../include/openssl/conf.h conf_api.h => ../../include/openssl/conf_api.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/conf' making links in crypto/txt_db... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/txt_db' txt_db.h => ../../include/openssl/txt_db.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/txt_db' making links in crypto/pkcs7... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pkcs7' pkcs7.h => ../../include/openssl/pkcs7.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pkcs7' making links in crypto/pkcs12... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pkcs12' pkcs12.h => ../../include/openssl/pkcs12.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pkcs12' making links in crypto/comp... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/comp' comp.h => ../../include/openssl/comp.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/comp' making links in crypto/ocsp... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ocsp' ocsp.h => ../../include/openssl/ocsp.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ocsp' making links in crypto/ui... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ui' ui.h => ../../include/openssl/ui.h ui_compat.h => ../../include/openssl/ui_compat.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ui' making links in crypto/krb5... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/krb5' krb5_asn.h => ../../include/openssl/krb5_asn.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/krb5' making links in crypto/cms... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/cms' cms.h => ../../include/openssl/cms.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/cms' making links in crypto/pqueue... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pqueue' pqueue.h => ../../include/openssl/pqueue.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/pqueue' making links in crypto/ts... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ts' ts.h => ../../include/openssl/ts.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/ts' making links in crypto/srp... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/srp' srp.h => ../../include/openssl/srp.h srptest.c => ../../test/srptest.c make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/srp' making links in crypto/cmac... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/cmac' cmac.h => ../../include/openssl/cmac.h make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto/cmac' make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto' making links in ssl... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/ssl' ssl.h => ../include/openssl/ssl.h ssl2.h => ../include/openssl/ssl2.h ssl3.h => ../include/openssl/ssl3.h ssl23.h => ../include/openssl/ssl23.h tls1.h => ../include/openssl/tls1.h dtls1.h => ../include/openssl/dtls1.h kssl.h => ../include/openssl/kssl.h srtp.h => ../include/openssl/srtp.h ssltest.c => ../test/ssltest.c heartbeat_test.c => ../test/heartbeat_test.c clienthellotest.c => ../test/clienthellotest.c sslv2conftest.c => ../test/sslv2conftest.c dtlstest.c => ../test/dtlstest.c bad_dtls_test.c => ../test/bad_dtls_test.c fatalerrtest.c => ../test/fatalerrtest.c make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/ssl' making links in engines... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/engines' making links in engines/ccgost... make[2]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/engines/ccgost' make[2]: Nothing to be done for 'links'. make[2]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/engines/ccgost' make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/engines' making links in apps... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/apps' make[1]: Nothing to be done for 'links'. make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/apps' making links in test... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/test' make[1]: Nothing to be done for 'links'. make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/test' making links in tools... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/tools' make[1]: Nothing to be done for 'links'. make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/tools' generating dummy tests (if needed)... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/test' md2test.c => dummytest.c rc5test.c => dummytest.c jpaketest.c => dummytest.c make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/test' Configured for android.
And the make step
make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs making all in crypto... make[1]: Entering directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto' arm-linux-androideabi-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_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/android-ndk-r16b/platforms/android-27/arch-arm/usr/lib -O3 -fomit-frame-pointer -Wall -c -o cryptlib.o cryptlib.c 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. <builtin>: recipe for target 'cryptlib.o' failed make[1]: *** [cryptlib.o] Error 1 make[1]: Leaving directory '/home/wvw/sslbuild/openssl-1.0.2n/crypto' Makefile:288: recipe for target 'build_crypto' failed make: *** [build_crypto] Error 1
Almost the same result but now it cannot find the stdlib.h
-
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???
-
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.
-
@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