C++ 11 is a C++ revision for C++ language. It adds several things with new syntaxes. Unfortunately, GCC 4.4, shipped within CentOS 6, does not support this new revision.

Many of you, if you are in the VoIP media, should found I am working porting back FreeSWITCH 1.6 with video enabled into CentOS 6. Since the release of FreeSWITCH 1.6.7, FreeSWITCH team has included into its core libyuv (the library responsible for the video) linked statically. This makes more difficult the port for CentOS 6, difficult but not impossible.

While modifying the libyuv was not an option for me. I looked for a backport of GCC 4.8 into CentOS 6. Fortunately, some guys from Princeton did it. So, here it is how to install it in your CentOS 6.

cat '[DevToolset-2]
name=RedHat DevToolset v2 $releasever - $basearch
baseurl=http://puias.princeton.edu/data/puias/DevToolset/$releasever/$basearch/
enabled=1
gpgcheck=0' > /etc/yum.repos.d/devtools2.repo

yum install devtoolset-2-gcc-4.8.1 devtoolset-2-gcc-c++-4.8.1

This will install all in /opt/rh/devtoolset-2/.

You can use it by default by using RedHat Software Collections (which it will create a root jail) or by typing ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/. Pay attention to the content of your PATH variable. After that you are done!

Good luck!

blog comments powered by Disqus