Forum Stats

  • 3,751,319 Users
  • 2,250,340 Discussions
  • 7,867,382 Comments

Discussions

How to get gcc version >= 8 installed

testuser4992
testuser4992 Member Posts: 4
edited Jun 9, 2020 9:43PM in Oracle Linux

# cat /etc/oracle-release

Oracle Linux Server release 7.6

# gcc --version

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39.0.3)

# yum install gcc

Loaded plugins: langpacks, ulninfo

Package gcc-4.8.5-39.0.3.el7.x86_64 already installed and latest version

This is a very old version. How to get a version >= 8 installed? As far as I understand I would have to install software collection devtoolset-8, not clear how to get it done.

Dude!

Best Answer

Answers

  • Dude!
    Dude! Member Posts: 22,826 Blue Diamond
    edited Jun 5, 2020 4:01PM Accepted Answer

    Have you seen https://docs.oracle.com/en/operating-systems/oracle-linux/scl-user/ol-scl-relnotes.html#ol-scl-about

    What makes the info somewhat difficult I guess is to understand what you need to specify as "sw_col". Anyway, here's an example:

    [[email protected] ~]# yum -y install oracle-softwarecollection-release-el7

    [[email protected] ~]# yum install devtoolset-9

    [[email protected] ~]# scl enable devtoolset-9 -- gcc --version

    gcc (GCC) 9.1.1 20190605 (Red Hat 9.1.1-2)

    Copyright (C) 2019 Free Software Foundation, Inc.

    This is free software; see the source for copying conditions.  There is NO

    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    [[email protected] ~]# yum info devtoolset-9

    Loaded plugins: ulninfo

    Installed Packages

    Name        : devtoolset-9

    Arch        : x86_64

    Version     : 9.1

    Release     : 0.el7

    Size        : 2.2 k

    Repo        : installed

    From repo   : ol7_software_collections

    Summary     : Package that installs devtoolset-9

    License     : GPLv2+

    Description : This is the main package for devtoolset-9 Software Collection.

    Not really helpful...

    If you want gcc8, try devoolset-8 instead.

    The following shows a bit more.

    [[email protected] ~]# yum list available devtoolset-\*

    It can also help to see what software repositories are available:

    https://yum.oracle.com/oracle-linux-7.html

    And https://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/x86_64/index.html

    .. to see what's inside.

    Haven't checked it for some time though, but Oracle has been adding many more repositories.

    I wonder how normal people find out about these things.

    testuser4992
  • testuser4992
    testuser4992 Member Posts: 4
    edited Jun 5, 2020 4:17PM
    Have you seen https://docs.oracle.com/en/operating-systems/oracle-linux/scl-user/ol-scl-relnotes.html#ol-scl-aboutWhat makes the info somewhat difficult I guess is to understand what you need to specify as "sw_col". Anyway, here's an example:[[email protected] ~]# yum -y install oracle-softwarecollection-release-el7...I wonder how normal people find out about these things. 

    Yes, I have seen that link, but didn't know I should run yum -y install oracle-softwarecollection-release-el7
    Finally it works

    # scl enable devtoolset-9 'gcc -v'

    gcc version 9.1.1 20190605 (Red Hat 9.1.1-2) (GCC)

    Thank you bro! love you

  • Avi Miller-Oracle
    Avi Miller-Oracle Senior Solution Architect, Oracle Cloud Infrastructure Developer Adoption Melbourne, AustraliaPosts: 4,823 Employee
    edited Jun 8, 2020 4:21PM
    Dude! wrote:Haven't checked it for some time though, but Oracle has been adding many more repositories.I wonder how normal people find out about these things. 

    https://yum.oracle.com/ is a good place to start. We have a What's Available page: https://yum.oracle.com/getting-started.html#installing-software-from-oracle-linux-yum-server and a What's New page: https://yum.oracle.com/whatsnew.html

  • Dude!
    Dude! Member Posts: 22,826 Blue Diamond
    edited Jun 9, 2020 5:47AM

    I visit https://yum.oracle.com/ more or less frequently whenever I need to check if a particular installation is available. I suppose there isn't a better way to find out, other than using yum and enable all the software repositories, which isn't really feasible. I wish there was a more convenient way, for example, to type in the name of a product, and receive what repository needs to be enabled, alongside recommendations what similar products exist. It's perhaps just my personal opinion, but I find a lot of tech stuff increasingly self-serving. Info that actually explains why bother or why we do things the way we do things is difficult to come by. If you know what I mean.

  • Avi Miller-Oracle
    Avi Miller-Oracle Senior Solution Architect, Oracle Cloud Infrastructure Developer Adoption Melbourne, AustraliaPosts: 4,823 Employee
    edited Jun 9, 2020 2:25PM
    Dude! wrote:to type in the name of a product, and receive what repository needs to be enabled, alongside recommendations what similar products exist.

    If you build a product that does this, I'll invest in your startup.

  • Dude!
    Dude! Member Posts: 22,826 Blue Diamond
    edited Jun 9, 2020 3:19PM

    Well, I'll give it a thought. Start saving!

  • Avi Miller-Oracle
    Avi Miller-Oracle Senior Solution Architect, Oracle Cloud Infrastructure Developer Adoption Melbourne, AustraliaPosts: 4,823 Employee
    edited Jun 9, 2020 3:54PM
    Dude! wrote:Well, I'll give it a thought. Start saving! 

    I look forward your to your elevator pitch. My requirements are cross-platform and fully automated.

    Dude!
  • testuser4992
    testuser4992 Member Posts: 4
    edited Jun 9, 2020 9:03PM

    What is wrong here? Dependency (lib libsource-highlight.so) is processed several times and finally fails.

    # yum install devtoolset-9

    Loaded plugins: langpacks, ulninfo

    Resolving Dependencies

    --> Running transaction check

    ---> Package devtoolset-9.x86_64 0:9.1-0.el7 will be installed

    --> Processing Dependency: devtoolset-9-runtime for package: devtoolset-9-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-toolchain for package: devtoolset-9-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-perftools for package: devtoolset-9-9.1-0.el7.x86_64

    --> Running transaction check

    ---> Package devtoolset-9-perftools.x86_64 0:9.1-0.el7 will be installed

    --> Processing Dependency: devtoolset-9-oprofile for package: devtoolset-9-perftools-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-valgrind for package: devtoolset-9-perftools-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-systemtap for package: devtoolset-9-perftools-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-dyninst for package: devtoolset-9-perftools-9.1-0.el7.x86_64

    ---> Package devtoolset-9-runtime.x86_64 0:9.1-0.el7 will be installed

    ---> Package devtoolset-9-toolchain.x86_64 0:9.1-0.el7 will be installed

    --> Processing Dependency: devtoolset-9-elfutils for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-gdb for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-binutils for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-strace for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-gcc-c++ for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-memstomp for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-ltrace for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-gcc for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-make for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-dwz for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Processing Dependency: devtoolset-9-gcc-gfortran for package: devtoolset-9-toolchain-9.1-0.el7.x86_64

    --> Running transaction check

    ---> Package devtoolset-9-binutils.x86_64 0:2.32-16.el7 will be installed

    ---> Package devtoolset-9-dwz.x86_64 0:0.12-1.1.el7 will be installed

    ---> Package devtoolset-9-dyninst.x86_64 0:10.1.0-4.el7 will be installed

    ---> Package devtoolset-9-elfutils.x86_64 0:0.176-6.el7 will be installed

    --> Processing Dependency: devtoolset-9-elfutils-libs(x86-64) = 0.176-6.el7 for package: devtoolset-9-elfutils-0.176-6.el7.x86_64

    --> Processing Dependency: devtoolset-9-elfutils-libelf(x86-64) = 0.176-6.el7 for package: devtoolset-9-elfutils-0.176-6.el7.x86_64

    ---> Package devtoolset-9-gcc.x86_64 0:9.1.1-2.6.el7 will be installed

    ---> Package devtoolset-9-gcc-c++.x86_64 0:9.1.1-2.6.el7 will be installed

    --> Processing Dependency: devtoolset-9-libstdc++-devel = 9.1.1-2.6.el7 for package: devtoolset-9-gcc-c++-9.1.1-2.6.el7.x86_64

    ---> Package devtoolset-9-gcc-gfortran.x86_64 0:9.1.1-2.6.el7 will be installed

    --> Processing Dependency: devtoolset-9-libquadmath-devel = 9.1.1-2.6.el7 for package: devtoolset-9-gcc-gfortran-9.1.1-2.6.el7.x86_64

    ---> Package devtoolset-9-gdb.x86_64 0:8.3-3.el7 will be installed

    --> Processing Dependency: libboost_regex.so.1.53.0()(64bit) for package: devtoolset-9-gdb-8.3-3.el7.x86_64

    --> Processing Dependency: libsource-highlight.so.4()(64bit) for package: devtoolset-9-gdb-8.3-3.el7.x86_64

    ---> Package devtoolset-9-ltrace.x86_64 0:0.7.91-2.el7 will be installed

    ---> Package devtoolset-9-make.x86_64 1:4.2.1-2.el7 will be installed

    ---> Package devtoolset-9-memstomp.x86_64 0:0.1.5-5.el7 will be installed

    ---> Package devtoolset-9-oprofile.x86_64 0:1.3.0-4.el7 will be installed

    ---> Package devtoolset-9-strace.x86_64 0:5.1-7.el7 will be installed

    ---> Package devtoolset-9-systemtap.x86_64 0:4.1-9.el7 will be installed

    --> Processing Dependency: devtoolset-9-systemtap-devel = 4.1-9.el7 for package: devtoolset-9-systemtap-4.1-9.el7.x86_64

    --> Processing Dependency: devtoolset-9-systemtap-client = 4.1-9.el7 for package: devtoolset-9-systemtap-4.1-9.el7.x86_64

    ---> Package devtoolset-9-valgrind.x86_64 1:3.15.0-9.el7 will be installed

    --> Running transaction check

    ---> Package boost-regex.x86_64 0:1.53.0-28.el7 will be installed

    ---> Package devtoolset-9-elfutils-libelf.x86_64 0:0.176-6.el7 will be installed

    ---> Package devtoolset-9-elfutils-libs.x86_64 0:0.176-6.el7 will be installed

    ---> Package devtoolset-9-gdb.x86_64 0:8.3-3.el7 will be installed

    --> Processing Dependency: libsource-highlight.so.4()(64bit) for package: devtoolset-9-gdb-8.3-3.el7.x86_64

    ---> Package devtoolset-9-libquadmath-devel.x86_64 0:9.1.1-2.6.el7 will be installed

    ---> Package devtoolset-9-libstdc++-devel.x86_64 0:9.1.1-2.6.el7 will be installed

    ---> Package devtoolset-9-systemtap-client.x86_64 0:4.1-9.el7 will be installed

    --> Processing Dependency: devtoolset-9-systemtap-runtime = 4.1-9.el7 for package: devtoolset-9-systemtap-client-4.1-9.el7.x86_64

    ---> Package devtoolset-9-systemtap-devel.x86_64 0:4.1-9.el7 will be installed

    --> Running transaction check

    ---> Package devtoolset-9-gdb.x86_64 0:8.3-3.el7 will be installed

    --> Processing Dependency: libsource-highlight.so.4()(64bit) for package: devtoolset-9-gdb-8.3-3.el7.x86_64

    ---> Package devtoolset-9-systemtap-runtime.x86_64 0:4.1-9.el7 will be installed

    --> Finished Dependency Resolution

    Error: Package: devtoolset-9-gdb-8.3-3.el7.x86_64 (ol7_software_collections)

              Requires: libsource-highlight.so.4()(64bit)

    You could try using --skip-broken to work around the problem

    You could try running: rpm -Va --nofiles --nodigest

  • Avi Miller-Oracle
    Avi Miller-Oracle Senior Solution Architect, Oracle Cloud Infrastructure Developer Adoption Melbourne, AustraliaPosts: 4,823 Employee
    edited Jun 9, 2020 9:22PM

    You probably need to enable the ol7_optional_latest repo as well, via "yum-config-manager --enable ol7_optional_latest"

    testuser4992
  • testuser4992
    testuser4992 Member Posts: 4
    edited Jun 9, 2020 9:43PM

    Right, thank you.