Linux gcc升级全过程,过程超具体
擅长Oracle数据库运维开发,备份恢复,安装迁移,性能优化、故障应急处理等。https://img-blog.csdnimg.cn/20210718083528669.png
文章目录
[*] 前言
[*]
[*]1.当前gcc版本
[*] 2.安装gcc
[*] 3.gmp安装
[*] 4.MPFR编译
[*] 5.MPC编译
[*] 6.GCC 配置
[*] 7.GCC版本更新
前言
=====================================================================
c c++ 等等 须要这个编译器gcc,最近有DBA的朋友咨询RHEL7.6操纵系统安装Mysql数据库时须要 高版本的GCC,研究了下发现坑不少,总结本文分享给大家
1.当前gcc版本
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: …/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
从以上可以看出当前版本为4.8.5,本次我们升级到10.1.0
2.安装gcc
–下载地址:
https://mirrors.aliyun.com/gnu/gcc/gcc-10.1.0/
# tar -vxf gcc-10.1.0.tar.gz
# mkdir build
# cd build/
# …/configure --prefix=/usr/local/gcc-10.1.0/ --enable-checking=release --enable-languages=c,c++ --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… /usr/bin/install -c
checking whether ln works… yes
checking whether ln -s works… yes
checking for a sed that does not truncate output… /usr/bin/sed
checking for gawk… gawk
checking for libatomic support… yes
checking for libitm support… yes
checking for libsanitizer support… yes
checking for libvtv support… yes
checking for libhsail-rt support… yes
checking for libphobos support… yes
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
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 for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking whether g++ accepts -static-libstdc++ -static-libgcc… no
checking for gnatbind… no
checking for gnatmake… no
checking whether compiler driver understands Ada… no
checking how to compare bootstrapped objects… cmp --ignore-initial=16 f 1 f1 f1f2
checking for objdir… .libs
checking for the correct version of gmp.h… no
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
https://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
从日志总可以看出有如下报错,故下面每个都安装
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
3.gmp安装
# tar -vxf gmp-5.0.1.tar.bz2
# cd gmp-5.0.1/
# ./configure --prefix=/usr/local/gmp-5.0.1
# make
# make install
make: Leaving directory `/root/gmp-5.0.1’
make: Leaving directory `/root/gmp-5.0.1’
make: Leaving directory `/root/gmp-5.0.1’
make: Leaving directory `/root/gmp-5.0.1’
4.MPFR编译
# tar -vxf mpfr-3.1.5.tar.xz
# cd mpfr-3.1.5/
#./configure --prefix=/usr/local/mpfr-3.1.5 --with-gmp=/usr/local/gmp-5.0.1
# make
# make install
5.MPC编译
# tar -vxf mpc-1.0.1.tar.gz
# cd mpc-1.0.1
# ./configure --prefix=/usr/local/mpc-1.0.1 --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.5
# make
# make install
6.GCC 配置
# cd gcc-10.1.0
# cd build/
…/configure --prefix=/usr/local/gcc-10.1.0/ --enable-checking=release --enable-languages=c,c++ --disable-multilib --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.5 --with-mpc=/usr/local/mpc-1.0.1
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… /usr/bin/install -c
checking whether ln works… yes
checking whether ln -s works… yes
checking for a sed that does not truncate output… /usr/bin/sed
checking for gawk… gawk
checking for libatomic support… yes
checking for libitm support… yes
checking for libsanitizer support… yes
checking for libvtv support… yes
checking for libhsail-rt support… yes
checking for libphobos support… yes
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
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 for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking whether g++ accepts -static-libstdc++ -static-libgcc… no
checking for gnatbind… no
checking for gnatmake… no
checking whether compiler driver understands Ada… no
checking how to compare bootstrapped objects… cmp --ignore-initial=16 f 1 f1 f1f2
checking for objdir… .libs
checking for the correct version of gmp.h… yes
checking for the correct version of mpfr.h… buggy but acceptable
checking for the correct version of mpc.h… yes
checking for the correct version of the gmp/mpfr/mpc libraries… yes
checking for isl 0.15 or later… no
required isl version is 0.15 or later
*** This configuration is not supported in the following subdirectories:
gnattools gotools target-libada target-libhsail-rt target-libphobos target-zlib target-libbacktrace target-libgfortran target-libgo target-libffi target-libobjc target-liboffloadmic
(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
自我先容一下,小编13年上海交大结业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里不停到现在。
深知大多数Java工程师,想要提升技能,往往是自己探索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学结果低效又漫长,而且极易遇到天花板技术停滞不前!
因此收集整理了一份《2024年Java开发全套学习资料》,初志也很简朴,就是希望可以或许帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。https://img-blog.csdnimg.cn/img_convert/9ddd8b36c837c915fd11a4999bc74c74.jpeg
https://img-blog.csdnimg.cn/img_convert/a57fac34b16ff2fba0ae8204d0a664e4.png
https://img-blog.csdnimg.cn/img_convert/670f88e29b407b5e8bc5fa9044fd82a3.png
既有适当小白学习的零基础资料,也有适当3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码课本、实战项目、解说视频,而且会连续更新!
如果你以为这些内容对你有帮助,可以扫码获取!!(备注Java获取)
https://img-blog.csdnimg.cn/img_convert/6ac0979425179f5706e43c6f52623e79.jpeg Java面试焦点知识点笔记
此中囊括了JVM、锁、并发、Java反射、Spring原理、微服务、Zookeeper、数据库、数据结构等大量知识点。
https://img-blog.csdnimg.cn/img_convert/cf3c35456542ffcb7990021dcedbb2c2.webp?x-oss-process=image/format,png
Java中高级面试高频考点整理
https://img-blog.csdnimg.cn/img_convert/54148ac811e7df6c09d32f71a6f1a398.webp?x-oss-process=image/format,png
https://img-blog.csdnimg.cn/img_convert/a45c3b8eaef7a168bc57ca5be66ae929.webp?x-oss-process=image/format,png
最后分享Java进阶学习及面试必备的视频讲授
https://img-blog.csdnimg.cn/img_convert/1132e7c7ddde05dbb0adffb2ed139d65.webp?x-oss-process=image/format,png
《一线大厂Java面试题解析+焦点总结学习笔记+最新解说视频+实战项目源码》,点击传送门即可获取!
le=“zoom: 33%;” />
Java面试焦点知识点笔记
此中囊括了JVM、锁、并发、Java反射、Spring原理、微服务、Zookeeper、数据库、数据结构等大量知识点。
[外链图片转存中…(img-kOETP3bp-1711790617884)]
Java中高级面试高频考点整理
[外链图片转存中…(img-zLQ5lZ3P-1711790617885)]
[外链图片转存中…(img-Olr8o6xm-1711790617885)]
最后分享Java进阶学习及面试必备的视频讲授
[外链图片转存中…(img-lFAJLYHl-1711790617885)]
《一线大厂Java面试题解析+焦点总结学习笔记+最新解说视频+实战项目源码》,点击传送门即可获取!
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]