我尝试运行configure,告诉它使用交叉编译器( 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:我在我的PATH变量中包含了/prod/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/。
发布于 2013-06-07 16:31:47
我不确定这一点,但我会说这一行:
checking ABI=standard可能意味着configure不是为ARM架构构建的,而是为桌面架构构建的……因此,当你尝试运行它时,它试图使用Android编译器为桌面构建,但发现这个编译器不起作用。
尝试添加:
--host=arm-linux-androideabi看看它能不能用。
发布于 2013-10-06 02:58:17
您可能已经弄清楚了,但是以防其他人(像我) you...or ...comes这个问题,有几件事你应该看和/或做
https://stackoverflow.com/questions/16975345
复制相似问题