I know this is the irony of compiler compilation. But I need a specific version of this compiler, and in CentOS 5.x repositories not the latest versions of GCC.
The version I need is 4.3.2, but I only have 4.1.1.
I followed this guide to install gcc http://www.mjmwired.net/resources/mjm-fedora-gcc.html , and I used the following options in configure (before compiling):
/root/gcc/gcc-4.3.6/configure --prefix = / opt / gcc43 --program-suffix = 43 --enable-languages = c, C ++ --enable-shared --enable-threads = posix --disable-check --with-system-zlib --enable -__ cxa_atexit --disable-libunwind-exceptions --disable-multilib
The last option --disable-multilib save me for another error that I received in previous compilation attempts (after a long compilation time ...)
I also set the environment variable because in previous attempts I got errors, so I set the following:
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:$LD_LIBRARY_PATH
This ensures that the compiler will look for the mpfr and gmp libraries (which are needed) in this directory
So, I execute the make command.
I, although everything was in order, because this time it took more time (in my last attempt, before setting this variable, it took me about 2 hours to compile)
I used a Micro instance in Amazon Web Services, this instance has only one x86_64 single-core processor and 613 MB of RAM , so it took about 9 HOURS to compile.
Unfortunately, I got errors again !!, now I got this:
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
Any suggestions?