GCC-8.3.1 on CentOS7
CentOS7의 기본 GCC 버전은 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) 인 모양인데,
더 최신에 가까운 버전이 필요하면 아래와 같이 할 수 있겠다.

The Software Collections ( SCL ) Repository
    https://wiki.centos.org/AdditionalResources/Repositories/SCL
Developer Toolset 8 by Software Collections
    https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/

(사이트를 검색해보면 Developer Toolset 7도 있다. Python 등 다른 패키지들도 찾을 수 있음)

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

# 2. Install the collection:
$ sudo yum install devtoolset-8

# 3. Start using software collections: (devtoolset-8 컬렉션이 활성화된 상태의 bash 실행)
$ scl enable devtoolset-8 bash


아래 패키지들이 설치됐다.

================================================================================
 Package                        Arch   Version             Repository      Size
================================================================================
Installing:
 devtoolset-8                   x86_64 8.1-1.el7           centos-sclo-rh 5.4 k
Installing for dependencies:
 devtoolset-8-binutils          x86_64 2.30-55.el7.2       centos-sclo-rh 5.5 M
 devtoolset-8-dwz               x86_64 0.12-1.1.el7        centos-sclo-rh  98 k
 devtoolset-8-dyninst           x86_64 9.3.2-6.el7         centos-sclo-rh 3.6 M
 devtoolset-8-elfutils          x86_64 0.176-1.el7         centos-sclo-rh 431 k
 devtoolset-8-elfutils-libelf   x86_64 0.176-1.el7         centos-sclo-rh 202 k
 devtoolset-8-elfutils-libs     x86_64 0.176-1.el7         centos-sclo-rh 311 k
 devtoolset-8-gcc               x86_64 8.3.1-3.2.el7       centos-sclo-rh  30 M
 devtoolset-8-gcc-c++           x86_64 8.3.1-3.2.el7       centos-sclo-rh  12 M
 devtoolset-8-gcc-gfortran      x86_64 8.3.1-3.2.el7       centos-sclo-rh  12 M
 devtoolset-8-gdb               x86_64 8.2-3.el7           centos-sclo-rh 3.4 M
 devtoolset-8-libquadmath-devel x86_64 8.3.1-3.2.el7       centos-sclo-rh 155 k
 devtoolset-8-libstdc++-devel   x86_64 8.3.1-3.2.el7       centos-sclo-rh 2.7 M
 devtoolset-8-ltrace            x86_64 0.7.91-1.el7        centos-sclo-rh 148 k
 devtoolset-8-make              x86_64 1:4.2.1-4.el7       centos-sclo-rh 485 k
 devtoolset-8-memstomp          x86_64 0.1.5-5.el7         centos-sclo-rh 442 k
 devtoolset-8-oprofile          x86_64 1.3.0-2.el7         centos-sclo-rh 1.8 M
 devtoolset-8-perftools         x86_64 8.1-1.el7           centos-sclo-rh 2.8 k
 devtoolset-8-runtime           x86_64 8.1-1.el7           centos-sclo-rh  20 k
 devtoolset-8-strace            x86_64 4.24-4.el7          centos-sclo-rh 1.0 M
 devtoolset-8-systemtap         x86_64 3.3-2.el7           centos-sclo-rh 144 k
 devtoolset-8-systemtap-client  x86_64 3.3-2.el7           centos-sclo-rh 2.8 M
 devtoolset-8-systemtap-devel   x86_64 3.3-2.el7           centos-sclo-rh 2.2 M
 devtoolset-8-systemtap-runtime x86_64 3.3-2.el7           centos-sclo-rh 427 k
 devtoolset-8-toolchain         x86_64 8.1-1.el7           centos-sclo-rh 3.0 k
 devtoolset-8-valgrind          x86_64 1:3.14.0-16.el7     centos-sclo-rh  11 M
 kernel-debug-devel             x86_64 3.10.0-1127.13.1.el7
                                                           updates         18 M
 libgfortran5                   x86_64 8.3.1-2.1.1.el7     base           796 k
 libquadmath                    x86_64 4.8.5-39.el7        base           190 k

Transaction Summary
================================================================================
Install  1 Package (+28 Dependent packages)


배포판 기본 버전 컴파일러 대신 새로 설치한 버전들을 쓰려면 아래와 같이 한다.

$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 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.

$ echo $$
713
$ scl enable devtoolset-8 bash
$ echo $$
13310
$ gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 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.
by 시험さま | 2020/07/30 10:24 | 컴퓨터 | 트랙백 | 덧글(0)
트랙백 주소 : http://chanik.egloos.com/tb/4186725
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글

< 이전페이지 다음페이지 >