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> ...
随机推荐
- java 利用java运行时的方法得到当前屏幕截图的方法(转)
将截屏图片保存到本地路径: package com.test; import java.awt.AWTException; import java.awt.Dimension; import java ...
- Poj 2499 Binary Tree(贪心)
题目链接:http://poj.org/problem?id=2499 思路分析:结点向左边移动时结点(a, b)变为( a+b, b),向右边移动时( a, b )变为( a, a + b); 为求 ...
- hdu1533解题报告
题意:这里有一个N*M的方格图.....图中m代表人,H代表房子...并且人数和房子的数量是相等的..那么.每个人可以竖直或者横向走一格,并且花费1S元...那么为了让所有的人进入房子,求解最小的花费 ...
- 怎样在VirtualBox 虚拟机中挂载共享目录
啊.好长时间没写博客了.近期有点忙~~ 不得不说 VirtualBox 对于一些不想装非常多个系统又非常想实验新系统的人来说确实是神器: 哈哈.个人还是比較爱玩这些个各种各样的Linux 发型版的,可 ...
- iOS原生App与H5页面交互笔记
文/MikeZhangpy(简书作者)原文链接:http://www.jianshu.com/p/4ed3e5ed99c6著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”. 最近在做一个项 ...
- 在vmware里面免费安装纯净的xp虚拟机
1. 安装vmware, 略 2. 下载xp http://msdn.itellyou.cn/ 用迅雷下载Windows XP Professional with Service Pack 3 (x8 ...
- ajax 基础实例
优点:使用ajax读取数据文件,不需要刷新页面就能取出文件数据 目 录 1.0 基于ajax请求的理论支持 1.1 js 实现jquray中 ajax请求功能 基于ajax请求的理论支持 < ...
- 【HTTP 2】简介(Introduction)
前情提要 在上一篇文章<[HTTP 2.0] 序言>中,我们简要介绍了 HTTP 2 协议的概要和协议状态. 在本篇文章中,我们将会了解到 HTTP 2 协议简介(Introduction ...
- Python字典处理技巧
从字典中取值(不想由于搜索的键不存在而异常) 解决方法: 使用字典的get方法 (get方法只读取字典的值而不会去修改字典) d={'key':'value'} print d.get('key',' ...
- android蓝牙的调试(博通蓝牙工作 and 低功耗模式)
首先结合项目从整体上去把握这部分: 蓝牙模块中一个比较核心的文件是bluetooth.c, 在我们上电的时候, 会调用这个文件中bt_enable()这个函数, 在这个函数里面先调用set_bluet ...