Scientific Linux

How to compile gcc-4.7.2

The general idea is compile gcc to be installed in /usr/local/gnu/gcc directory under the version directory. (e.g., /usr/local/gnu/gcc/4.7.2)

Download the sources from and uncompress it on a temporary directory (e.g., /usr/local/gnu/tmp)

Change directory to the previous extracted files (gcc-4.7.2) and execute the script to download the dependencies:

[ gcc-4.7.2]# ./contrib/download_prerequisites

Go back the the temporary directory and make a directory for building gcc (e.g., gcc-build)

[ gnu/tmp]# mkdir gcc-build

Make sure that glibc-devel is installed:

# yum -y install glibc-devel
# yum -y install glibc-devel.i686

Change directory to gcc-build and execute the configuration script:

[ gcc-4.7.2]# ./configure --prefix=/usr/local/gnu/gcc/4.7.2 --build=x86_64-redhat-linux --enable-languages=c,c++,fortran

Execute make and make install

Related information:

scientific_linux.txt · Última modificación: 2012/10/05 16:11 por abuss
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki