7

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,

aqm
  • 142
  • 2
  • 17

1 Answers1

1

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.

Megued
  • 120
  • 9
  • Thanks for your response. I tried to use the android-armeabi build for Android-ARMV7 but still on some Smartphones like the LG K7 it wont load – aqm Aug 07 '19 at 14:48
  • "1.1.x can be used ONLY with 5.12.4 and 5.13.0. Be aware that on Android 5 (API 21) these libs names are clasing with the system SSL libs which are using OpenSSL 1.0, this means your Qt app will fail to use OpenSSL 1.1 as the system ones are already loaded by the OS" as mentioned [here](https://github.com/KDAB/android_openssl) – Megued Aug 07 '19 at 16:16