Errors while compiling GCC

Chris Staub chris at beaker67.com
Tue Oct 17 08:36:06 PDT 2006


Denis Silin wrote:
> Hello.
> I downloaded gcc-4.0.3, applied a patch gcc-4.0.3-specs-1.patch (patch -p1 <gcc-4.0.3-specs-1.patch in gcc-4.0.3 folder), configured it like this
> ../gcc-4.0.3/configure --prefix=/tools --with-local-prefix=/tools --disable-nls --enable-shared --enable-languages=c
> All like in the book. 
> 
> There is an error like that. 
> 
> 
> 
> /bin/sh ../../gcc-4.0.3/gcc/mkconfig.sh tconfig.h
> /mnt/lfs/gcc-build/gcc/xgcc -B/mnt/lfs/gcc-build/gcc/ -B/tools/i686-pc-linux-gnu/bin/ -B/tools/i686-pc-linux-gnu/lib/ -isystem /tools/i686-pc-linux-gnu/include -isystem /tools/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-4.0.3/gcc -I../../gcc-4.0.3/gcc/. -I../../gcc-4.0.3/gcc/../include -I../../gcc-4.0.3/gcc/../libcpp/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-4.0.3/gcc/crtstuff.c -DCRT_BEGIN \
>   -o crtbegin.o
> In file included from ../../gcc-4.0.3/gcc/crtstuff.c:64:
> ../../gcc-4.0.3/gcc/tsystem.h:90:19: error: stdio.h: No such file or directory
> ../../gcc-4.0.3/gcc/tsystem.h:93:23: error: sys/types.h: No such file or directory
> ../../gcc-4.0.3/gcc/tsystem.h:96:19: error: errno.h: No such file or directory
> ../../gcc-4.0.3/gcc/tsystem.h:103:20: error: string.h: No such file or directory
> ../../gcc-4.0.3/gcc/tsystem.h:104:20: error: stdlib.h: No such file or directory
> ../../gcc-4.0.3/gcc/tsystem.h:105:20: error: unistd.h: No such file or directory
> In file included from /mnt/lfs/gcc-build/gcc/include/syslimits.h:7,
>                  from /mnt/lfs/gcc-build/gcc/include/limits.h:11,
>                  from ../../gcc-4.0.3/gcc/tsystem.h:108,
>                  from ../../gcc-4.0.3/gcc/crtstuff.c:64:
> /mnt/lfs/gcc-build/gcc/include/limits.h:122:61: error: limits.h: No such file or directory
> In file included from ../../gcc-4.0.3/gcc/crtstuff.c:64:
> ../../gcc-4.0.3/gcc/tsystem.h:111:18: error: time.h: No such file or directory
> make[1]: *** [crtbegin.o] Error 1
> make[1]: Leaving directory `/mnt/lfs/gcc-build/gcc'
> make: *** [all-gcc] Error 2
> lfs:/mnt/lfs/gcc-build$
> 
> 
> What can I do with it?

I assume you are doing GCC Pass 1. If so, the book does NOT tell you to 
use the specs patch for that installation. Please read the book more 
carefully and only apply patches when and if it says to. Remove the GCC 
source and build dirs and try again, making sure to follow the book's 
directions.



More information about the lfs-support mailing list