Enabling "Software collections". RedHat developer toolset
Asked Answered
H

2

10

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?

Hay answered 20/8, 2013 at 14:44 Comment(0)
C
10

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.

Csch answered 21/3, 2014 at 18:22 Comment(0)
E
0

Check the URL

http://preilly.me/2013/05/28/redhat-developer-toolset-1-1/

for more information, for example how to set the CC, CPP, CXX environment variables. Or check

http://people.centos.org/tru/devtools-1.1/

for the devtool-1.1 repository for CentOS.

Electrodynamics answered 22/10, 2013 at 14:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.