svn checkout svn://gcc.gnu.org/svn/gcc/trunk拿了GCC的最新代码,打算编译了学东西习学习C++
11的东西,结果在configure的时候出现例如以下问题:

   Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+

   
http://www.multiprecision.org/mpc 下载mpc-0.9.tar.gz      

   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的更多相关文章

  1. 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 解决 ...

  2. 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 ...

  3. 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 ...

  4. 升级 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 ...

  5. 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 ...

  6. nginx报错:./configure: error: C compiler cc is not found, gcc 是已经安装了的

    源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下: # ./configure checking for OS + Linux -.el7.x86_64 x86_64 checki ...

  7. 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 ...

  8. 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 ...

  9. pip error: command 'gcc' failed with exit status 1

    SWIG/_m2crypto_wrap.c:127:20: 致命错误:Python.h:没有那个文件或目录     #include <Python.h>                  ...

随机推荐

  1. OGNL逻辑标签,UI标签

    逻辑标签 public class IndexAction extends BasicAction{ private static final long serialVersionUID = 1L; ...

  2. dubbo 服务化

    当网站变大后,不可避免的需要拆分应用进行服务化,以提高开发效率,调优性能,节省关键竞争资源等. 当服务越来越多时,服务的URL地址信息就会爆炸式增长,配置管理变得非常困难,F5硬件负载均衡器的单点压力 ...

  3. win8.1镜像制作

    使用自带的powerShell工具,以管理员身份运行,比如镜像的目标位置为F盘,那么用下面的命令即可, wbAdmin start backup -backupTarget:F: -include:C ...

  4. PHP面向对象基础实例

    <?phpclass marine{ public $blood = 50; //剩余的血 public $kills = 0; //杀敌数量 static $all_num = 0;//兵的数 ...

  5. Ural 1068 - Sum

    Your task is to find the sum of all integer numbers lying between 1 and N inclusive. Input The input ...

  6. QuartusII 中采用门级原语

    QuartusII  中采用门级原语 默认的是前面第一个 为output  后面所有信号为输入 图中的工程实现的是 一个二选一多路选择器

  7. 在Struts 2中实现IoC

    IoC(Inversion of Control,以下译为控制反转)随着Java社区中轻量级容器(Lightweight Contianer)的推广而越来越为大家耳熟能详.在此,我不想再多费唇舌来解释 ...

  8. 感觉Release有时比Debug要健壮

    评估文件夹大小的时候,直接跨线程操作UI界面,Debug崩溃,Release不崩溃. 更多的一种情况是,本机DEBUG下不崩溃,把RELEASE版本到别的机子上,立刻崩溃(登录框的进度条的对象为空,仍 ...

  9. Python函数式编程:Lambda表达式

    首先我们要明白在编程语言中,表达式和语句的区别. 表达式是一个由变量.常量.有返回值的函数加运算符组成的一个式子,该式子是有返回值的 ,如  a + 1 就是个表达式, 单独的一个常量.变量 或函数调 ...

  10. Flask web开发 处理POST请求(登录案例)

    本文我们以一个登录例子来说明Flask对 post请求的处理机制. 1.创建应用目录,如 mkdir   example cd example 2.在应用目录下创建  run.py文件,内容如下 fr ...