From ade7b687d821211cd9e1a654e4b06e7097092833 Mon Sep 17 00:00:00 2001 From: JJ Date: Wed, 8 Jan 2014 03:43:51 -0800 Subject: [PATCH] Created GCC <4.6 (markdown) --- GCC--4.6.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 GCC--4.6.md diff --git a/GCC--4.6.md b/GCC--4.6.md new file mode 100644 index 0000000..4ce0cae --- /dev/null +++ b/GCC--4.6.md @@ -0,0 +1,23 @@ +CentOS Enterprise (and perhaps other *nix distros) currently defaults to GCC 4.4.7. EQEmu makes use of nullptr which wasn't introduced until GCC 4.6. Fortunately, there is a way to install GCC 4.7.2 as either an add-on installation or as a replacement without having to cross-platform compile or making any major changes to your OS installation. + +*** + +First, get and install devtools 1.1 into your yum repo: +``` +wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -O /etc/yum.repos.d/devtools-1.1.repo +yum install devtoolset-1.1 +``` + +You can verify you have a new working compiler, you can run this to open a new session with the 4.7.2 compiler enabled (one-time method): +``` +scl enable devtoolset-1.1 bash +gcc -v +exit +``` + +*** + +The wonderful thing about CMake is that now you can configure only EQEmu to use the new GCC while the rest of your system still recognizes the original files. Run CMake in interactive mode and change the locations (i.e. /usr/bin/gcc changes to /opt/centos/devtoolset-1.1/root/usr/bin/gcc). When CMake goes finishes configure, it will recognize the change and go back through configuration to ensure all locations are correct. + +Enjoy! +