Gcc 8/9 On CentOS 7

Home » CentOS » Gcc 8/9 On CentOS 7
CentOS 4 Comments

I am looking to make use of gcc 8/9 on CentOS 7, which is currently with gcc 4.8.5. How do I go about doing this? SCL repository provides the same as part of devtoolset8, but devtoolset8 libstdc++-devel i686 package is missing, without which I can not build 32 bit applications.

Are there any repository sources from where I can get this? Otherwise, I am open to building the packages from sources. Please let me know how can one go about this.

Any suggestions and pointers appreciated.

4 thoughts on - Gcc 8/9 On CentOS 7

  • compile 32-bit programs because devtoolset-8-libstdc++-devel.i686 package is missing from CentOS SCL repository. This is mentioned here
    <https://bugzilla.redhat.com/show_bug.cgi?id42077> as well.

    g++ -m32 helloworld.cpp
    /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld:
    skipping incompatible
    /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++_nonshared.a when searching for -lstdc++_nonshared
    /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: cannot find -lstdc++_nonshared collect2: error: ld returned 1 exit status

    Are there any plans to add the missing i686 package? Otherwise, what other options does one have to get to gcc 8/9?

    Further, where can I find the srpm file for the devtoolset-8 packages. One way would be to use the srpm to rebuild.

  • I have built the i686 devtoolset-8 items here:

    https://buildlogs.CentOS.org/c7-devtoolset-8.x86_64/

    That is what we use to build items that require devtoolset for the base OS and is not for release purposes .. but if you can use it, it is available.

    You can get the srpms here:

    https://cbs.CentOS.org/repos/sclo7-devtoolset-8-rh-release/source/SRPMS/

    WRT devtoolset-9, I am not building that right now for c7 .. it is not something they are building the any base os things on in RHEL-7 right now, so I have not tried to build it for CentOS-7.

  • it. However, I ran into a minor problem when installing i686 package from the URL. I have devtoolset-8-libstdc++-devel-*8.3.1-3.1*.el7.x86_64 package installed from SCL repo. The latest i686 version I found from the URL you shared was devtoolset-8-libstdc++-devel-*8.3.1-3.*el7.i686.rpm. Is there any location where I can get the next incremental build?