Question about Upgrade from GCC 4.1 to 4.8 on RHEL 5.9

Latest response

We recently purchased and added the Red Hat Developer Toolset 2 channel to one of our RHEL 5.9 boxes so that we could upgrade GCC 4.1 to 4.8. We ran yum install devtoolset-2-2.0-19.el5.noarch to upgrade. Upon completion, GCC 4.1 was still located under /usr/bin/gcc and GCC 4.8 appears to have been installed to /opt/rh/devtoolset-2/root/usr/bin/gcc. This means that GCC 4.1 is still in the path and is the one running which isn't what we had anticipated. Trying to figure out how the upgrade is supposed to work.

Should we have...
<1> Uninstalled all the GCC 4.1 packages prior to installing GCC 4.8?
<2> Installed as we did but then create symbolic links or copy the GCC binaries to /usr/bin/?
<3> Do the upgrade some other way?

Looking for some guidance on the proper way to complete the upgrade and any other relevant guidance.

Cheers
Chad

Responses

Chad - check out the official docs for the Developer Toolset - you don't actually upgrade the version of GCC, you install a separate version of GCC to sit side-by-side with the base RHEL GCC version.

https://access.redhat.com/site/documentation/en-US/Red_Hat_Developer_Toolset/

Thanks for pointing me to the documentation Andrius. It's actually very good and provided additional insights. Appears using the scl enable devtoolset-2 prefix and single quotes around the command is how 4.8 is invoked.

Chad

One additional nugget which might help those who come after me. I added the contents of /opt/rh/devtoolset-2/enable to /etc/bashrc to ensure all users were pointed to the new developer toolset 2 automatically.

Chad