LFS Version SVN-20060501 - GCC-4.0.3 - compilation fails

Mag. Leonhard Landrock 1977-Hamlet at gmx.at
Mon May 15 14:26:43 PDT 2006


Hi once again!

Am Sonntag, 14. Mai 2006 23:05 schrieb Mag. Leonhard Landrock:
> Am Sonntag, 14. Mai 2006 20:41 schrieb Dan Nicholson:
> > That's correct.
> >
> > Can you try this other sanity check that will actually tell us
> > something useful about how it's searching for the headers.
> >
> > cat > dummy.c << "EOF"
> > #include <stdio.h>
> > main(){}
> > EOF
> >
> > cc -H dummy.c
> >
> > That should show you the trail of headers it picks up.
>
> Here come's the result:
>
> . /tools/include/stdio.h
> .. /tools/include/features.h
> ... /tools/include/sys/cdefs.h
> ... /tools/include/gnu/stubs.h
> .. /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/stddef.h
> .. /tools/include/bits/types.h
> ... /tools/include/bits/wordsize.h
> ... /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/stddef.h
> ... /tools/include/bits/typesizes.h
> .. /tools/include/libio.h
> ... /tools/include/_G_config.h
> .... /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/stddef.h
> .... /tools/include/wchar.h
> ..... /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/stddef.h
> ..... /tools/include/bits/wchar.h
> .... /tools/include/gconv.h
> ..... /tools/include/wchar.h
> ...... /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/stddef.h
> ..... /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/stddef.h
> ... /tools/lib/gcc/i686-pc-linux-gnu/4.0.3/include/stdarg.h
> .. /tools/include/bits/stdio_lim.h
> .. /tools/include/bits/sys_errlist.h

As there is another poster with the same problem 
(http://linuxfromscratch.org/pipermail/lfs-support/2006-May/030783.html) I am 
sure that there is a general solution to solve the problem. :-)

Beside the test sugested by Dan Nicholson I did the following today:

1.) Just another "make"

make[1]: Entering directory `/sources/gcc-build/libcpp'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/sources/gcc-build/libcpp'
make[1]: Entering directory `/sources/gcc-build/gcc'
/sources/gcc-build/gcc/xgcc -B/sources/gcc-build/gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/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 /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

OK. 

2.) Within the "chroot environment" I 
did "/sources/gcc-build/gcc/xgcc -print-search-dirs"

programs: =/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/:
/sources/gcc-build/gcc/../lib/gcc/:/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/:
/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/:
/usr/lib/gcc/i686-pc-linux-gnu/:
/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/:
/usr/lib/gcc/i686-pc-linux-gnu/:
/usr/libexec/gcc/i686-pc-linux-gnu/4.0.3/:
/usr/libexec/gcc/i686-pc-linux-gnu/:
/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/:
/usr/lib/gcc/i686-pc-linux-gnu/:
/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/i686-pc-linux-gnu/4.0.3/:
/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/:
/usr/lib/../i686-pc-linux-gnu/bin/i686-pc-linux-gnu/4.0.3/:
/usr/lib/../i686-pc-linux-gnu/bin/

libraries: =/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/:
/sources/gcc-build/gcc/../lib/gcc/:/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/:
/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/:
/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/4.0.3/:
/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/lib/:
/usr/lib/../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/4.0.3/:
/usr/lib/../i686-pc-linux-gnu/lib/:
/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/../../../i686-pc-linux-gnu/4.0.3/:
/sources/gcc-build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.3/../../../:
/usr/lib/i686-pc-linux-gnu/4.0.3/:
/usr/lib/:/lib/i686-pc-linux-gnu/4.0.3/:
/lib/:
/usr/lib/i686-pc-linux-gnu/4.0.3/:
/usr/lib/

Looking for "stdio.h" for example "xgcc" is definitely right. Within 
the "chroot environment" "stdio.h" can be found at this places:

*) /sources/gawk-3.1.5/pc/include/stdio.h
*) /sources/gcc-4.0.3/fixincludes/tests/base/stdio.h
*) /sources/gcc-4.0.3/gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h
*) /sources/gcc-4.0.3/libstdc++-v3/include/c_compatibility/stdio.h
*) /sources/glibc-2.3.6/include/stdio.h
*) /sources/glibc-2.3.6/libio/stdio.h
*) /sources/glibc-2.3.6/libio/bits/stdio.h
*) /sources/perl-5.8.8/mint/stdio.h
*) /tools/include/stdio.h
*) /tools/include/bits/stdio.h
*) /usr/include/stdio.h
*) /usr/include/bits/stdio.h

Now my question is where has the "stdio.h" to be found and which path 
should "/sources/gcc-build/gcc/xgcc" search within.

Kind regards,
Leonhard.



More information about the lfs-support mailing list