Fedora16下编译安装GCC 4.7
来源:互联网 发布:2014知乎热门精选 编辑:程序博客网 时间:2024/05/16 18:40
GCC的编译安装指导可以参考http://gcc.gnu.org/install/
一,编译准备:http://gcc.gnu.org/install/prerequisites.html
参考该文档,在编译GCC之前需安装以下依赖库
MPFR Library version 2.4.2 (or later)
Necessary to build GCC. It can be downloaded from http://www.mpfr.org/. If an MPFR source distribution is found in a subdirectory of your GCC sources named mpfr, it will be built together with GCC. Alternatively, if MPFR is already installed but it is not in your default library search path, the --with-mpfr configure option should be used. See also --with-mpfr-lib and --with-mpfr-include.
Necessary to build GCC. It can be downloaded from http://www.multiprecision.org/. If an MPC source distribution is found in a subdirectory of your GCC sources named mpc, it will be built together with GCC. Alternatively, if MPC is already installed but it is not in your default library search path, the --with-mpc configure option should be used. See also --with-mpc-lib and --with-mpc-include.
Necessary to build GCC with the Graphite loop optimizations. It can be downloaded from http://www.cs.unipr.it/ppl/Download/.
The --with-ppl configure option should be used if PPL is not installed in your default library search path.
Necessary to build GCC with the Graphite loop optimizations. There are two versions available. CLooG-PPL 0.15 as well as CLooG 0.16. The former is the default right now. It can be downloaded from ftp://gcc.gnu.org/pub/gcc/infrastructure/ as cloog-ppl-0.15.tar.gz.
In both cases --with-cloog configure option should be used if CLooG is not installed in your default library search path.
还好根据这些库的源码编译比较简单,只是CLooG-PPL需用./configure --with-ppl=/path的方式,否则编译的时候会出现“source/../include/cloog/cloog.h:47:30: error:”的错误 polylib/missing.h: No such file or directory
另外,需要安装glibc-devel.i686(yum install glibc-devel.i686),否则编译阶段有可能遇到如下错误
In file included from /usr/include/features.h:387:0,
from /usr/include/stdio.h:28,
from ../../../../libgcc/../gcc/tsystem.h:88,
from ../../../../libgcc/libgcc2.c:29:
/usr/include/gnu/stubs.h:7:27: 致命错误:gnu/stubs-32.h:没有那个文件或目录
编译中断。
make[5]: *** [_muldi3.o] 错误 1
make[5]: 离开目录“/opt/gcc/build/x86_64-redhat-linux/32/libgcc”
make[4]: *** [multi-do] 错误 1
二,配置编译
解压源代码,并建立build目录,进入build目录进行配置
在现有GCC版本基础上就可以看到当前GCC版本的配置编译选项,如下:
# gcc -v
三,编译和安装
make
make install
- Fedora16下编译安装GCC 4.7
- Fedora16下安装oracle10g
- Fedora16下安装mysql
- Windows7下安装fedora16
- Fedora16 下安装Qt
- cygwin下编译安装gcc 4.7.2
- win7 下硬盘安装fedora16
- fedora16 下安装 gcc4.7.1
- fedora16下wxPython的安装
- linux下编译安装gcc
- linux下编译安装gcc
- Windows xp下硬盘安装Fedora16
- fedora16下安装mysql的问题
- fedora16下安装虚拟打印机(PDF)
- Fedora16下安装vsftpd实现ftp小结
- RHEL 5 下安装GCC编译环境
- Ubuntu下编译安装GCC-4.1.2
- RHEL5.1下安装GCC编译环境
- ZJUT 1197 倒杨辉三角形 (不是水题胜似水题)
- hadoop API 学习小结(四)
- xmu-1315 哈夫曼编码问题
- 互斥锁pthread_mutex_t的使用(转载)
- ABEND U4038
- Fedora16下编译安装GCC 4.7
- 反射机制学习笔记
- 什么是PERFORM语句?
- 手势的学习实践
- 模块化思想的重要性
- android滑动开关自己实现
- Map.EntrySet的用法
- WebView教程
- Struts2防刷新重复提交表单设置