GCC gcc-5.4.0 build on centos7



在centos 7上,我试图通过源代码安装GCC 5.4,但它总是进入无限循环。

环境:-

uname -a
Linux  3.10.0-1062.12.1.rt56.1042.el7.x86_64 #1 SMP PREEMPT RT Wed Feb 5 10:31:05 CET 2020 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
rpm -qa | grep -i gcc
libgcc-4.8.5-44.el7.x86_64
gcc-c++-4.8.5-44.el7.x86_64
gcc-gfortran-4.8.5-44.el7.x86_64
gcc-4.8.5-44.el7.x86_64
gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
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.

现在,我尝试构建GCC 5.4,并在无限循环中在屏幕上获得以下消息。

我的config.log初始内容如下。

uname -m = x86_64
uname -r = 3.10.0-1062.12.1.rt56.1042.el7.x86_64
uname -s = Linux
uname -v = #1 SMP PREEMPT RT Wed Feb 5 10:31:05 CET 2020
/usr/bin/uname -p = x86_64
/bin/uname -X     = unknown
/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown
# make -j$(nproc) && make install
checking for compatible ISL... no
*** This configuration is not supported in the following subdirectories:
target-libmpx gnattools gotools target-libada target-libgfortran target-libgo target-libffi target-libbacktrace target-zlib target-libjava target-libobjc target-liboffloadmic target-boehm-gc
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for x86_64-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-linux-gnu-as... no
checking for as... as
checking for x86_64-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-linux-gnu-ld... no
checking for ld... ld
checking for x86_64-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-linux-gnu-nm... no
checking for nm... nm
checking for x86_64-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-linux-gnu-windres... no
checking for windres... no
checking for x86_64-linux-gnu-windmc... no
checking for windmc... no
checking for x86_64-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for x86_64-linux-gnu-objdump... no
checking for objdump... objdump
checking for x86_64-linux-gnu-readelf... no
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objcopy... no
checking for objcopy... objcopy
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... readelf
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
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

任何安装GCC的建议都会有很大帮助。

感谢您的指导。我尝试了更高版本的GCC 7.0,在服务器上启用互联网并运行"/contrib/download_prereprecisions";。它解决了问题,GCC安装成功。

最新更新