Installing GCC-3.2 problem.

Goldman Michael sgmm at math.technion.ac.il
Mon Sep 9 08:45:40 PDT 2002



> Goldman Michael wrote:
>
> >
> > Book version : cvs 20020907
> > Chapter 6 : Installing GCC-3.2
> > Mother system is KNOPPIX Linux on CD (Based on Debian) with
> > gcc 2.95.4, glibc-2.2.5, kernel-2.4.19-xfs.
> >
> > I completed all previous steps without any problems.
> >
> > While compiling GCC I have the following error :
> >
> >   gcc -c -DHAVE_CONFIG_H -g -O2 -I.
> >   -I../../gcc-3.2/libiberty/../include
> > -W -Wall -Wtraditional -pedantic -fpic
> > ../../gcc-3.2/libiberty/cplus-dem.c -o pic/cplus-dem.o; \
> > else true; fi
> > In file included from ../../gcc-3.2/libiberty/cplus-dem.c:41:
> > /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/stdio.h:561:30:
> > bits/sys_errlist.h: No such file or directory
> >
> > make[1]: *** [cplus-dem.o] Error 1
> > make[1]: Leaving directory `/temp/gcc-build/libiberty'
> > make: *** [all-libiberty] Error 2
> >
>
> Yes gcc depends on glibc, but you have built this.  gcc
> keeps all its private files in
> /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/ for the static build
> On normal buids it will be
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2/
>
> When gcc builds it tries to fix the header files of your disto
> and puts the results in that 3.2/include directory.  There is
> a clash between your base disto and gcc.  The fixed header wants
> /usr/include/bits/sys_errlist.h and you do not have this
>
> Therefore try the following
> mv /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/stdio.h
> /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/stdio.bak
>
> Then go into gcc-build and repeat the
> make bootstrap

Following your example I've got the following
root:/temp/gcc-build# make  bootstrap
make[1]: Entering directory `/temp/gcc-build/libiberty'
make[2]: Entering directory `/temp/gcc-build/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/temp/gcc-build/libiberty/testsuite'
make[1]: Leaving directory `/temp/gcc-build/libiberty'
Bootstrapping the compiler
make[1]: Entering directory `/temp/gcc-build/gcc'
make CC="gcc" libdir=/usr/lib LANGUAGES="c " \
        CFLAGS="-g " MAKEINFO="makeinfo " \
        MAKEINFOFLAGS=""
make[2]: Entering directory `/temp/gcc-build/gcc'
gcc -c -DIN_GCC    -g  -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
-DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I../../gcc-3.2/gcc
-I../../gcc-3.2/gcc/. -I../../gcc-3.2/gcc/config
-I../../gcc-3.2/gcc/../include ../../gcc-3.2/gcc/gengenrtl.c -o
gengenrtl.o
In file included from ../../gcc-3.2/gcc/gengenrtl.c:23:
../../gcc-3.2/gcc/system.h:341: conflicting types for `getrlimit'
/usr/include/sys/resource.h:52: previous declaration of `getrlimit'
../../gcc-3.2/gcc/system.h:352: conflicting types for `setrlimit'
/usr/include/sys/resource.h:72: previous declaration of `setrlimit'
make[2]: *** [gengenrtl.o] Error 1
make[2]: Leaving directory `/temp/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/temp/gcc-build/gcc'
make: *** [bootstrap] Error 2


And that is by the way, the same error I've got when tried to run
make CC="gcc -I/usr/include" bootstrap
(trying to fix previous case)

Thanks a lot for you time anyway!

>
> Chris
>
> >
> > I have feeling that compilation of gcc requires existence of
> > previously compiled glibc libraries (Am I right?) But somehow
> > current gcc (compiled in chapter 5) does not see that new
> > libraries/includes in /usr/include and /usr/lib, but goes to that
> > strange directory where they were placed by fixinclude while
> > compiling gcc in chapter 5 (As far as I understood in README located
> > in that dir). Of course there are only part of include files there,
> > that's why it fails (I think).
> >
>
> --
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe lfs-dev' in the subject header of the message
>

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



More information about the lfs-dev mailing list