How To install gcc 5.2 on centos 7.1 ? with g++,cpp ?
I compiled it once, but it need newer glibc which cannot be switched in system
How To install gcc 5.2 on centos 7.1 ? with g++,cpp ?
I compiled it once, but it need newer glibc which cannot be switched in system
you can create repo from fedora and install gcc 5.1.1, it will be better than compile it.
cat << EOF > /etc/yum.repos.d/Fedora-Core23.repo
[warning:fedora]
name=fedora
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=$basearch
enabled=1
gpgcheck=0
EOF
then install gcc
yum install gcc --enablerepo=warning:fedora
output:
========================================================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================================================
Installing:
gcc x86_64 5.1.1-4.fc23 warning:fedora 19 M
Installing for dependencies:
cpp x86_64 5.1.1-4.fc23 warning:fedora 8.5 M
glibc-devel x86_64 2.22-2.fc23 warning:fedora 909 k
glibc-headers x86_64 2.22-2.fc23 warning:fedora 497 k
isl x86_64 0.14-4.fc23 warning:fedora 490 k
kernel-headers x86_64 4.2.0-1.fc23 warning:fedora 992 k
libmpc x86_64 1.0.2-4.fc23 warning:fedora 55 k
mpfr x86_64 3.1.3-1.fc23 warning:fedora 213 k
Updating for dependencies:
binutils x86_64 2.25-13.fc23 warning:fedora 5.6 M
glibc x86_64 2.22-2.fc23 warning:fedora 3.6 M
glibc-common x86_64 2.22-2.fc23 warning:fedora 11 M
libgcc x86_64 5.1.1-4.fc23 warning:fedora 82 k
libgomp x86_64 5.1.1-4.fc23 warning:fedora 146 k
Transaction Summary
========================================================================================================================================================================================================
Install 1 Package (+7 Dependent packages)
Upgrade ( 5 Dependent packages)
Total download size: 52 M
Is this ok [y/d/N]: y
Why do you preferred on gcc 5.2?
# gcc --version
gcc (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
nano /etc/yum.repos.d/FedoraRepo.repo
[warning:fedora]
name=fedora
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=https://getfedora.org/static/34EC9CBA.txt
yum update gcc g++