gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
来源:互联网 发布:anaconda 改成python 2 编辑:程序博客网 时间:2024/04/27 17:37
原文地址:http://dtbuluo.com/blog/archives/381
从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三步曲。
../trunk/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
配置为:../trunk/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.3.1+ and MPC 0.8.0
- 【转载】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.3.1+ and MPC 0.8.0+
- 安装gcc必须三个库///configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.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升级问题解决:configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.,mpfr2.4.0
- GCC编译出错Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
- GCC源码安装出错error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0
- configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.解决方法
- gcc mpc mpfr gmp源码包安装
- RHEL5.4 x86_64 GCC 4.1.2 升级到4.7.0版过程(含安装MPFR、GMP、MPC过程)
- RHEL4.0AS GCC升级到4.3.3版本安装MPFR和GMP过程
- 编译gcc-4.2.0可用的configure
- gcc 编译安装 configure-stage1-target-libgcc] Error 1
- gcc configure
- Building GCC 4.2.1 On Solaris
- objective-c 中new与alloc/init的区别
- dir函数:遍历文件名
- javase
- 插入排序、希尔排序、冒泡排序、快速排序、选择排序、堆排序、归并排序
- css3媒体查询
- gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
- 使用bootstrap-pagination进行分页
- 2016-8-9夏令营总结(网络流—增广路+dinic)
- POJ3211--分类01背包
- 32位单片机 一个32位地址代表一个字节而不是4个字节(32位)
- HTML5-CSS布局
- javascript 面向对象
- 配置standby redo log
- my学习OC--类的构造函数和析构函数