|
|
发表于 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都好几天了 还没好 郁闷中`
谢谢大家了 |
|