在OpenSolaris上运行OTP14B03的./configure
脚本并获得以下输出
Ignoring the --cache-file argument since it can cause the system to be erroneously configured Disabling caching checking build system type... i386-pc-solaris2.11 checking host system type... i386-pc-solaris2.11 checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details.
我安装了gcc4,在$ PATH中安装了libgcc,但仍然收到此错误。在网上搜索让我尝试添加/usr/ccs/bin
以找到ld.so
文件(可能与C ++编译器或链接器有关)。有人可以帮助我吗
编辑: 配置/日志文件包含:
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:2041: $? = 0 configure:2043: gcc -v &5 Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77 Thread model: posix gcc version 3.4.6 configure:2046: $? = 0 configure:2048: gcc -V &5 gcc: `-V' option must have argument configure:2051: $? = 1 configure:2074: checking for C compiler default output file name configure:2077: gcc conftest.c >&5 ld: fatal: file values-Xa.o: open failed: No such file or directory ld: fatal: file processing errors. No output written to a.out collect2: ld returned 1 exit status configure:2080: $? = 1 configure: 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 executables See `config.log' for more details.
答案 0 :(得分:3)
您的链接器找不到values-Xa.o
目标文件。
根据this FAQ,它或者意味着您的系统缺少编译器所需的包,或者安装了所需的包但是您的默认库路径没有反映它。
作为快速检查,您可以尝试将/usr/ccs/lib
添加到库路径:
./configure LDFLAGS="-L/usr/ccs/lib"