使用Android NDK独立工具链"配置"失败

And*_*der 5 autoconf gcc makefile configure android-ndk

我正在尝试用Android NDK独立编译器工具链构建一些东西,但是我收到了这个错误:

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
Run Code Online (Sandbox Code Playgroud)

config.log就是说:http://pastebin.com/5AFZG4CX

ANDROID_NDK_ROOT的设置如下:

afeder@ubuntu:~/android/0ad/build/workspaces$ echo $ANDROID_NDK_ROOT
/home/afeder/android/android-ndk-r7-crystax-4
Run Code Online (Sandbox Code Playgroud)

可能是什么原因或我如何调试它?谢谢.

lda*_*v1s 10

对我来说这看起来很破碎:

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
Run Code Online (Sandbox Code Playgroud)

以下是我为Android NDK构建设置环境的方法:

export CROSS_COMPILE=arm-linux-androideabi
export CC=${CROSS_COMPILE}-gcc
export CXX=${CROSS_COMPILE}-g++
Run Code Online (Sandbox Code Playgroud)

...根据需要的其他binutils ...

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
Run Code Online (Sandbox Code Playgroud)

确保并添加--sysroot=$SYSROOTCFLAGS,CPPFLAGS和/或CXXFLAGS.

现在你需要告诉spidermonkey configure您正在交叉编译:

./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi
Run Code Online (Sandbox Code Playgroud)