gpt4 book ai didi

c++ - C 编译器无法创建可执行文件,OpenSolaris Erlang/OTP ./configure 错误

转载 作者:搜寻专家 更新时间:2023-10-31 01:56:35 24 4
gpt4 key购买 nike

在 OpenSolaris 上为 OTP14B03 运行 ./configure 脚本并获得以下输出

Ignoring the --cache-file argument since it can cause the system to be erroneously configuredDisabling cachingchecking build system type... i386-pc-solaris2.11checking host system type... i386-pc-solaris2.11checking for gcc... gccchecking for C compiler default output file name... configure: error: C compiler cannot create executablesSee `config.log' for more details.

我在 $PATH 中安装了 gcc4,安装了 libgcc,但仍然出现此错误。在网上搜索让我尝试添加 /usr/ccs/bin 以找到 ld.so 文件(可能与 C++ 编译器或链接器有关)。有人能帮帮我吗

编辑:配置/日志文件包含以下内容:

This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.configure:2041: $? = 0configure:2043: gcc -v &5Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/specsConfigured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77Thread model: posixgcc version 3.4.6configure:2046: $? = 0configure:2048: gcc -V &5gcc: `-V' option must have argumentconfigure:2051: $? = 1configure:2074: checking for C compiler default output file nameconfigure:2077: gcc    conftest.c  >&5ld: fatal: file values-Xa.o: open failed: No such file or directoryld: fatal: file processing errors. No output written to a.outcollect2: ld returned 1 exit statusconfigure:2080: $? = 1configure: failed program was:| /* confdefs.h.  */| | #define PACKAGE_NAME ""| #define PACKAGE_TARNAME ""| #define PACKAGE_VERSION ""| #define PACKAGE_STRING ""| #define PACKAGE_BUGREPORT ""| /* end confdefs.h.  */| | int| main ()| {| |   ;|   return 0;| }configure:2118: error: C compiler cannot create executablesSee `config.log' for more details.

最佳答案

您的链接器无法找到 values-Xa.o 目标文件。

根据 this FAQ ,这意味着您的系统缺少编译器所需的包,或者安装了所需的包但您的默认库路径没有反射(reflect)它。

作为快速检查,您可以尝试将 /usr/ccs/lib 添加到库路径:

./configure LDFLAGS="-L/usr/ccs/lib"

关于c++ - C 编译器无法创建可执行文件,OpenSolaris Erlang/OTP ./configure 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6889024/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com