免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1101 | 回复: 0
打印 上一主题 下一主题

install gcc-4.4.1 under linux [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-04 02:24 |只看该作者 |倒序浏览
install gcc-4.4.1 under linux
(1)下载了gcc-4.4.1的包然后再redhat上安装,就是默认的./configure,发现不能安装,提示缺少mpfr和gmp包,所以又下载了mpfr-2.4.1和gmp-4.3.1,按照提示的处理:
“./configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib --with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib”
结果是configure通过,在make的时候出错,查看出错日志config.log,错误信息是说“error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory”,然后就认真检查了一下configure产生的makefile,发现路径已经被指定了,而且在指定的路径(usr/local/include)下也肯定有libmpfr.so.1文件,为什么还是失败。
(2)在网上搜索了一下,找不到原因,不过却找到一个可以通过的方法,如下所示:
######################################################################
    $ cd /path/to/gcc/tarball
    $ tar -xjf gcc-.tar.bz2
    $ cd gcc*
    $ tar -xjf ../gmp*
    $ tar -xjf ../mpfr*
    $ mv gmp* gmp
    $ mv mpfr* mpfr
######################################################################
(3)./configure --enable-languages=c,c++ (fortran 支持,不然出现下面错误)
错误信息:
/usr/include/bits/mathinline.h: Assembler messages:
/usr/include/bits/mathinline.h:6224: Error: symbol `fstat64' is already defined
/usr/include/bits/mathinline.h:7040: Error: symbol `lstat64' is already defined
/usr/include/bits/mathinline.h:7073: Error: symbol `stat64' is already defined
按照这样做,就是把gmp和mpfr放到gcc下然后./configure --enable-languages=c,c++, make & make install,却成功了。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/94861/showart_2016784.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP