Installing a Modern GCC Quickly with Software Collections

From GlueXWiki
Revision as of 23:16, 2 March 2016 by Nsparks (Talk | contribs) (Created page with "[https://www.softwarecollections.org Software Collections] technology provides a simple non-intrusive way to install modern/non-default software packages on CentOS/RHEL 6. GCC...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Software Collections technology provides a simple non-intrusive way to install modern/non-default software packages on CentOS/RHEL 6. GCC is notorious for taking a long time to build from source. This guide will help you quickly install a software collection named devtoolset-3-toolchain that includes GCC-4.9.2. These instructions are based on the instructions at https://www.softwarecollections.org/en/scls/rhscl/devtoolset-3/.

First, install the CentOS software collections repository, and then install the toolchain part of the Devtoolset-3 software collection.

yum update
yum install centos-release-scl-rh
yum install devtoolset-3-toolchain

To enable the devtoolset software collection in a bash shell do the following:

scl enable devtoolset-3 bash

Alternatively, you can run a single command in the software collection like this

scl enable devtoolset-3 ‘gcc -v'