我正在尝试运行配置,告诉它使用交叉编译器(Android NDK 提供的那个),但它找不到。我做了以下操作(注意,Android NDK 根目录位于/prod/ndk/
):
(在我要编译的文件夹内,位于/prod/workspace/jni/gmp/
):
./configure \
--host=arm-linux-androideabi \
CC=arm-linux-androideabi-gcc \
LD=arm-linux-androideabi-ld \
CPPFLAGS="-I/prod/ndk/platforms/android-8/usr/include/" \
CFLAGS="-nostdlib" \
LDFLAGS="-Wl,-rpath-link=/prod/ndk/platforms/android-8/arch-arm/usr/lib/
-L/prod/ndk/platforms/android-8/arch-arm/usr/lib" \
LIBS="-lc"
但我收到以下错误:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-androideabi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-androideabi-strip... arm-linux-androideabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=standard
checking whether arm-linux-androideabi-gcc is gcc... yes
checking compiler arm-linux-androideabi-gcc -nostdlib
-I/prod/ndk/platforms/android-8/usr/include/... no, double -> ulong conversion
configure: error: could not find a working compiler, see config.log for
details
有什么帮助吗?PS:我包含/prod/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/
在我的PATH
变量中。