Compile OpenSSL 1.1.0 for Android -


i'm trying compile openssl-1.1.0 on android cygwin follow guidance:

compiling latest openssl android

but it's failed, error :

crypto/aes/aes_ecb.c:10:20: fatal error: assert.h: no such file or directory  #include <assert.h> 

i'm using android-ndk-r12b, win10, cygwin 64 bit.

this pre-config before compiling:

export ndk=~/android-ndk-r12b $ndk/build/tools/make-standalone-toolchain.sh --platform=android-21 --toolchain=arm-linux-androideabi-4.9 --install-dir=`pwd`/android-toolchain-arm export toolchain_path=`pwd`/android-toolchain-arm/bin export tool=arm-linux-androideabi export ndk_toolchain_basename=${toolchain_path}/${tool} export cc=$ndk_toolchain_basename-gcc export cxx=$ndk_toolchain_basename-g++ export link=${cxx} export ld=$ndk_toolchain_basename-ld export ar=$ndk_toolchain_basename-ar export ranlib=$ndk_toolchain_basename-ranlib export strip=$ndk_toolchain_basename-strip export arch_flags="-mthumb" export arch_link= export cppflags=" ${arch_flags} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 " export cxxflags=" ${arch_flags} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions " export cflags=" ${arch_flags} -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 " export ldflags=" ${arch_link} " ./configure android path=$toolchain_path:$path make 

please tell me i'm wrong

edit:

follow jww's suggestion, try https://wiki.openssl.org/index.php/android

i changed config in setenv-android.sh into:

-_android_ndk="android-ndk-r12b" -_android_eabi="arm-linux-androideabi-4.9" -_android_api="android-21" 

to generate valid toolchains, add "windows-x86_64" host in "linux-x86_64" "linux-x86" "darwin-x86_64" "darwin-x86" it's:

for host in "linux-x86_64" "linux-x86" "darwin-x86_64" "darwin-x86" "windows-x86_64" .... done 

+build openssl-1.1.0:

error:

$ perl -pi -e 's/install: install_docs install_sw/install: install_docs install_sw/g' makefile.org can't open makefile.org: no such file or directory. 

edit 2:

i follow wiki update jww , runs smoothly until command:

arm-linux-androideabi-gcc -i /usr/local/ssl/include my_prog.c -o my_prog.exe -l /usr/local/ssl/lib -lssl -lcrypto 

if use $android_toochain/arm-linux-androideabi-gcc -i /usr/local/ssl/include my_prog.c -o my_prog.exe -l /usr/local/ssl/lib -lssl -lcrypto , doesn't understand -i , my_prog.c

i want build openssl-1.1.0 android don't know how fix it. please help


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -