building LFS gcc compilation problem

Chris Staub chris at beaker67.com
Wed Jun 6 14:27:53 PDT 2007


mhenriquezs at terra.cl wrote:
> Hi to all:
> 
> This is my first post to the list, so let me say Hi to all and congratulation
> for such a great book, I allways think that build a linux system from point
> zero was a very dificulta task (I work with linux from 5 years ago), but
> your book is perfectly writing even for a beginner, I think that if all linux
> instruction are writed in this way, the people don't crash with linux so
> easy.
> 
> I follow you book instruction one-by-one and now I have a little problem
> with the compilation of gcc for the final building of my LFS system (the
> first pass of all toolschain finalize correctly without any problems), also
> all "checks" about "ld" and other recomended in the book pass correctly.
> Here is my info about the problem:
> 
> #LFS Book version
> 6.2
> NO DEVIATION FROM THE BOOK AT ALL
> 
> #gcc version in LFS
> root:/sources# gcc -v Reading specs from /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/specs
> Target: i686-pc-linux-gnu
> Configured with: ../gcc-4.0.3/configure --prefix=/tools --with-local-prefix=/tools
> --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit
> --enable-languages=c,c++ --disable-libstdcxx-pch
> Thread model: posix
> gcc version 4.0.3
> 
> #env command
> root:/sources/gcc-build# env
> TERM=xterm
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
> PWD=/sources/gcc-build
> PS1=\u:\w\$
> SHLVL=1
> HOME=/root
> _=/tools/bin/env
> OLDPWD=/sources/gcc-build
> 
> #Gcc Make error (page 97 of the PDF LFS 6.2 book)
> 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 directoryIn file included from /sources/gcc-build/gcc/include/syslimits.h:7,
>                  from /sources/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:
> /sources/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 `/sources/gcc-build/gcc'
> make: *** [all-gcc] Error 2
> 
> Sorry for such a begginer question, but I don't want to make a mistake solving
> this in the wronge way, I thinks that this is only a "Path" or missing file
> problem.
> 
> In advance, thank you very much.
> 
> Mauricio Henriquez, from Puerto Montt - Chili
>  
 From the output it looks like you're building GCC in chapter 6. It 
looks like either you applied the specs patch, or you forgot to remove 
the GCC source and build dirs as explained in the book.



More information about the lfs-support mailing list