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,却成功了。
阅读(1860) | 评论(0) | 转发(0) |