编译编译器GCC时出错

Mr_*_*Mac 4 gcc centos5 makefile centos gcc4

我知道,编译编译器很讽刺.但我需要这个编译器的特定版本,而CentOS 5.x存储库没有最新版本的GCC.

我需要的版本是4.3.2但我只有4.1.1.

我按照本教程安装了gcc http://www.mjmwired.net/resources/mjm-fedora-gcc.html,我在configure(编译前)中使用了以下参数:

/root/gcc/gcc-4.3.6/configure --prefix =/opt/gcc43 --program-suffix = 43 --enable-languages = c,c ++ --enable-shared --enable-threads = posix - disable-checking --with-system-zlib --enable -__ cxa_atexit --disable-libunwind-exceptions --disable-multilib

最后一个选项--disable-multilib保存我在之前的编译尝试中得到的另一个错误(经过长时间的编译...)

另外我设置了一个环境变量,因为在以前的尝试中,我有错误,所以我设置如下:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:$LD_LIBRARY_PATH
Run Code Online (Sandbox Code Playgroud)

这可以确保编译器在该目录中搜索mpfr和gmp库(需要它们)

所以,我执行'make'命令.

我虽然一切都还好,因为这段时间花了更多时间(在我设置该变量之前的最后一次尝试花了我2个小时编译)

我在Amazon Web Services中使用了Micro实例,这个实例只有1个单核x86_64处理器和613 MB RAM,因此编译需要大约9个小时.

不幸的是,我又错了!!,现在我得到了这个:

make[2]: Entering directory `/root/gcc/build'
make[3]: Entering directory `/root/gcc/build'
rm -f stage_current
make[3]: Leaving directory `/root/gcc/build'
Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
warning: ./cc1plus-checksum.o differs
Bootstrap comparison failure!
./gcc.o differs
./varasm.o differs
./except.o differs
./i386.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/root/gcc/build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/root/gcc/build'
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

有什么建议?

Dav*_*rtz 7

您可能没有在两次尝试之间正确清理.做一个,make distclean然后再试一次.抱歉.