Issue
I would like to know how to install devtoolset on RHEL7 workstation. I found instructions for RHEL7 server which I have failed to adjust correctly for the workstation edition. I also found instructions for CentOS7 which work for CentOS7:
sudo yum install centos-release-scl
sudo yum install devtoolset-7-gcc*
scl enable devtoolset-7 bash
which gcc
gcc --version
I cannot find devtoolset in any of the repos for RHEL7 workstation i.e. using:
>yum search --enablerepo=\* devtoolset
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Warning: No matches found for: devtoolset
No matches found
>yum search --enablerepo=\* scl
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
...
scl-utils.x86_64 : Utilities for alternative packaging
scl-utils
installs the scl
tool but not the devtoolset software collection itself.
Context: I need to install gcc5 or later for template parameter support. However, I want to use the standard libstdc++ and ABI. In fact I have had later versions of gcc self-compiled for RHEL7 for many years. These however use a later version of libstdc++ and the 'new' ABI (see Forcing or preventing use of a particular minor version of libstdc++). I do not wish to do that for this case and I want to follow proper 'vendor' instructions rather than compiling from source.
Solution
This issue in this case is RedHat subscription channels. Though the subscription and software are free (provided you have an active subscription already), for some reason you have to make a 'special request' to RedHat as per:
https://access.redhat.com/solutions/472793
You can automate this by visiting:
https://www.redhat.com/wapps/try/RHSCL
(when logged into the support portal). This should automatically be approved after which you can attach a new subscription. Identify the pool id using:
subscription-manager list --available --all
To find the pool id:
Subscription Name: Software Collections and Developer Toolset
Provides: Red Hat Developer Tools (for RHEL Server)
Red Hat Developer Tools Beta (for RHEL Workstation)
Red Hat Software Collections Beta (for RHEL Server)
Red Hat Software Collections Beta (for RHEL Workstation)
Red Hat Software Collections (for RHEL Server)
Red Hat Developer Tools Beta (for RHEL Server)
Red Hat Developer Toolset (for RHEL Workstation)
Red Hat Software Collections Beta (for RHEL Client)
Red Hat Software Collections (for RHEL Workstation)
Red Hat Developer Toolset (for RHEL Server)
Red Hat Developer Tools (for RHEL Workstation)
Red Hat Software Collections (for RHEL Client)
SKU: foobar
Contract: 1234 Pool ID: XXXXXXXXXX
Then attach this and enable the newly available repos:
>subscription-manager attach --pool=XXXXXXXXXXXXXXXXXXXX
Successfully attached a subscription for: Software Collections and Developer Toolset
>subscription-manager repos --enable rhel-workstation-rhscl-7-rpms
Repository 'rhel-workstation-rhscl-7-rpms' is enabled for this system.
>subscription-manager repos --enable rhel-7-workstation-devtools-rpms
Repository 'rhel-7-workstation-devtools-rpms' is enabled for this system.
You can now install freely:
>yum update -y
>yum install -y devtoolset-7-gcc-c++
Quite why they make you jump through so many hoops is explained by RedHat as follows:
-If you have a 2013 RHEL SKU with Standard or Premium service level, there should be no action on your part, and your subscription should have full access to RHSCL.
-If you have a 2010 or older RHEL SKU with Standard or Premium service level, you should contact Red Hat Customer Service to request the RHSCL SKU (and all related content) added to your account.
NOTE: Developer Toolset is now included as part of Red Hat Software Collections. This change was made on May 29, 2014.
As you had Red Hat Enterprise Linux Workstation, Standard subscription which is older RHEL SKU with Standard service level, you had to initiate a special request for it
Answered By - Bruce Adams Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.