LinuxSir.cn,穿越时空的Linuxsir!

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

gcc第二遍出错

[复制链接]
发表于 2005-11-15 20:57:35 | 显示全部楼层 |阅读模式
宿主系统:红旗workstation 5.0
之前安装expect按LFS6.1所说提示TCLPATH没有头文件,就重新设置了下TCLPATH为tcl的源码目录。

在这之前的所有都事严格按LFS6.1所做,没有任何差错,包括调整工具链,还手动检查了gcc的specs文件。

错误信息:

checking for sbrk... yes
checking for gettimeofday... yes
checking for realpath... yes
checking for canonicalize_file_name... yes
checking for pstat_getstatic... no
checking for pstat_getdynamic... no
checking for sysmp... no
checking for getsysinfo... no
checking for table... no
checking for sysctl... yes
checking whether canonicalize_file_name must be declared... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... yes
checking for working strncmp... yes
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
make[1]: Entering directory `/mnt/lfs/gcc-build/gcc-build/libiberty'
if [ x"-fpic" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-3.4.3/libiberty/../include  -W -Wall -Wtraditional -pedantic -fpic ../../gcc-3.4.3/libiberty/regex.c -o pic/regex.o; \
else true; fi
In file included from ../../gcc-3.4.3/libiberty/../include/xregex.h:26,
                 from ../../gcc-3.4.3/libiberty/regex.c:195:
../../gcc-3.4.3/libiberty/../include/xregex2.h:548: warning: ISO C90 does not support `static' or type qualifiers in parameter array declarators
In file included from ../../gcc-3.4.3/libiberty/regex.c:649:
../../gcc-3.4.3/libiberty/regex.c: In function `byte_compile_range':
../../gcc-3.4.3/libiberty/regex.c:4548: warning: signed and unsigned type in conditional expression
../../gcc-3.4.3/libiberty/regex.c:4558: warning: signed and unsigned type in conditional expression
../../gcc-3.4.3/libiberty/regex.c:4558: warning: signed and unsigned type in conditional expression
../../gcc-3.4.3/libiberty/regex.c: In function `xregcomp':
../../gcc-3.4.3/libiberty/regex.c:8043: warning: signed and unsigned type in conditional expression
../../gcc-3.4.3/libiberty/regex.c: At top level:
../../gcc-3.4.3/libiberty/regex.c:8178: warning: unused parameter 'preg'
Assembler messages:
FATAL: can't create pic/regex.o: No such file or directory
make[1]: *** [regex.o] Error 1
make[1]: Leaving directory `/mnt/lfs/gcc-build/gcc-build/libiberty'
make: *** [all-libiberty] Error 2
发表于 2005-11-15 21:16:33 | 显示全部楼层
不知道是不是因为 红旗的gcc或者binutils没有把 regex 包括进去?

没碰到过这个问题。google也没什么很好的答案。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-15 21:56:18 | 显示全部楼层
问题解决了,原因是这样:
1.LFS6.1上已经说在编译gcc第一遍后可以删了源码目录
2.在编译第二遍的时候,LFS6.1是按照你已经删除了gcc第一遍的目录做的
3.我呢,gcc第一遍没有删除源码目录,因为有做出来LFS的留着说还有用
4.在编译gcc第二遍的时候,LFS6.1说应该在源码目录外再弄一个目录编译,我就在第一遍的gcc源码目录下又建了个gcc-build,这样就有两个目了/mnt/lfs/gcc-build/gcc-build
5.这样编译会出错,因为有两个相同的目录,具体原因由于我是新手,也不太清楚。
6.我是这样解决的:把第一遍gcc源码目录改名为gcc-build-old,然后就按照LFS6.1说的那样做,就成功了

最后,没什么技术含量。
呵呵,希望像我这样的新手不要犯同样的错误。
回复 支持 反对

使用道具 举报

发表于 2005-11-15 22:18:35 | 显示全部楼层
很多LFS新手犯过相似的错误,其实只好怪LFS手册没有直接写出安装时的绝对路径了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-15 22:30:55 | 显示全部楼层
我想正是这样才是魅力所在
都告诉你就没什么意思了
回复 支持 反对

使用道具 举报

发表于 2005-11-15 22:42:20 | 显示全部楼层
呵呵,所言甚是!
回复 支持 反对

使用道具 举报

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

本版积分规则

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