由于环境不能连外网,不能通过yum安装,所以我采用rpm包安装的方式。
所用系统为CentOS 6.3,64位。
所需安装包
gcc-4.47-17.e16.x86_64.rpm
cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
mpfr-2.4.1-6.e16.x86_64.rpm
ppl-0.10.2-11.el6.x86_64.rpm
cpp-4.4.7-17.el6.x86_64.rpm
libgcc-4.4.7-17.el6.x86_64.rpm
libgomp-4.4.7-17.el6.x86_64.rpm
gcc4.4.7下载地址: https://centos.pkgs.org/6/centos-x86_64/gcc-4.4.7-17.el6.x86_64.rpm.html
[root@localhostgcc]# rpm -ivh gcc-4.4.7-17.el6.x86_64.rpm
warning:gcc-4.4.7-17.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de:NOKEY
error:Failed dependencies:
cloog-ppl >= 0.15 is needed bygcc-4.4.7-17.el6.x86_64
cpp = 4.4.7-17.el6 is needed bygcc-4.4.7-17.el6.x86_64
libgcc >= 4.4.7-17.el6 is needed bygcc-4.4.7-17.el6.x86_64
libgomp = 4.4.7-17.el6 is needed bygcc-4.4.7-17.el6.x86_64
安装cloog-ppl
cloog-ppl 下载地址: https://centos.pkgs.org/6/centos-x86_64/cloog-ppl-0.15.7-1.2.el6.x86_64.rpm.html
安装过程中报错:
[root@localhost gcc]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
libppl.so.7()(64bit)is needed by cloog-ppl-0.15.7-1.2.el6.x86_64
libppl_c.so.2()(64bit)is needed by cloog-ppl-0.15.7-1.2.el6.x86_64
解决依赖包,需要安装mpfr和ppl
mpfr : https://centos.pkgs.org/6/centos-x86_64/mpfr-2.4.1-6.el6.x86_64.rpm.html
ppl: http://vault.centos.org/6.3/os/x86_64/Packages/
安装ppl时报错:
[root@localhost gcc]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
warning: ppl-0.10.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:ppl ########################################### [100%]
/sbin/ldconfig: /usr/lib64/libstdc++.so.6 is not a symbolic link
解决办法:
[root@localhost gcc]# ln -s /usr/lib64/libstdc++.so.6/usr/lib64/libstdc++.so.6
[root@localhost gcc]# rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
warning: ppl-0.10.2-11.el6.x86_64.rpm: Header V3 RSA/SHA256Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
packageppl-0.10.2-11.el6.x86_64 is already installe
[root@localhost gcc]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
warning: cloog-ppl-0.15.7-1.2.el6.x86_64.rpm: Header V3 RSA/SHA256Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
packagecloog-ppl-0.15.7-1.2.el6.x86_64 is already installed
安装cpp
cpp4.4.7: ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/
安装libgcc
下载地址: ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/
[root@localhost gcc]# rpm -Uvh libgcc-4.4.7-17.el6.x86_64.rpm
warning: libgcc-4.4.7-17.el6.x86_64.rpm: Header V3 RSA/SHA1Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
packagelibgcc-4.4.7-17.el6.x86_64 is already installed
安装libgomp
下载地址: ftp://mirror.switch.ch/mirror/centos/6/os/x86_64/Packages/
[root@localhost gcc]# rpm -Uvh libgomp-4.4.7-17.el6.x86_64.rpm
warning: libgomp-4.4.7-17.el6.x86_64.rpm: Header V3 RSA/SHA1Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
packagelibgomp-4.4.7-17.el6.x86_64 is already installed
全部安装完成后,再次执行 rpm-ivh gcc-4.4.7-17.el6.x86_64.rpm
[root@localhostgcc]# rpm -ivh gcc-4.4.7-17.el6.x86_64.rpm
warning:gcc-4.4.7-17.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de:NOKEY
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
安装完成后通过gcc -v校验版本:
[root@localhostgcc]# gcc -v
Usingbuilt-in specs.
Target:x86_64-redhat-linux
Configuredwith: ../configure --prefix=/usr --mandir=/usr/share/man--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla--enable-bootstrap --enable-shared --enable-threads=posix--enable-checking=release --with-system-zlib --enable-__cxa_atexit--disable-libunwind-exceptions --enable-gnu-unique-object--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre--enable-libgcj-multifile --enable-java-maintainer-mode--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686--build=x86_64-redhat-linux
Threadmodel: posix
gccversion 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)