Hi,
I have not yet solved the issue, but I done some little steps along a way that sounds good, so I give you a little update.
OpenSSL website provides the download of two different library versions: rel. 1.1.0 and rel. 1.0.2k
To build library rel. 1.1.0 is required Perl rel. 5.10 (or above)
To build library rel. 1.0.2k is required Perl rel. 5.8.8
The Windows tools to build for Android platform contain, by default, Perl rel. 5.8.8 and I am not yet able to upgrade to rel. 5.10.
So for this reason, at the moment I have tried to build OpenSSL rel. 1.0.2k instead of rel. 1.1.0
To build OpenSSL library, I have done these steps on my PC:
- downloaded file openssl-1.0.2k.tar.gz from Download section of https://www.openssl.org/
- unzipped openssl-1.0.2k.tar.gz to get openssl-1.0.2k.tar
- unzipped openssl-1.0.2k.tar to get openssl-1.0.2k source files
- downloaded MinGW setup from https://sourceforge.net/projects/mingw/files/latest/download
- installed MinGW (see attached Image01 and Image02)
- installed mingw-developer-tool from MinGW Installation Manager
- installed Android NDK (downloaded file android-ndk-r13b-windows-x86_64 from Android website)
- copied NDK directory into \MinGW\msys\1.0
- copied OpenSSL source files into \MinGW\msys\1.0\home\<USER>
- executed (double click) msys batch file from Windows folder \MinGW\msys\1.0
- from MinGW shell, executed the command
Configure android
to create the make file for Android platform (see attached Image03)
When command execution is completed, you can see that Makefile file in folder \MinGW\msys\1.0\home\<USER>\openssl-1.0.2k has been updated - edit Makefile file to change
Code: Select all
CC= /Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc
CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I$(ANDROID_DEV)/include -B$(ANDROID_DEV)/lib -O3-fomit-frame-pointer -Wall
AR= /Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ar $(ARFLAGS) r
with
Code: Select all
CC= /ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc
CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I$(ANDROID_DEV)/include -B$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall -I/ndk/platforms/android-24/arch-arm/usr/include
AR= /ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ar $(ARFLAGS) r
- from MinGW sheel, folder C:\MinGW\msys\1.0\home\<USER>\openssl-1.0.2k, executed the command
makefile
The
makefile command is able to compile OpenSSL source files with success, but fails the link phase