Error compiling the compiler GCC

10,102

You likely didn't clean up properly in-between tries. Do a make distclean and try again. Sorry.

Share:
10,102

Related videos on Youtube

Mr_LinDowsMac
Author by

Mr_LinDowsMac

Like: Programming, Music, Astronomy. Also like: Pizza, Soda and "Steam Hams".

Updated on June 04, 2022

Comments

  • Mr_LinDowsMac
    Mr_LinDowsMac almost 2 years

    I know, it's an irony to compile a compiler. But I need a specific version of this compiler, and the CentOS 5.x repositories have not the most recent versions of GCC.

    The version what i need is 4.3.2 but I only have 4.1.1.

    I followed this tutorial to install the gcc http://www.mjmwired.net/resources/mjm-fedora-gcc.html and I used the following parameters at 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-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --disable-multilib

    The last option --disable-multilib save me for a another error that I got in previous compile tries (after a long compiling time...)

    Also i set an enviroment variable, because in previous tries, i got errors, so i set as following:

    export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:$LD_LIBRARY_PATH
    

    That ensure the compiler to search mpfr and gmp libraries (which are needed) in that directory

    So, i execute the 'make' command.

    I though it was everything ok, because this time took more time (in my last try before setting that variable took me around 2 hours compiling)

    I used a Micro instance in Amazon Web Services, this instance only have 1 single core x86_64 processor and 613 MB of RAM, so it took about 9 HOURS to compile.

    Unfortunetly, 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?

    • thiton
      thiton over 12 years
      "I know, it's an irony to compile a compiler." The technical term is bootstrapping rather than irony.
  • Mr_LinDowsMac
    Mr_LinDowsMac over 12 years
    The "bootstrapping" worked after distclean, however, i discovered that was a waste of time, because i was using a wrong version of CentOS and i also found repositories with the packages that i need. Anyway, I prefer to say that I learned something.