LinuxSir.cn,穿越时空的Linuxsir!

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

求助:编译错误,FC2下。

[复制链接]
发表于 2004-5-24 12:55:29 | 显示全部楼层 |阅读模式
./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-3.3.1 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-5-25 00:22:08 | 显示全部楼层
你在编译啥东西?gcc?
--enable-languages=c 这个languase是语言还是编译器?

*** You must set the environment variable CC to a working compiler.
定义一下gcc的路径吧。
发表于 2004-6-18 10:50:42 | 显示全部楼层
定义gcc路径没有用处
设置环境变量按照新的方法
cat > ~/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
EOF
cat > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF
发表于 2004-6-18 11:22:06 | 显示全部楼层
我也是同样的系统,同样的问题
我按照说明设置了环境变量,也是出现这种问题,这时在编译gcc-core时出现的,请大家帮忙看看怎么解决。
发表于 2004-6-18 11:25:22 | 显示全部楼层
你按照我说的重新设置一下环境变量就好了,我的系统也是fc2
发表于 2004-6-18 11:31:54 | 显示全部楼层
谢谢您的帮助,但是我安装上面的重新设置后(我还是复制过去的)
还是一样的问题
不知和我一样问题的那位仁兄解决了没有
发表于 2004-6-18 12:19:04 | 显示全部楼层
有source ~/.bash_profile 吗?
发表于 2004-6-18 12:20:04 | 显示全部楼层
执行了
发表于 2004-6-18 12:50:30 | 显示全部楼层
奇怪, 我也是同样的问题就是这样子解决的阿
发表于 2004-6-18 15:03:52 | 显示全部楼层
虽然我在编译gcc时用上述方法解决了问题,但是在编译glibc第一遍的时候出现
sources/glibc-build/rt:/mnt/lfs/sources/glibc-build/resolv:/mnt/lfs/
sources/glibc-build/crypt:/mnt/lfs/sources/glibc-build/linuxthreads
/mnt/lfs/sources/glibc-build/sunrpc/rpcgen -Y ../scripts -c
rpcsvc/bootparam_prot.x -o
/mnt/lfs/sources/glibc-build/sunrpc/xbootparam_prot.T
Inconsistency detected by ld.so: rtld.c: 1180: dl_main: Assertion
`(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
make[2]: *** [/mnt/lfs/sources/glibc-build/sunrpc/xbootparam_prot.stmp]
Error 127
make[2]: Leaving directory
`/mnt/lfs/sources/glibc-2.3.3-20031202/sunrpc'
make[1]: *** [sunrpc/others] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.3.3-20031202'
make: *** [all] Error 2

后来在网上搜索发现,
>
> > I think you're going to run into a lot of problems here, because
> > you're essentially trying to "downgrade" your system. Your host has
> > newer binutils, newer headers, and probably various other bits that
> > the LFS-5.1-pre2 packages have not been tested against.
> >
> > I can't say for sure, but I suspect that the LFS team is not going to
> > be able to spend much time trying to get LFS-5.1 to build on hosts
> > that are already far ahead of the packages in 5.1 itself.
>
> If this is the case (that my fc2test3 is too new), no problem.  If it's
> useful to the  team, I'll plow ahead, reporting issues; if it's too new
> to be useful, I'll downgrade my host, perhaps to FC1 (it's only a test
> system, built a week ago.  No worries.)
>
> However, I thought by the glibc step that the builds should be just
> about isolated from the host.  If it's more trouble than worth at this
> point, I'll frop back 10 and punt.
>
> Thanks again,
> Jason
>
I think Kevin's right.  Nobody willingly downgrades the versions.  If
you're using fc2test3 then I imagine it should be a sensible host for
testing LFS-6.0.  That should be headed for release hot on the heels of
5.1, so I'm sure testing it will be useful.   As with all CVS builds,
watch out for the book changing under you.
看来我们应该用新版的lfs了,我现在在试 cvs 20040615,如果成功再报告
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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