GCC安装错误

7
我正在尝试安装GCC 4.9.0,但在执行'./configure'和'make'时出现以下错误。
对于./configure,我得到了以下错误:
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.

然后我使用了./configure --disable-multilib,然后配置完成没有任何错误。

'make'之后,我遇到了以下错误,但我无法确定这是什么错误。

checking for suffix of object files... configure: error: in `/root/dsk/gcc-4.9.0/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/root/dsk/gcc-4.9.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/dsk/gcc-4.9.0'
make: *** [all] Error 2

please help


你尝试过遵循这个链接上的建议吗:https://gcc.gnu.org/wiki/FAQ#configure_suffix?config.log里面有什么? - Gábor Bakos
避免在GCC源代码树中构建。 - Basile Starynkevitch
即使从相对路径../configure构建后,仍然重复出现相同的错误。 - user3690763
日志文件错误;conftest.cpp:11:2:错误:#error -static-libstdc++未实现#if (GNUC < 4) || (GNUC == 4 && GNUC_MINOR < 5) | #error -static-libstdc++未实现 | #endif - user3690763
同时,conftest.c:10:25: 错误:isl/version.h:没有那个文件或目录。 - user3690763
2个回答

8

看起来您缺少gcc-multilib。

尝试使用sudo apt-get install gcc-multilib进行安装,然后再次运行./configure


6

对于Centos,您需要安装以下库:

sudo yum install glibc-devel.i686
sudo yum install libgcc.i686

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接