0

I need to upgrade my OpenSSL library to openssl-1.0.0o and I want to know if this version has android support. I am following the steps in this thread, while trying to build it in cygwin, but I get an error on 'make all':

/cygdrive/d/ndk+openssl/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/pr
ebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/cygdrive/d/ndk+openssl
/android-ndk-r10d/platforms/android-19/arch-arm/ -I. -I.. -I../include  -D_WINDL
L -DOPENSSL_PIC -DOPENSSL_THREADS  -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -DL_ENDI
AN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPEN
SSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_A
SM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM   -c -o cryptlib.o cryptlib.c
/cygdrive/d/ndk+openssl/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/pr
ebuilt/linux-x86/bin/arm-linux-androideabi-gcc: /cygdrive/d/ndk+openssl/android-
ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/arm-linux-a
ndroideabi-gcc: cannot execute binary file
<builtin>: recipe for target 'cryptlib.o' failed
make[1]: *** [cryptlib.o] Error 126
make[1]: Leaving directory '/cygdrive/d/ndk+openssl/openssl-1.0.0o/crypto'
Makefile:247: recipe for target 'build_crypto' failed
make: *** [build_crypto] Error 1

Any help would be appreciated. Thank you.

Community
  • 1
  • 1
  • Is building on-device an option for you? If so, there's a number of apps that would help, and there's even a port of openssl. – MonaLisaOverdrive Dec 20 '14 at 18:48
  • 1.0.0 and 1.0.1 are binary compatible. You should use 1.0.1 instead. You might even grab a prebuilt OpenSSL for Android from a Github, like [this one](https://github.com/noloader?tab=repositories). – jww Dec 21 '14 at 02:03
  • If you want to build OpenSSL for Android following the project's instructions, see [OpenSSL and Android](http://wiki.openssl.org/index.php/Android). It assumes you are using Android's toolchain. – jww Dec 21 '14 at 02:07

1 Answers1

0

Your build environment is broken: cross-compiler is not working at all on your host machine. You can't build any source with that compiler on that host. You should build android and related libs in correct build environment. In short words you should use some linux (x64?) host, not cygwin.

Vladimir Kunschikov
  • 1,735
  • 1
  • 16
  • 16