“configure” failed using Android NDK standalone toolchain

I am trying to create something using offline compilation for Android NDK, but I get this error:

Updating bundled third-party dependencies... bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}' cp output/libFColladaSD.a ../lib/libFColladaSD.a cp output/libFColladaSR.a ../lib/libFColladaSR.a Building SpiderMonkey... SpiderMonkey build options: --disable-tests loading cache ./config.cache checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking build system type... x86_64-unknown-linux-gnu checking for mawk... mawk checking for perl5... no checking for perl... /usr/bin/perl checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for c++... arm-linux-androideabi-g++ checking whether the C++ compiler (arm-linux-androideabi-g++ ) works... no configure: error: installation or configuration problem: C++ compiler cannot create executables. ERROR: SpiderMonkey build failed 

Here is what config.log says: http://pastebin.com/5AFZG4CX

My ANDROID_NDK_ROOT set as follows:

 afeder@ubuntu :~/android/0ad/build/workspaces$ echo $ANDROID_NDK_ROOT /home/afeder/android/android-ndk-r7-crystax-4 

What could be the reason or how to debug it? Thanks.

+4
source share
2 answers

For me, it looks broken:

 checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking build system type... x86_64-unknown-linux-gnu 

Here's how I set up the Android NDK build environment:

 export CROSS_COMPILE=arm-linux-androideabi export CC=${CROSS_COMPILE}-gcc export CXX=${CROSS_COMPILE}-g++ 

... other binutils as needed ...

 export NDK=/home/afeder/android/android-ndk-r7-crystax-4 export SYSROOT=$NDK/platforms/android-8/arch-arm PATH=$PATH:$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin 

Make sure and add --sysroot=$SYSROOT to CFLAGS , CPPFLAGS and / or CXXFLAGS .

Now you need to tell spidermonkey configure that you are doing cross-compilation:

 ./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi 
+10
source

It seems like he cannot find arm-linux-androideabi-g++ . Try to find it in the NDK folder and add the directory to your PATH .

Mine is here:

 ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ 
+2
source

Source: https://habr.com/ru/post/1392033/


All Articles