Closed qing310820 closed 4 years ago
I assume it might be that there are additional config settings needed to build on Android. I see a few options presented here: https://stackoverflow.com/questions/16795583/android-error-cannot-open-crtbegin-dynamic-o-no-such-file-or-directory
@qing310820 is this still and issue? Do you have the full command line you are using to try and build?
Hi I am able to build and run on android using android-ndk-r17c with the following setup, does this help you ?
export BUILD_TOOLCHAIN=/PATH_TO_TOOLCHAIN/toolchain-r17/arm64
export BUILD_ARC=aarch64-linux-android
export PATH=${BUILD_TOOLCHAIN}/bin:$PATH
export CC="${BUILD_ARC}-gcc --sysroot=${BUILD_TOOLCHAIN}/sysroot"
export CXX="${BUILD_ARC}-g++ --sysroot=${BUILD_TOOLCHAIN}/sysroot"
export LDFLAGS=-pie
export EXTRA_CFLAGS=-D__ANDROID_API__=21
./configure --host=${BUILD_ARC}
make
Alternatively can build with cmake using the following.
mkdir arm64
cd arm64
cmake -DCMAKE_TOOLCHAIN_FILE=/PATH_TO_NDK/android-ndk-r17c/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a ..
make
configure:2719: error: in `/home/liuping/wxq/forobjdump/libsrtp-master': configure:2721: error: C compiler cannot create executables configure: exit 77