LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   GCC in chroot failing to build, unable to find headers (https://www.linuxquestions.org/questions/linux-from-scratch-13/gcc-in-chroot-failing-to-build-unable-to-find-headers-553960/)

falt004 05-15-2007 12:32 AM

GCC in chroot failing to build, unable to find headers
 
Hi,

I am having a problem building GCC under the chroot environment (Chapter 6.12), similar to errors mentioned in two previous posts:-
http://www.linuxquestions.org/questi...d.php?t=444805
http://www.linuxquestions.org/questi...d.php?t=397346

The error, which occurs during the "make" step:-

Code:

In file included from ../../gcc-4.0.3/gcc/crtstuff.c:64:
../../gcc-4.0.3/gcc/tsystem.h:90:19: stdio.h: No such file or directory
../../gcc-4.0.3/gcc/tsystem.h:93:23: sys/types.h: No such file or directory
../../gcc-4.0.3/gcc/tsystem.h:96:19: errno.h: No such file or directory
../../gcc-4.0.3/gcc/tsystem.h:103:20: string.h: No such file or directory
../../gcc-4.0.3/gcc/tsystem.h:104:20: stdlib.h: No such file or directory
../../gcc-4.0.3/gcc/tsystem.h:105: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-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: limits.h: No such file ordirectory
In file included from ../../gcc-4.0.3/gcc/crtstuff.c:64:
../../gcc-4.0.3/gcc/tsystem.h:111: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

I am using the LFS Book 6.2 in conjunction with the LFS Live CD (lfslivecd-x86-6.2-5.iso). I'm installing LFS on a VMWare Player virtual machine.

So far I performed all the tests and the sanity checks that came before this step and they've been successful.

Oh, I also checked /usr/include and the headers seem to be there...

Any help would be appreciated :)

Cheers,
/Fuad

falt004 05-15-2007 10:16 PM

I think I figured out what the problem was. For the GCC source files I used the same as in building the second pass of GCC under section 5.11. In that section, Patch gcc-4.0.3-specs-1.patch was applied to remove /usr/include from GCC's search path.

When I came to 6.12 I just deleted the old build directory but used the same sources directory, with the applied patch. I deleted the old sources directory, and re-extracted it and and it's working fine now.

Anyway, just wanted to say that this book is great - thanks for all the hard work that went into writing it :)

Cheers,
/Fuad

jimmyjones 06-19-2007 11:24 PM

Thanks mate, you solved my problem!

legerdemain 07-25-2007 08:15 PM

thanks, solved my problem too

usertogo 08-03-2007 10:00 AM

It didnt solve mine...
 
I just installed linux for the first time again since ages. Kubuntu 7.04 and out of the box every configure or make that I tried failed with something like stdio.h : no such file or directory.
I last used linux at the times of Mandrake, and then I used to know how to find an rpm that contained what I needed, what do i do in case of Kubuntu?
Mandrake is no more right? :confused:


All times are GMT -5. The time now is 05:11 PM.