I am trying to compile OpenSSL 1.1.0(k) for Android ARMV7 on an Ubuntu machine. But I can only compile for targets android, android-armabi, android64(-aarch64).
What I was trying (in openssl-1.1.0k Folder):
export AR=~/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc-ar
export CC=~/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
export LD=~/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld
export RANLIB=~/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc-ranlib
export ANDROIDNDKVER=r11c
export ANDROIDAPI=24
export CROSS_SYSROOT=~/android-ndk-r11c/platforms/android-24/arch-arm64
export ANDROID_DEV=~/android-ndk-r11c/platforms/android-24/arch-arm64/usr/
export SYSROOT=~/android-ndk-r11c/platforms/android-24/arch-arm64/usr/
export PATH=$PATH:~/android-ndk-r11c/platforms/android-24/arch-arm64/usr/
Now when I list targets with
./Configure LIST
Armv7 is not mentioned. I expected a target named android-armv7 like it is when I enter the same commands in a openssl-1.0.2l Directory.
What am I missing ? Or how can I compile Openssl-1.1.0 in a compatible Version for armv7 Android mobiles ?
Also using NDK r18b or android-28 did not do the trick or even to use arch-arm instead of arch-arm64.
Background: OpenSSL 1.1.0 is required by the Framework I am using (Qt 5.13) now and it works on some mobiles. Like the HTC 10 (armv8 64-bit) but on LG K7 (armv7 32-bit) and an Amazon Fire Tablet it is not working.
Thanks,
I didn't try with OpenSSL 1.1.0
but I did the same thing with 1.1.1c
for Qt 5.12.4
.
I used a guide I found to compile it for android, both 32 and 64 bit.
Also the 32bit
is basically android-armeabi
so use that for architecture type.
Also you can find some more info and already compiled libs here.
I tested both 32 and 64bit libs that I compiled using the linked guide and I can say they are working.
Also make sure to use newer NDK
, based on the code you are using r11c
that's a bit too old. For Qt 5.13.0
you would need at least 19c
, so use the same to compile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With