LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1161|回复: 7

第六章--configure glibc时出错

[复制链接]
发表于 2006-3-28 18:00:49 | 显示全部楼层 |阅读模式
checking for gcc... gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See 'config.log' for more details.

查看 config.log ,有下面的错误
gcc: installation problem, cannot exec `/tools/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/as': No such file or directory
configure:2675: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| #define USE_REGPARMS 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2689: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

请大家帮帮忙 ,做LFS都好几天了 还没好 郁闷中`
谢谢大家了
 楼主| 发表于 2006-3-28 18:03:47 | 显示全部楼层
gcc: installation problem, cannot exec `/tools/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/as': No such file or directory
但我看了 有这个文件呀!gcc版本应该没问题吧 是2.3.4的
回复 支持 反对

使用道具 举报

发表于 2006-3-28 18:14:10 | 显示全部楼层
或许你需要把 binutils pass 2 (chapter5) 再来一遍
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-28 23:05:32 | 显示全部楼层
binutils pass 2 (chapter5) 再来一遍 会不会影响以前做的呀?
回复 支持 反对

使用道具 举报

发表于 2006-3-29 09:21:48 | 显示全部楼层
不会,它只是一些工具(linker,assembly...),注意路径和库的选择。
回复 支持 反对

使用道具 举报

发表于 2006-7-27 10:41:56 | 显示全部楼层

使用静态编译的gcc就没有问题了

我也碰到了这个错误,不过实在没有时间也没有兴趣回头重复编译一遍

我推荐的方法:
直接在lfs用户编译的时候,再把gcc给静态编译一次,也就是
../gcc-2.4/configure **** 之后,在gcc-build目录下面生成了Makefile
将Makefile里面的CFLAGS_FOR_BUILD补充一个--static

重新编译以后,gcc就可以正常运行了

错误回放一遍:
在lfs用户下面,gcc -v,
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.1-static/configure --prefix=/tools/gcc-4.1.1 --libexecdir=/tools/lib --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch
Thread model: posix
gcc version 4.1.1

正确
chroot以后,gcc -v
结果得到的却是:no such file or directory

使用strace 跟踪以后发现execv("/tools/bin/gcc","-v"***)的时候出错,报没有找到这个文件。但是该文件确实存在

所以定位不了问题,就多半是动态链接库的问题,干脆改成静态链接的好了,反正我只是要新版本的glibc,gcc的大小我不关心



Post by felix.tong
checking for gcc... gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See 'config.log' for more details.

查看 config.log ,有下面的错误
gcc: installation problem, cannot exec `/tools/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/as': No such file or directory
configure:2675: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| #define USE_REGPARMS 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2689: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

请大家帮帮忙 ,做LFS都好几天了 还没好 郁闷中`
谢谢大家了
回复 支持 反对

使用道具 举报

发表于 2006-7-27 20:20:23 | 显示全部楼层
如果正确编译的话,是不需要静态编译的。
回复 支持 反对

使用道具 举报

发表于 2006-7-27 21:25:16 | 显示全部楼层
在第六章就更不应该用静态编译了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表