Wednesday, 15 June 2011

Openssl for Android x86_64 and mips64 -



Openssl for Android x86_64 and mips64 -

i have built openssl 5/7 of android-21 (android-l) architectures: armeabi, armeabi-v7a, arm64, mips, x86. unable build x86_64 , mips64.

what i'm doing... x86 - working

the next working script x86, using toolchain created make-standalone-toolchain:

export android_ndk_root=/users/jacsteve/dev/android/ndk export android_api=android-21 export android_arch=arch-x86 export android_eabi=i686-linux-android-4.9 export android_sysroot=$android_ndk_root/platforms/$android_api/arch-x86 export android_toolchain=/tmp/toolchain/x86 export android_dev=$android_sysroot/usr export system=android export arch=x86 export cross_compile=i686-linux-android- export cflags="--sysroot=$android_sysroot" export cppflags="--sysroot=$android_sysroot" export cxxflags="--sysroot=$android_sysroot" ./configure android-x86 shared no-asm -no-ssl2 -no-ssl3 -no-comp -no-hw --cross-compile-prefix=$cross_compile --openssldir=/tmp/ssl/x86 create depend create make install

this works fine, , leaves me libssl.so , libcrypto.so in /tmp/ssl/x86

x86_64 - fails

however, x86_64 fails. here's script:

export android_ndk_root=/users/jacsteve/dev/android/ndk export android_api=android-21 export android_arch=arch-x86_64 export android_eabi=x86_64-linux-android-4.9 export android_sysroot=$android_ndk_root/platforms/$android_api/arch-x86_64 export android_toolchain=/tmp/toolchain/x86_64 export android_dev=$android_sysroot/usr export system=android export arch=x86_64 export cross_compile=x86_64-linux-android- export cflags="--sysroot=$android_sysroot" export cppflags="--sysroot=$android_sysroot" export cxxflags="--sysroot=$android_sysroot" ./configure android-x86 shared no-asm -m64 -no-ssl2 -no-ssl3 -no-comp -no-hw --cross-compile-prefix=$cross_compile --openssldir=/tmp/ssl/x86_64 create depend create make install the errors... x86_64

i load of error messages make phone call this:

/private/tmp/toolchain/x86_64/bin/../lib/gcc/x86_64-linux-android/4.9/../../../../x86_64-linux-android/bin/ld: error: libcrypto.a(cryptlib.o): incompatible target /private/tmp/toolchain/x86_64/bin/../lib/gcc/x86_64-linux-android/4.9/../../../../x86_64-linux-android/bin/ld: error: libcrypto.a(mem.o): incompatible target ... collect2: error: ld returned 1 exit status

it looks me x86_64-linux-android-gcc compiling fine, when linking stage, x86_64-linux-android-ld can't read compiled object files.

mips64

using similar setup mips64 (with ./configure android-mips ...) next error, looks similar issue mips64-linux-android-ld beingness unable read object files:

/users/jacsteve/dev/android/ndk/platforms/android-21/arch-mips64/usr/lib/libdl.so: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status

does know how build x86_64 , mips64 architectures successfully?

solved!

instead of

./configure android-x86 ...

i used

./configure linux-generic64 ...

i used linux-generic32 32bit architectures.

android android-ndk openssl x86-64 android-5.0-lollipop

No comments:

Post a Comment