Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 05-15-2007, 12:32 AM   #1
LQ Newbie
Registered: May 2006
Location: Auckland, New Zealand
Distribution: Kubuntu 7.04
Posts: 3

Rep: Reputation: 0
Question GCC in chroot failing to build, unable to find headers


I am having a problem building GCC under the chroot environment (Chapter 6.12), similar to errors mentioned in two previous posts:-

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

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


Last edited by falt004; 05-15-2007 at 12:50 AM.
Old 05-15-2007, 10:16 PM   #2
LQ Newbie
Registered: May 2006
Location: Auckland, New Zealand
Distribution: Kubuntu 7.04
Posts: 3

Original Poster
Rep: Reputation: 0
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

Old 06-19-2007, 11:24 PM   #3
LQ Newbie
Registered: Sep 2005
Location: Australia
Distribution: Ubuntu 6.06
Posts: 12

Rep: Reputation: 0
Thanks mate, you solved my problem!
Old 07-25-2007, 08:15 PM   #4
LQ Newbie
Registered: Feb 2005
Posts: 1

Rep: Reputation: 0
thanks, solved my problem too
Old 08-03-2007, 10:00 AM   #5
LQ Newbie
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to find kernel headers such as kmalloc.h manish.ym Linux - Kernel 2 06-16-2010 11:00 AM
Glibc Unable to Find Kernel Headers Kenji Miyamoto Linux From Scratch 6 12-30-2008 04:03 PM
unable to find gcc mohtasham1983 Linux - Newbie 8 10-17-2006 12:24 PM
GCC 4.0.2 Chroot Build Unable to Find Headers Kenji Miyamoto Linux From Scratch 5 06-29-2006 03:34 AM
Build a 32 bit chroot? Tomex Fedora 1 11-14-2005 12:31 PM

All times are GMT -5. The time now is 02:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration