[Android-development] Qt 5.8 Android7 openssl make build_libs unknown argument: '-mandroid' (OSX)
ekke
ekke at ekkes-corner.org
Wed Mar 8 15:22:00 CET 2017
already tried at interests list and discussed in forum
https://forum.qt.io/topic/76978/android-how-to-install-so-file/16
Qt 5.8 seems to require openssl on Android7 even if only http is used
I'm having trouble creating the .so
followed instructions from http://doc.qt.io/qt-5/opensslsupport.html
downloaded 1.0.2, extracted then opened Terminal
cd <my-path>/openssl-1.0.2k
export ANDROID_NDK_ROOT=<my-path-to>/android-ndk-r10e
CC=$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc
AR=$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar
ANDROID_DEV=$ANDROID_NDK_ROOT/platforms/android-21/arch-arm/usr
./Configure shared android-armv7
(also tried ./Configure shared android - don't know whats the difference
and what's right)
Opened Makefile and replaced two times
LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
with
LIBNAME=$$i \
then getting error from 'make build_libs'
...
Configured for android-armv7.
ekkes-MBP:openssl-1.0.2k admin$ make build_libs
making all in crypto...
/usr/bin/perl ../util/mkbuildinf.pl "gcc -I. -I.. -I../include -fPIC
-DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H
-march=armv7-a -mandroid -I/include -B/lib -O3 -fomit-frame-pointer
-Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM
-DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM"
"android-armv7" >buildinf.h
gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=armv7-a -mandroid
-I/include -B/lib -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM
-DBSAES_ASM -DGHASH_ASM -c -o cryptlib.o cryptlib.c
clang: error: unknown argument: '-mandroid'
make[1]: *** [cryptlib.o] Error 1
make: *** [build_crypto] Error 1
---
also tried using openssl-1.0.2h
same error
...
this is now a show-stopper for me
any ideas what's wrong ?
ekke
More information about the Android-development
mailing list