lfs 编译错误总结

在编译gcc的时候出现如下情况:
make[4]: Entering directory `/mnt/lfs/sources/gcc-build/gcc'
./xgcc -B./ -B/tools/x86_64-unknown-linux-gnu/bin/ -isystem /tools/x86_64-unknown-linux-gnu/include -isystem /tools/x86_64-unknown-linux-gnu/sys-include -L/mnt/lfs/sources/gcc-build/gcc/../ld -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I32 -I../../gcc-4.1.2/gcc -I../../gcc-4.1.2/gcc/32 -I../../gcc-4.1.2/gcc/../include -I../../gcc-4.1.2/gcc/../libcpp/include -m32 -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \
-c ../../gcc-4.1.2/gcc/crtstuff.c -DCRT_BEGIN \
-o 32/crtbegin.o
In file included from /usr/include/features.h:346,
from /usr/include/stdio.h:28,
from ../../gcc-4.1.2/gcc/tsystem.h:90,
from ../../gcc-4.1.2/gcc/crtstuff.c:68:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[4]: *** [32/crtbegin.o] Error 1
make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[3]: *** [extra32] Error 2
make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2
而我在CC="gcc -B/usr/bin/" ../gcc-4.1.2/configure --prefix=/tools \
    --with-local-prefix=/tools --disable-nls --enable-shared \
    --enable-languages=c 后面加上--disable-multilib就可以,查看下文档发现--disable-multilib选项是为了编译64位系统,而手把手教你如何建立自己的Linux 系统书上却没有提到,一定要编译64位吗?不知道如何解释,另外在之前的binutils编译过程中make结果中出现诸如Nothing to be done for "...." 虽然没有显示error,但是总感觉有点问题,到后面的话是会出现问题,有些人说只要不报错就继续,我实在是很不解?希望高手能帮忙解惑。。。

-----------------------------------------------------------------------------------

相关推荐