How to upgrade libstdc++-4.4.7 on CentOS 6.10 to libstdc++-4.8.5 on CentOS 6.10
I build my c++ program on CentOS 7.5 with libstdc++-4.8.5 for c++11 using features.
Now I have to run my program on CentOS 6.10 for production.
Can I install libstdc++-4.8.5-28.el7.i686 on CentOS 6.10 if not any other posibilities ?
run a c++ program with c++11 support in older CentOS machine
Re: run a c++ program with c++11 support in older CentOS machine
Build your program on CentOS 6 if that's where you want it to run. You cannot get the newer glibc etc onto CentOS 6 and if you could, it would be way way simpler just to update to CentOS 7 in the first place.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: run a c++ program with c++11 support in older CentOS machine
Compile your source code on 6.10. You can choose from five devtoolsets offering gcc 4.8.2, 4.9.2, 5.3.1, 6.3.1, and 7.3.1, respectively. That should be enough C++11.Now I have to run my program on CentOS 6.10 for production.
Re: run a c++ program with c++11 support in older CentOS machine
The "devtoolsets" come from Software Collections (SCL).
To install (these) SCL packages, you need:
There are currently only two devtoolset versions, the older ones have been removed:
devtoolset-6 and devtoolset-7
Available versions of g++ are thus:
To get the devtoolset version, I do recommend:
That pulls in the tools to do a build.
In order to do a build:
The scl starts a command (bash) with environment, where devtoolset-7 tools are first in PATH.
The binaries ought to run in normal environment.
To install (these) SCL packages, you need:
Code: Select all
yum install centos-release-scl-rh
devtoolset-6 and devtoolset-7
Available versions of g++ are thus:
Code: Select all
compat-gcc-34-c++.x86_64 3.4.6-19.el6 base
devtoolset-6-gcc-c++.x86_64 6.3.1-3.1.el6 centos-sclo-rh
devtoolset-7-gcc-c++.x86_64 7.3.1-5.10.el6 centos-sclo-rh
gcc-c++.x86_64 4.4.7-23.el6 base
Code: Select all
yum install devtoolset-7-toolchain
In order to do a build:
Code: Select all
scl enable devtoolset-7 bash
make
exit
The binaries ought to run in normal environment.