gcc/chroot - update

Barry barry at hartford.uconn.edu
Tue Jan 2 07:20:30 PST 2001

I meant to send this out on Saturday, but had problems sending mail
through my work address from home...

long story...don't ask... The problem exists in Novell admins here at

but here it is, my response to the quote here...late, but not missing: 

Bill Suit wrote:
> In my ongoing attempts to install gcc in the chroot env, I have just removed
> linux-2.2.17, dnld it again, and installed it by the book!(out of chroot); I
> dnld glibc-2.1.3 and re-installed it (out of chroot); I again attempted to
> install, in chroot, gcc-2.95.2 and wound up with this message:
> creating Makefile
> make[1]: Entering directory `/usr/src/gcc-build/libiberty'
> test x"yes" != xyes || \
>   gcc -c -DHAVE_CONFIG_H -march=i586 -I.
> -I../../gcc-2.95.2/libiberty/../include  -fpic
> ../../gcc-2.95.2/libiberty/mkstemps.c -o pic/mkstemps.o
> In file included from ../../gcc-2.95.2/libiberty/mkstemps.c:30:
> /usr/include/stdio.h:33: stddef.h: No such file or directory
> /usr/include/stdio.h:38: stdarg.h: No such file or directory
> In file included from /usr/include/stdio.h:40,
>                  from ../../gcc-2.95.2/libiberty/mkstemps.c:30:
> /usr/include/bits/types.h:29: stddef.h: No such file or directory
> In file included from /usr/include/libio.h:30,
>                  from /usr/include/stdio.h:57,
>                  from ../../gcc-2.95.2/libiberty/mkstemps.c:30:
> /usr/include/_G_config.h:14: stddef.h: No such file or directory
> In file included from /usr/include/stdio.h:57,
>                  from ../../gcc-2.95.2/libiberty/mkstemps.c:30:
> /usr/include/libio.h:48: stdarg.h: No such file or directory
> In file included from /usr/include/bits/fcntl.h:25,
>                  from /usr/include/fcntl.h:33,
>                  from ../../gcc-2.95.2/libiberty/mkstemps.c:31:
> /usr/include/sys/types.h:125: stddef.h: No such file or directory
> make[1]: *** [mkstemps.o] Error 1
> make[1]: Leaving directory `/usr/src/gcc-build/libiberty'
> make: *** [all-libiberty] Error 2
> root:/usr/src/gcc-build#
> Have I made any progress? TIA, Bill

nope, you're still missing stddef.h ...

in fact, it seems like it can't find any of the headers...

in the last message, the symlink that you claimed that you made was
"linux -2.2.17 to linux"

if this is EXACTLY what you typed it is incorrect...although if you had
typed it in at the command prompt in that exact fashion, you would have
gotten an error.  So, either there's a typo in your previous e-mail or
there is no symlink...

perhaps at this point a little rationale for our advice is necessary...

when gcc is run, it looks for the header files in the header path.  This
is generally the location of gcc's header library or any standard
headers in /usr/include from glibc.

someone correct me if I'm wrong, but I believe that gcc searches first
in /usr/include...

without header files, C/C++ really is much of a language... it's
functions are largely defined in header files... so, without stdio.h,
for instance, C doesn't even know what printf() is...

so, any reference to simply '#include <stddef.h>' in a C program refers
to stddef.h in /usr/include, or in the gcc header library if it doesn't
exist in /usr/include...

where am I going with this? - Well, gcc can't find the file so something
is wrong with the reference to the file...I believe that Gerard did this
earlier in the thread, but I decided to check out the header file
types.h myself looking for the reference to stddef.h and it is refered
as simply #include <stddef.h>

on a hunch, I just looked back in the archives and found something...
the contents of your find for stddef.h:

[root at hb1 src]# cd /mnt/lfs 
[root at hb1 lfs]# find / -name stddef.h 
find: /mnt/cdrom: Input/output error 
find: /mnt/floppy: Input/output error 
find: /proc/5/fd: Permission denied 
[root at hb1 lfs]# 

note the line '/mnt/lfs/usr/src/gcc-2.95.2/gcc/ginclude/stddef.h'

this is significant because this is in your gcc source tree, not in
/usr/lib/gcc-lib/ix86-pc-linux-gnu/2.95.2/include/stddef.h like it
should be...

try another find in the chroot'ed environment for stddef.h

I'd be interested to see if this is still the case...if so, it means
that your gcc header files were never installed!

please write back with this info... :)

re-installing gcc staticly may be necessary...

Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message

More information about the blfs-support mailing list