RHEL5上升级GCC遇到的问题,gcc4.4.2 gcc4.4.3 错误

来源:互联网 发布:windows rs1好用吗 编辑:程序博客网 时间:2024/06/05 10:37

【转帖请注明出处:blog.csdn.net/lanmanck】

1、安装4.4.x需要2个库:GMP和MPFR,搜一下,有下载。

默认configure,默认make install

2、gcc4.4.x用默认的configure,结果make出来错误:

undefined reference to `mpfr_j0'

undefined reference to `mpfr_j1'

。。。

undefined reference to `mpfr_jn'

解决方法:

1>在configure的时候指定gmp和mpfr的路径

2>更改makefile,HOST-GMPLIBS = -lmpfr -lgmp 改成HOST-GMPLIBS = -L/usr/local/lib -lmpfr -lgmp

第二步需要make distclean,configure,改makefile,然后重新make。


3、又遇到错误:

checking for suffix of object files... configure: error: cannot compute suffix of object files:cannot compile
See 'config.log' for more details.

哎,开源的还真是麻烦。网上好像挺多这个问题,中文的博客没怎么说哦。

人家老外说了,configure的时候不会检查so文件路径,所以,解决方法是:

export LD_LIBRARY_PATH=/usr/local/lib

我的那2个库和动态链接文件均装到这个目录了。然后接着make即可!

 

4、继续错误,说fstats64之类的没定义,我靠,好像是libc有问题。这个升级非常麻烦,因为系统都要用到,搞不好就崩溃了。

反正我已经崩溃了,放弃吧~~~

原创粉丝点击