LinuxSir.cn,穿越时空的Linuxsir!

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

Chapter 6. Installing Basic System Software:6.14. GCC-3.4.1出错!求救!

[复制链接]
发表于 2005-1-10 17:25:37 | 显示全部楼层 |阅读模式
今天第一次安装LFS,在第六章编译GCC出错,
出错信息如下:

[PHP]SHLIB_MKMAP_OPTS='' \
SHLIB_MAPFILES='../../gcc-3.4.1/gcc/libgcc-std.ver ../../gcc-3.4.1/gcc/config/libgcc-glibc.ver' \
SHLIB_NM_FLAGS='-pg' \
MULTILIB_OSDIRNAMES='' \
mkinstalldirs='/bin/sh ../../gcc-3.4.1/gcc/mkinstalldirs' \
  /bin/sh mklibgcc > tmp-libgcc.mk
mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="ansidecl.h" DEFINES="" \
/bin/sh ../../gcc-3.4.1/gcc/mkconfig.sh tconfig.h
/sources/gcc-build/gcc/xgcc -B/sources/gcc-build/gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem/usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -O2 -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc-3.4.1/gcc -I../../gcc-3.4.1/gcc/. -I../../gcc-3.4.1/gcc/../include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer \
   -c ../../gcc-3.4.1/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
In file included from ../../gcc-3.4.1/gcc/crtstuff.c:62:
../../gcc-3.4.1/gcc/tsystem.h:79:19: stdio.h: No such file or directory
../../gcc-3.4.1/gcc/tsystem.h:82:23: sys/types.h: No such file or directory
../../gcc-3.4.1/gcc/tsystem.h:85:19: errno.h: No such file or directory
../../gcc-3.4.1/gcc/tsystem.h:92:20: string.h: No such file or directory
../../gcc-3.4.1/gcc/tsystem.h:93:20: stdlib.h: No such file or directory
../../gcc-3.4.1/gcc/tsystem.h:94:20: unistd.h: No such file or directory
In file included from /sources/gcc-build/gcc/include/syslimits.h:7,
                 from /sources/gcc-build/gcc/include/limits.h:11,
                 from ../../gcc-3.4.1/gcc/tsystem.h:97,
                 from ../../gcc-3.4.1/gcc/crtstuff.c:62:
/sources/gcc-build/gcc/include/limits.h:122:61: limits.h: No such file or directory
In file included from ../../gcc-3.4.1/gcc/crtstuff.c:62:
../../gcc-3.4.1/gcc/tsystem.h:100:18: time.h: No such file or directory
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/sources/gcc-build/gcc'
make: *** [all-gcc] Error 2[/PHP]

gcc-build目录在/sources目录下,../../gcc-3.4.1怎么会有这个目录存在??难道需要自己建立?希望大家帮忙,谢谢了!!!
 楼主| 发表于 2005-1-10 17:51:06 | 显示全部楼层
问题解决~
没按LFS-BOOK上来,多打了个patch:
gcc-3.4.1-linkonce-1.patch

不过我在第五章的时候也打了这个patch,为什么没有出问题?还有就是../../这个代表什么,好像不应该是 上层目录/上层目录 的意思~
发表于 2005-1-10 17:56:42 | 显示全部楼层
mkdir ../gcc-build
cd ../gcc-build

../gcc-3.4.1/configure --prefix=/usr \
    --libexecdir=/usr/lib --enable-shared \
    --enable-threads=posix --enable-__cxa_atexit \
    --enable-clocale=gnu --enable-languages=c,c++
make
是完全按照这个做的吗?
gcc-3.4.1 和gcc-build位于同级目录中.

Unpack both the gcc-core and the gcc-g++ tarballs—they will unpack into the same directory. Likewise, extract the gcc-testsuite package.
这里说的包都解压了吗?
 楼主| 发表于 2005-1-10 18:02:29 | 显示全部楼层
全部都做了,三个包全部解压,build目录和src目录是同级,唯一一点不同就是第一次打了gcc-3.4.1-linkonce-1.patch
,第二次没打,至于命令肯定不会敲出,我是copy+paste,而且paste完了还对着检查一边,避免copy掉开头或者结尾的一个符号~~~
发表于 2005-1-10 18:15:39 | 显示全部楼层
Post by gosapphire
问题解决~
没按LFS-BOOK上来,多打了个patch:
gcc-3.4.1-linkonce-1.patch

不过我在第五章的时候也打了这个patch,为什么没有出问题?还有就是../../这个代表什么,好像不应该是 上层目录/上层目录 的意思~


第6章这个patch是需要打的阿 :ask
gcc-3.4.1-linkonce-1.patch

我每次都打的。可能还是目录的问题吧.
../../就是上层目录的意思。
 楼主| 发表于 2005-1-10 18:24:49 | 显示全部楼层
不好意思,我打错了文件名,我多打了这个gcc-3.4.1-specs-1.patch~~~晕了~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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