gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0
从svn checkout svn://gcc.gnu.org/svn/gcc/trunk拿了GCC的最新代码,打算编译了学东西习学习C++
http://www.multiprecision.org/mpc 下载mpc-0.9.tar.gz
11的东西,结果在configure的时候出现例如以下问题:
Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.bz2下载gmp-5.0.1.tar.bz2
http://ftp.gnu.org/gnu/mpfr/下载mpfr-3.1.0.tar.xz。
先開始安装GMP。解压GMP的压缩包后,得到源码文件夹gmp-5.0.1。在该文件夹的同级文件夹下建立一个暂时的编译文件夹,这里命名为temp。然后開始配置安装选项,进入temp文件夹,输入下面命令进行配置:
../gmp-5.0.1/configure --prefix=/usr/local/gmp-5.0.1
make
sudo make install
mpfr和mpc的安装方法与gmp类似。只是要注意配置的时候要把gmp与mpfr的依赖关系选项加进去,详细配置命令例如以下:
../mpfr-3.1.0/configure --prefix=/usr/local/mpfr-3.1.0 --with-gmp=/usr/local/gmp-5.0.1
../mpc-0.9/configure --prefix=/usr/local/mpc-0.9 --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0
安装好这三个库之后,就能够正式開始安装gcc了。
当然了链接的时候,须要刚刚编译的3个lib。
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-0.9/lib:/usr/local/gmp-5.0.1/lib:/usr/local/mpfr-3.1.0/lib
然后是典型的configure,make,install三步曲。
../gcc-4.7.2/configure --prefix=/usr/local/gcc-4.7 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0
--with-mpc=/usr/local/mpc-0.9
make
make check(可选)
sudo make install
经过漫长的等待:
/usr/local/gcc-4.7/bin/g++ -v
使用内建 specs。
COLLECT_GCC=/usr/local/gcc-4.7/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.7/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
目标:x86_64-unknown-linux-gnu
配置为:../gcc-4.7.2/configure --prefix=/usr/local/gcc-4.7 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0 --with-mpc=/usr/local/mpc-0.9
线程模型:posix
gcc 版本号 4.7.0 20120113 (experimental) (GCC)
開始C++ 11学习了。
gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0的更多相关文章
- GCC升级问题解决:configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.,mpfr2.4.0
如果遇到类似问题: configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.,mpfr2.4.0 解决 ...
- configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. 一.错误发生情景: 在安装gcc时,执行.c ...
- Linux(CentOS6.5)下编译安装PHP5.6.22时报错”configure: error: ZLIB extension requires gzgets in zlib”的解决方式(确定已经编译安装Zlib,并已经指定Zlib路径)
本文地址http://comexchan.cnblogs.com/,作者Comex Chan,尊重知识产权,转载请注明出处,谢谢! 今天在CentOS6.5下编译安装PHP时,一直报错 confi ...
- 升级 GCC 支持C++11 或 configure: error: *** A compiler with support for C++11 language features is required.
configure: error: *** A compiler with support for C++11 language features is required. 参考链接: (1)升级 G ...
- maven 项目编译时候提示:Error building POM (may not be this project's POM).
编译时候提示Error building POM (may not be this project's POM)的错误,具体信息如下: [0] 'dependencies.dependency.ver ...
- nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的
源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...
- CentOS安装Nginx 报错“configure: error: the HTTP rewrite module requires the PCRE library”解决办法
错误提示: ./configure: error: the HTTP rewrite module requires the PCRE library. yum install gcc gc ...
- python psutil 编译中断。 error: command 'gcc' failed with exit status 1
error info [root@chenbj psutil-2.0.0]# python setup.py install running install running bdist_egg run ...
- pip error: command 'gcc' failed with exit status 1
SWIG/_m2crypto_wrap.c:127:20: 致命错误:Python.h:没有那个文件或目录 #include <Python.h> ...
随机推荐
- Maven--构建企业级仓库(二)
<Maven--搭建开发环境(一)> <Maven--构建企业级仓库(二)> <Maven—几个需要补充的问题(三)> 看到经历的两家公司 ...
- 记录一次SQL查询语句
以前发现比较经典的句子,都是记录在电脑上,我今天想搬到博客上,在我看来,写博客真的是一件非常头疼的事,它是内心的一道坎,我必须得跨过它. CREATE TABLE t_jeff ( id int NO ...
- 在vmware里面免费安装纯净的xp虚拟机
1. 安装vmware, 略 2. 下载xp http://msdn.itellyou.cn/ 用迅雷下载Windows XP Professional with Service Pack 3 (x8 ...
- 启用nginx status状态详解
nginx和php-fpm一样内建了一个状态页,对于想了解nginx的状态以及监控nginx非常有帮助.为了后续的zabbix监控,我们需要先了解nginx状态页是怎么回事. 1. 启用nginx s ...
- 如何借助Motion操控Linux监控摄像头
介绍 本文介绍如何使用motion来操控Linux下的摄像头. 安装 apt-get install motion 配置文件 输入命令后面的命令编辑配置文件, vim /etc/motion/moti ...
- POJ2069 最小球体覆盖, 模拟退火
只是套了个模板,模拟退火具体的过程真心不懂阿 //#pragma comment(linker, "/STACK:16777216") //for c++ Compiler #in ...
- iOS8的屏幕旋转的问题
判断横竖屏.http://www.cocoachina.com/ask/questions/show/121301 //self.cameraView是相机view - (NSUInteger)sup ...
- springmvc-3.2-jsr303解决服务端验证问题
从以前的验证:Stringutils.isEmpty....到struts的验证:xxxvalidate 现在使用jsr303使之更加简单 依赖hibernate-validator-4.xx.ja ...
- zk leader选举自动完成
server 1: [root@wx03 bin]# ./zkServer.sh status ZooKeeper JMX enabled by default Using config: /zook ...
- css3处理sprite背景图压缩来解决H5网页在手机浏览器下图标模糊的问题
近期在负责一个微信H5 App项目,遇到一个郁闷的问题,手机浏览器查看网页时图标都是模糊的,有锯齿,电脑浏览器显示则是正常.大概知道是分辨率适配等类型的问题,后来网上查找了一些办法.大部分的解决方式都 ...