Configure无法找到工作编译器
Configure is unable to find a working compiler
我试图运行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:我包括/prod/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/
在我的PATH
变量。
我不确定这一点,但我想说这一行:
checking ABI=standard
可能意味着configure
不是试图为ARM架构构建,而是为桌面…所以当你尝试运行它时,它会尝试使用Android编译器构建桌面,并发现该编译器不起作用。
尝试添加:
--host=arm-linux-androideabi
你可能已经弄清楚了,但是万一你…或者其他人(比如我)遇到这个问题,你应该看看和/或做一些事情
- 使用$NDKROOT/build/tools目录下的make-standalone-toolchain.sh来创建一个针对你想要开发的平台的独立工具链。它比在NDK中使用预构建的工具链更容易,并且是推荐使用工具链的方法。
- 检查config.log。它将准确地告诉您在配置中错误发生的位置。如果你看一下那个位置,你会更好地了解a)是什么导致了错误,b)如何修复它。
相关文章:
- 这个C++编译器优化(在自身的实例上调用对象自己的构造函数)的名称是什么,它是如何工作的?
- 编译"运算符删除"时C++编译器如何工作?
- 虚拟基类在内部如何工作?编译器如何解析对基方法的调用?
- 检查工作正常的 CXX 编译器:/cygdrive/c/cygwin64/bin/clang++ -- 已损坏
- 交叉编译器树莓派不完整类型,而本机编译器工作
- C++编译器 g++.exe 无法编译简单的测试程序 - 确定 CXX 编译器是否工作失败
- 切换到新编译器后,SSCANF 的工作方式有所不同
- 编译器生成的默认构造函数工作 - C++
- boost binary_oarchive 对于不同的编译器,其工作方式不同
- C++ - 我使用哪个编译器来使自动 eq = [ ](..) 语法工作?
- 可视化C++工作区和编译器.你好世界测试初学者
- g++ 编译器的内部工作原理,用于傻瓜
- 编译器指令在C++中的工作
- 比较运算符重载,为什么编译器不做工作?
- MinGW编译器为pip "cannot find vcvarsall.bat"错误后,仍然无法正常工作
- 在正向声明的情况下,编译器是如何工作的,Makefile是如何发挥作用的
- g++编译器为表达式提供<<类型错误,但在Visual Studio中工作
- 编译器问题:iostream不工作
- 名称篡改如何与使用不同编译器编译的DLL和LIB一起工作
- Configure无法找到工作编译器