I previously asked essentially the same question (different NDK) here and thought I correctly built openssl but once I got around to trying to link it to my app I discovered I didn't build it correctly.
If I bridge of the answer from @AlexCohn here I start with the
setenv_android.shscript.I modify the script to set
THE_ARCH=arm64-v8atrying to target 64bit android architecture.When I run the script there some things it fails to find:
ERROR: Failed to find Android cpp. Please edit this script. ERROR: Failed to find Android gcc. Please edit this script. ERROR: Failed to find Android g++. Please edit this script. ERROR: AOSP_STL_INC is not valid. Please edit this script. ERROR: AOSP_STL_LIB is not valid. Please edit this script. ANDROID_NDK_ROOT: /Users/spartygw/android-ndk-r19/ AOSP_TOOLCHAIN_PATH: /Users/spartygw/android-ndk-r19//toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin AOSP_ABI: arm64-v8a AOSP_API: android-21 AOSP_SYSROOT: /Users/spartygw/android-ndk-r19//platforms/android-21/arch-arm64 AOSP_FLAGS: -funwind-tables -fexceptions -frtti AOSP_STL_INC: /Users/spartygw/android-ndk-r19//sources/cxx-stl/stlport/stlport/ AOSP_STL_LIB: /Users/spartygw/android-ndk-r19//sources/cxx-stl/stlport/libs/arm64-v8a/libstlport_shared.soWhen I look in
/Users/spartygw/android-ndk-r19//toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/binthere is noaarch64-linux-android-cppor-gccor-g++just as the script output says:$ ls -1 ~/android-ndk-r19//toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin ./ ../ aarch64-linux-android-addr2line aarch64-linux-android-ar aarch64-linux-android-as aarch64-linux-android-c++filt aarch64-linux-android-dwp aarch64-linux-android-elfedit aarch64-linux-android-gprof aarch64-linux-android-ld aarch64-linux-android-ld.bfd aarch64-linux-android-ld.gold aarch64-linux-android-nm aarch64-linux-android-objcopy aarch64-linux-android-objdump aarch64-linux-android-ranlib aarch64-linux-android-readelf aarch64-linux-android-size aarch64-linux-android-strings aarch64-linux-android-strip
This is where I think I got myself into trouble last time. I started hacking the script to get something that seemed to work and I'm sure what I did was wrong now.
I really don't understand the process so I'm hoping for help. Is anyone building arm64-v8a versions of OpenSLL successfully?