Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling "Software collections". RedHat developer toolset

I just found out that RedHat provides this "Developer toolset" which allows me to install (and of course use) the most up-to-date gcc-4.7.2. I use it on Centos, but the process is the same.

Once installed, you can start a new bash session with this toolset enabled by issuing:

scl enable devtoolset-1.1 bash

That works all right. Now, could I somehow add this to my bashrc since this actually starts a new bash session? Or should I better place it inside my makefiles to avoid starting a new bash session. Would there be a way to issue this within a makefile?

like image 902
Alejandro Avatar asked Aug 20 '13 14:08

Alejandro


People also ask

What is Red Hat Software Collection?

Red Hat Software Collections is a prescribed set of content intended for use in Red Hat Enterprise Linux production environments.

What is collection software?

Software collections or SCL - is a collection of 'add-on" software packages. Software Collections give you the power to build, install, and use multiple versions of software on the same system, without affecting system-side installed packages.


1 Answers

I wrote a blog post on this subject because it started to come up a lot. If you would like to read it, you can find it here: http://developerblog.redhat.com/2014/03/19/permanently-enable-a-software-collection/

tl;dr

you can source /opt/rh/devtoolset-1.1/enable in your .bashrc or, for somewhat better solution you can include:

source /opt/rh/devtoolset-1.1/enable
export X_SCLS="`scl enable devtoolset-1.1 'echo $X_SCLS'`"

But definitely check out the post for more info.

like image 63
1angdon Avatar answered Sep 30 '22 04:09

1angdon