CentOS7 gcc 7.3.0 install

install環境

install環境

CentOS Linux release 7.5.1804 (Core)

gcc バージョン 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)

ダウンロード・展開

GCC, the GNU Compiler Collection
Install対象 : gcc 7.3.0

gccのインストール手順の中にある
download_prerequisites
の実行で以下のソースがインターネット経由で取得・コンパイルされる。
インターネット接続がない環境では事前に準備が必要
gmp-6.1.0.tar.bz2
mpfr-3.1.4.tar.bz2
mpc-1.0.3.tar.gz
isl-0.16.1.tar.bz2

Install手順

ソースファイルをダウンロード wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-7.3.0/gcc-7.3.0.tar.gz
ダウンロードしたファイルを展開

tar xvfp gcc-7.3.0.tar.gz

コンパイル・インストール

cd gcc-7.3.0

mkdir build

./contrib/download_prerequisites

cd build

../configure –enable-languages=c,c++,fortran –prefix=/usr/local/gcc-7.3.0 –disable-bootstrap –disable-

multilib

make

make install

インストール・ログ

#
#mkdir build
#
#./contrib/download_prerequisites
2018-10-31 11:14:17 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 [2383840] -> "./gmp-6.1.0.tar.bz2" [1]
2018-10-31 11:14:46 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 [1279284] -> "./mpfr-3.1.4.tar.bz2" [1]
2018-10-31 11:15:14 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz [669925] -> "./mpc-1.0.3.tar.gz" [1]
2018-10-31 11:15:32 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2 [1626446] -> "./isl-0.16.1.tar.bz2" [1]
gmp-6.1.0.tar.bz2: 完了
mpfr-3.1.4.tar.bz2: 完了
mpc-1.0.3.tar.gz: 完了
isl-0.16.1.tar.bz2: 完了
All prerequisites downloaded successfully.
#
#cd build
#
#../configure -enable-languages=c,c++,fortran -prefix=/usr/local/gcc-7.3.0 -disable-bootstrap -disable-multilib
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for libmpx support... yes
checking for libhsail-rt support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
・
・
・
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objcopy... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile
#
#
#make
make[1]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build' に入ります
mkdir -p -- ./fixincludes
Configuring in ./fixincludes
configure: creating cache ./config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for x86_64-pc-linux-gnu-gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
・
・
・
libtool: link: ar rc .libs/libatomic_convenience.a .libs/gload.o .libs/gstore.o .libs/gcas.o .libs/gexch.o .libs/glfree.o .libs/lock.o .libs/init.o .libs/fenv.o .libs/fence.o .libs/flag.o .libs/load_1_.o .libs/store_1_.o .libs/cas_1_.o .libs/exch_1_.o .libs/fadd_1_.o .libs/fsub_1_.o .libs/fand_1_.o .libs/fior_1_.o .libs/fxor_1_.o .libs/fnand_1_.o .libs/tas_1_.o .libs/load_2_.o .libs/store_2_.o .libs/cas_2_.o .libs/exch_2_.o .libs/fadd_2_.o .libs/fsub_2_.o .libs/fand_2_.o .libs/fior_2_.o .libs/fxor_2_.o .libs/fnand_2_.o .libs/tas_2_.o .libs/load_4_.o .libs/store_4_.o .libs/cas_4_.o .libs/exch_4_.o .libs/fadd_4_.o .libs/fsub_4_.o .libs/fand_4_.o .libs/fior_4_.o .libs/fxor_4_.o .libs/fnand_4_.o .libs/tas_4_.o .libs/load_8_.o .libs/store_8_.o .libs/cas_8_.o .libs/exch_8_.o .libs/fadd_8_.o .libs/fsub_8_.o .libs/fand_8_.o .libs/fior_8_.o .libs/fxor_8_.o .libs/fnand_8_.o .libs/tas_8_.o .libs/load_16_.o .libs/store_16_.o .libs/cas_16_.o .libs/exch_16_.o .libs/fadd_16_.o .libs/fsub_16_.o .libs/fand_16_.o .libs/fior_16_.o .libs/fxor_16_.o .libs/fnand_16_.o .libs/tas_16_.o .libs/load_16_1_.o .libs/store_16_1_.o .libs/cas_16_1_.o .libs/exch_16_1_.o .libs/fadd_16_1_.o .libs/fsub_16_1_.o .libs/fand_16_1_.o .libs/fior_16_1_.o .libs/fxor_16_1_.o .libs/fnand_16_1_.o .libs/tas_16_1_.o
libtool: link: ranlib .libs/libatomic_convenience.a
libtool: link: ( cd ".libs" && rm -f "libatomic_convenience.la" && ln -s "../libatomic_convenience.la" "libatomic_convenience.la" )
/bin/sh ./libtool --tag=CC   --mode=link /home/GCC_KIT/gcc-7.3.0/build/./gcc/xgcc -B/home/GCC_KIT/gcc-7.3.0/build/./gcc/ -B/usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/bin/ -B/usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/include -isystem /usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/sys-include    -Wall -Werror  -pthread -g -O2 -version-info 3:0:2 -Wl,--version-script,../../../libatomic/libatomic.map   -o libatomic.la -rpath /usr/local/gcc-7.3.0/lib/../lib64 gload.lo gstore.lo gcas.lo gexch.lo glfree.lo lock.lo init.lo fenv.lo fence.lo flag.lo load_1_.lo store_1_.lo cas_1_.lo exch_1_.lo fadd_1_.lo fsub_1_.lo fand_1_.lo fior_1_.lo fxor_1_.lo fnand_1_.lo tas_1_.lo load_2_.lo store_2_.lo cas_2_.lo exch_2_.lo fadd_2_.lo fsub_2_.lo fand_2_.lo fior_2_.lo fxor_2_.lo fnand_2_.lo tas_2_.lo load_4_.lo store_4_.lo cas_4_.lo exch_4_.lo fadd_4_.lo fsub_4_.lo fand_4_.lo fior_4_.lo fxor_4_.lo fnand_4_.lo tas_4_.lo load_8_.lo store_8_.lo cas_8_.lo exch_8_.lo fadd_8_.lo fsub_8_.lo fand_8_.lo fior_8_.lo fxor_8_.lo fnand_8_.lo tas_8_.lo load_16_.lo store_16_.lo cas_16_.lo exch_16_.lo fadd_16_.lo fsub_16_.lo fand_16_.lo fior_16_.lo fxor_16_.lo fnand_16_.lo tas_16_.lo   load_16_1_.lo store_16_1_.lo cas_16_1_.lo exch_16_1_.lo fadd_16_1_.lo fsub_16_1_.lo fand_16_1_.lo fior_16_1_.lo fxor_16_1_.lo fnand_16_1_.lo tas_16_1_.lo
libtool: link: /home/GCC_KIT/gcc-7.3.0/build/./gcc/xgcc -B/home/GCC_KIT/gcc-7.3.0/build/./gcc/ -B/usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/bin/ -B/usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/include -isystem /usr/local/gcc-7.3.0/x86_64-pc-linux-gnu/sys-include    -shared  -fPIC -DPIC  .libs/gload.o .libs/gstore.o .libs/gcas.o .libs/gexch.o .libs/glfree.o .libs/lock.o .libs/init.o .libs/fenv.o .libs/fence.o .libs/flag.o .libs/load_1_.o .libs/store_1_.o .libs/cas_1_.o .libs/exch_1_.o .libs/fadd_1_.o .libs/fsub_1_.o .libs/fand_1_.o .libs/fior_1_.o .libs/fxor_1_.o .libs/fnand_1_.o .libs/tas_1_.o .libs/load_2_.o .libs/store_2_.o .libs/cas_2_.o .libs/exch_2_.o .libs/fadd_2_.o .libs/fsub_2_.o .libs/fand_2_.o .libs/fior_2_.o .libs/fxor_2_.o .libs/fnand_2_.o .libs/tas_2_.o .libs/load_4_.o .libs/store_4_.o .libs/cas_4_.o .libs/exch_4_.o .libs/fadd_4_.o .libs/fsub_4_.o .libs/fand_4_.o .libs/fior_4_.o .libs/fxor_4_.o .libs/fnand_4_.o .libs/tas_4_.o .libs/load_8_.o .libs/store_8_.o .libs/cas_8_.o .libs/exch_8_.o .libs/fadd_8_.o .libs/fsub_8_.o .libs/fand_8_.o .libs/fior_8_.o .libs/fxor_8_.o .libs/fnand_8_.o .libs/tas_8_.o .libs/load_16_.o .libs/store_16_.o .libs/cas_16_.o .libs/exch_16_.o .libs/fadd_16_.o .libs/fsub_16_.o .libs/fand_16_.o .libs/fior_16_.o .libs/fxor_16_.o .libs/fnand_16_.o .libs/tas_16_.o .libs/load_16_1_.o .libs/store_16_1_.o .libs/cas_16_1_.o .libs/exch_16_1_.o .libs/fadd_16_1_.o .libs/fsub_16_1_.o .libs/fand_16_1_.o .libs/fior_16_1_.o .libs/fxor_16_1_.o .libs/fnand_16_1_.o .libs/tas_16_1_.o    -pthread -Wl,--version-script -Wl,../../../libatomic/libatomic.map   -pthread -Wl,-soname -Wl,libatomic.so.1 -o .libs/libatomic.so.1.2.0
libtool: link: (cd ".libs" && rm -f "libatomic.so.1" && ln -s "libatomic.so.1.2.0" "libatomic.so.1")
libtool: link: (cd ".libs" && rm -f "libatomic.so" && ln -s "libatomic.so.1.2.0" "libatomic.so")
libtool: link: ar rc .libs/libatomic.a  gload.o gstore.o gcas.o gexch.o glfree.o lock.o init.o fenv.o fence.o flag.o load_1_.o store_1_.o cas_1_.o exch_1_.o fadd_1_.o fsub_1_.o fand_1_.o fior_1_.o fxor_1_.o fnand_1_.o tas_1_.o load_2_.o store_2_.o cas_2_.o exch_2_.o fadd_2_.o fsub_2_.o fand_2_.o fior_2_.o fxor_2_.o fnand_2_.o tas_2_.o load_4_.o store_4_.o cas_4_.o exch_4_.o fadd_4_.o fsub_4_.o fand_4_.o fior_4_.o fxor_4_.o fnand_4_.o tas_4_.o load_8_.o store_8_.o cas_8_.o exch_8_.o fadd_8_.o fsub_8_.o fand_8_.o fior_8_.o fxor_8_.o fnand_8_.o tas_8_.o load_16_.o store_16_.o cas_16_.o exch_16_.o fadd_16_.o fsub_16_.o fand_16_.o fior_16_.o fxor_16_.o fnand_16_.o tas_16_.o load_16_1_.o store_16_1_.o cas_16_1_.o exch_16_1_.o fadd_16_1_.o fsub_16_1_.o fand_16_1_.o fior_16_1_.o fxor_16_1_.o fnand_16_1_.o tas_16_1_.o
libtool: link: ranlib .libs/libatomic.a
libtool: link: ( cd ".libs" && rm -f "libatomic.la" && ln -s "../libatomic.la" "libatomic.la" )
true  DO=all multi-do # make
make[4]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/x86_64-pc-linux-gnu/libatomic' から出ます
make[3]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/x86_64-pc-linux-gnu/libatomic' から出ます
make[2]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/x86_64-pc-linux-gnu/libatomic' から出ます
make[1]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build' から出ます
#
#
#
#make install
make[1]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build' に入ります
/bin/sh ../mkinstalldirs /usr/local/gcc-7.3.0 /usr/local/gcc-7.3.0
mkdir -p -- /usr/local/gcc-7.3.0 /usr/local/gcc-7.3.0
make[2]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/fixincludes' に入ります
rm -rf /usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools
/bin/sh ../../fixincludes/../mkinstalldirs /usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools
mkdir -p -- /usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools
/bin/sh ../../fixincludes/../mkinstalldirs /usr/local/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools/include
mkdir -p -- /usr/local/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools/include
/bin/install -c -m 644 ../../fixincludes/README-fixinc \
  /usr/local/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools/include/README
/bin/install -c fixinc.sh /usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools/fixinc.sh
/bin/install -c fixincl /usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools/fixincl
/bin/install -c mkheaders /usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/install-tools/mkheaders
make[2]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/fixincludes' から出ます
make[2]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/lto-plugin' に入ります
make[3]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/lto-plugin' に入ります
 /bin/mkdir -p '/usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0'
・
・
・
libtool: install: /bin/install -c .libs/libatomic.lai /usr/local/gcc-7.3.0/lib/../lib64/libatomic.la
libtool: install: /bin/install -c .libs/libatomic.a /usr/local/gcc-7.3.0/lib/../lib64/libatomic.a
libtool: install: chmod 644 /usr/local/gcc-7.3.0/lib/../lib64/libatomic.a
libtool: install: ranlib /usr/local/gcc-7.3.0/lib/../lib64/libatomic.a
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /usr/local/gcc-7.3.0/lib/../lib64
ldconfig: /usr/local/gcc-7.3.0/lib/../lib64/libstdc++.so.6.0.24-gdb.py is not an ELF file - it has the wrong magic bytes at the start.

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/gcc-7.3.0/lib/../lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[4]: `install-data-am' に対して行うべき事はありません.
make[4]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/x86_64-pc-linux-gnu/libatomic' から出ます
make[3]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/x86_64-pc-linux-gnu/libatomic' から出ます
make[2]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build/x86_64-pc-linux-gnu/libatomic' から出ます
make[1]: ディレクトリ `/home/GCC_KIT/gcc-7.3.0/build' から出ます
#
#
#
#/usr/local/gcc-7.3.0/bin/gcc -v
組み込み spec を使用しています。
COLLECT_GCC=/usr/local/gcc-7.3.0/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
ターゲット: x86_64-pc-linux-gnu
configure 設定: ../configure -enable-languages=c,c++,fortran -prefix=/usr/local/gcc-7.3.0 -disable-bootstrap -disable-multilib
スレッドモデル: posix
gcc バージョン 7.3.0 (GCC)
#
#/usr/local/gcc-7.3.0/bin/gfortran -v
組み込み spec を使用しています。
COLLECT_GCC=/usr/local/gcc-7.3.0/bin/gfortran
COLLECT_LTO_WRAPPER=/usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
ターゲット: x86_64-pc-linux-gnu
configure 設定: ../configure -enable-languages=c,c++,fortran -prefix=/usr/local/gcc-7.3.0 -disable-bootstrap -disable-multilib
スレッドモデル: posix
gcc バージョン 7.3.0 (GCC)
#
#/usr/local/gcc-7.3.0/bin/g++ -v
組み込み spec を使用しています。
COLLECT_GCC=/usr/local/gcc-7.3.0/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-7.3.0/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
ターゲット: x86_64-pc-linux-gnu
configure 設定: ../configure -enable-languages=c,c++,fortran -prefix=/usr/local/gcc-7.3.0 -disable-bootstrap -disable-multilib
スレッドモデル: posix
gcc バージョン 7.3.0 (GCC)
#
#

コメントを残す