Wednesday 26 June 2013

Manully installing GCC (anyversion) on CentOS

I came across facing a problem which was the older version of GCC installed in centos.

After searching alot, I realized that its a quite a hassle to mannually install all the dependencies as well as a newer version of GCC/GCC-C++. Fortunately, I came across this post at Joe's Blog

This guy has done an amazing job by creating a script for all the installation stuff. The script is easy to understand.
NOTE: Some of the download URLs might be broken as of new releases available. DO NOT PANIC.
Just go to those links (probably one/two directories ahead) and get the link to the latest release of that software and replace that link in the script file.

All credits to the original author of the script. Visit above link and download that.

In case you are unable to open up the provided link, I am pasting the script here too.

(No copyright infringement intended, all credit goes to the author of this script. I am just sharing.)

download link

======================================================================
Notes & Edits:

errorgnu/stubs-32.h: No such file or directory
quick fix: $ yum install glibc-devel.i686    (on CenOS 6.3)
see original post here

error:  ‘YYSTYPE’ was not declared in this scope
error details:
/tmp/gcc-4.8.1/src/binutils-2.22/gold/script-c.h:221:30: error: expression list treated as compound expression in initializer [-fpermissive]
 yylex(YYSTYPE*, void* closure);
                              ^
make[4]: *** [expression.o] Error 1
make[4]: Leaving directory `/tmp/gcc-4.8.1/bld/binutils-2.22/gold'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/gcc-4.8.1/bld/binutils-2.22/gold'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/gcc-4.8.1/bld/binutils-2.22/gold'
make[1]: *** [all-gold] Error 2
make[1]: Leaving directory `/tmp/gcc-4.8.1/bld/binutils-2.22'
make: *** [all] Error 2
STATUS = 2
quick fix: $ yum install bison

No comments:

Post a Comment