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

Mag. Leonhard Landrock 1977-Hamlet at gmx.at
Wed May 17 14:12:06 PDT 2006


Hi Dan!

First of all: Thank you for so much care.

Am Dienstag, 16. Mai 2006 22:57 schrieb Dan Nicholson:
> On 5/16/06, Mag. Leonhard Landrock <1977-Hamlet at gmx.at> wrote:
> > echo | /sources/gcc-build/gcc/cc1 -v
> > ignoring nonexistent directory
> > "/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/include" ignoring nonexistent
> > directory "/usr/lib/../i686-pc-linux-gnu/include" #include "..." search
> > starts here:
> > #include <...> search starts here:
> >  /usr/local/include
> > End of search list.
>
> This seems to be the problem.  I'm not the gcc expert, but
> /usr/include should be there after /usr/local/include.  I'm looking at
> the source at cppdefault.c, and it looks like the only way
> /usr/include wouldn't be included is if the build thought you were
> creating a cross compiler.  But then I don't think you would have
> /usr/local/include in the path either.
>
> This might be a dead end I'm leading you down, but could you find the
> part in the build log where cppdefault.o is compiled?

I'm not sure wehter I did it the right way. I did the following to get the 
build log:

make > GCC.LOG | >> GCC.LOG | >> GCC.LOG | >> GCC.LOG | >> GCC.LOG | >> 
GCC.LOG

BTW: Is there any better way?

> It should be 
> pretty long and pass a bunch of -D preprocessor directives.  You can
> search for '-o cppdefault.o' and look above it.  Mine looks like this
> from a successful build (wrapping might screw this up really bad):
>
> gcc   -g -O2  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
> -Wold-style-definition -fomit-frame-pointer -DHAVE_CONFIG_H -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     \
>   -DGCC_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/include\"
> -DGPLUSPLUS_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../..`
>echo /usr | sed -e 's|^/usr||' -e 's|/[^/]*|/..|g'`/include/c++/4.0.3\"
> -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../.
>./..`echo /usr | sed -e 's|^/usr||' -e
> 's|/[^/]*|/..|g'`/include/c++/4.0.3/i686-pc-linux-gnu\"
> -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../
>../../..`echo /usr | sed -e 's|^/usr||' -e
> 's|/[^/]*|/..|g'`/include/c++/4.0.3/backward\"
> -DLOCAL_INCLUDE_DIR=\"/usr/local/include\"
> -DCROSS_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686
>-pc-linux-gnu/sys-include\"
> -DTOOL_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-
>pc-linux-gnu/include\" \
>   -c ../../gcc-4.0.3/gcc/cppdefault.c -o cppdefault.o

This is the result:

gcc   -g -O2  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
 -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
 -Wold-style-definition   -fomit-frame-pointer -DHAVE_CONFIG_H -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     \
  -DGCC_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/include\"
 -DGPLUSPLUS_INCLUDE_DIR=\
"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../..`echo /usr | sed -e 's|
^/usr||' -e 's|/[^/]*|/..|
g'`/include/c++/4.0.3\" -DGPLUSPLUS_TOOL_INCLUDE_DIR=
\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../..`echo /usr | sed -e 's|
^/usr||' -e 's|/[^/]*|/..|
g'`/include/c++/4.0.3/i686-pc-linux-gnu\" -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\
"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../..`echo /usr | sed -e 's|
^/usr||' -e 's|/[^/]*|/..|
g'`/include/c++/4.0.3/backward\" -DLOCAL_INCLUDE_DIR=\"/usr/local/include\"
 -DCROSS_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/sys-include\"
 -DTOOL_INCLUDE_DIR=\"/usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/include\"  
\
  -c ../../gcc-4.0.3/gcc/cppdefault.c -o cppdefault.o

Of course line breaks are made by myself (for a hopefully better reading).

The whole log file has 192K, but I have interrupted the build process after 
some time after I had found the right line.

I'll try an diff on the two outputs tomorrow. I have to finish for today .

> --
> Dan

Best regards,
Leonhard.

PS: Might it be an idea to do the build of gcc outside the chroot environment?



More information about the lfs-support mailing list