LinuxSir.cn,穿越时空的Linuxsir!

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

编译binutils出问题,求助

[复制链接]
发表于 2004-8-27 15:57:46 | 显示全部楼层 |阅读模式
请问怎么解决这个问题啊 gcc: installation problem, cannot exec `as': Too many levels of symbolic links
*** The command 'gcc -o conftest -O2   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
在LFS说明书里没有CC的设置啊,只有set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
到底是什么问题呢
发表于 2004-8-31 21:41:27 | 显示全部楼层
你已经做到了第几章了呢?
发表于 2004-8-31 21:43:29 | 显示全部楼层
1.如果是在第5章的话,那么可能是你的主系统的binutils版本太低或者是别的什么原因。
2.你并没有用lfs这个用户进行编译。
3.没有建立/tools这个连接。
你查找一下原因吧。呵呵。加油。
发表于 2004-8-31 23:26:26 | 显示全部楼层
Too many levels of symbolic links

肯定是以为 ln -s重复了,出现了错误。就是a指向b,b又指向a。
 楼主| 发表于 2004-9-1 00:52:33 | 显示全部楼层
不错,正是 LN -S 重复了,现在正常了,谢谢各会.
发表于 2004-9-1 22:30:35 | 显示全部楼层
我的也出错了:
[lfs@localhost gcc-build]$ ../gcc-3.3.1/configure  --prefix=/tools --with-local-prefix=/tools\
> --disable-nls --enable-shared\
> --enable-languages=c
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /mnt/lfs/sources/gcc-build using "mt-frag"
/tools/bin/ld: unrecognized option '--as-needed'
/tools/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2   conftest.c' failed.
*** You must set the environment variable CC to a working compiler
系统是FC2,第一次编译,我的也没提示ln -s 出错啊...
发表于 2004-9-1 22:36:36 | 显示全部楼层
连google都没见过你这个错误。。。问问斑竹吧。。。。。
发表于 2004-9-1 22:38:03 | 显示全部楼层
不会吧,这么惨:-(
发表于 2004-9-1 23:15:31 | 显示全部楼层
在GOOGLE里找到了答案:
FC2里的BINutils版本比要编译的高,晕.....
发表于 2004-9-1 23:18:12 | 显示全部楼层
>    * Here is the output:
>        Configuring for a i686-pc-linux-gnu host.
>        Created "Makefile" in /mnt/lfs/sources/gcc-build using "mt-frag"
>        /tools/bin/ld: unrecognized option '--as-needed'
>        /tools/bin/ld: use the --help option for usage information
>        collect2: ld returned 1 exit status
>        *** The command 'gcc -o conftest -g -O2   conftest.c' failed.
>        *** You must set the environment variable CC to a working compiler.

> I got rid of /tools symlink last time this happened and I didn't get this
> problem, but I had more problems later. So I thought I should start
> over, and
> make sure I was doing everything right before I asked questions.

You are doing everything right, except for searching the list archives
before reporting the problem. This problem has been discussed nearly
every week for the last couple of months, and the cause is that you are
using a host with newer tools than you are trying to build. Look at the
other threads for solutions.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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