LinuxSir.cn,穿越时空的Linuxsir!

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

1st time gcc complie error

[复制链接]
发表于 2004-11-24 19:36:34 | 显示全部楼层 |阅读模式
lfs:/mnt/lfs/sources/gcc-build$../gcc-3.3.3/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.
 楼主| 发表于 2004-11-24 20:00:20 | 显示全部楼层
第一次编译binutils没有出现什么问题 可以通过
怎么一到 gcc3.3.3就出问题了呢?
不知道是那里的环境变量没有设置好?
发表于 2004-11-24 20:37:25 | 显示全部楼层
用一下 which cc
看看是否存在。如果不存在就用
ln -sf /usr/bin/gcc /usr/bin/cc
这样看看行不。
 楼主| 发表于 2004-11-24 21:17:56 | 显示全部楼层
which cc

/usr/bin/cc

系统中已经有cc 而且which命令也能找到阿
发表于 2004-11-24 22:49:25 | 显示全部楼层
you could cp your /usr/bin/ld to the path(/mnt/lfs/tools/bin), it could be fixed.
发表于 2004-11-24 22:52:08 | 显示全部楼层
看出来了。
可以肯定是前面的binutils安装不正确。
发表于 2004-11-24 23:05:58 | 显示全部楼层
i don't know,i make install the binutils package three times,i think it's not wrong with anyting,but when i make the next package(gcc),it was stoped like above,after i copied /usr/bin/ld to /mnt/lfs/tools/bin,it worked well.
 楼主| 发表于 2004-11-24 23:20:20 | 显示全部楼层
duanxiangqaz:  照你说的办法
../gcc-3.3.3/configure  过去了

前面的步骤究竟是那一步错了呢?
我担心后面 还有更大的问题出来
 楼主| 发表于 2004-11-24 23:22:47 | 显示全部楼层
版主: 我一开始按 5.0 的文档作
后来按5.1.1 的文档作了2遍都是同样的问题。
而且我也仔细检查过每一步 作了3次。
发表于 2004-11-24 23:34:28 | 显示全部楼层
我和你一样的,你的编译环境是什么.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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