glibc configure problem (no GNU CC or cannot exec cpp0)

David Nordenberg dna at
Fri Nov 9 07:32:00 PST 2001

Hello, I just run into the same problem as Elmar Weber wrote in

I have followed the lfs cvs version 20011105 and installed every software
exactly as it said in the text and when I chrooted to $LFS and are about to
configure glibc it fail with this message:

loading cache ./config.cache
checking host system type... i586-pc-linux-gnu
checking sysdep dirs... sysdeps/i386/elf
linuxthreads/sysdeps/unix/sysv/linux linuxthreads/sysdeps/pthread
sysdeps/pthread linuxthreads/sysdeps/unix/sysv linuxthreads/sysdeps/unix
linuxthreads/sysdeps/i386/i586 linuxthreads/sysdeps/i386
sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu
sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet
sysdeps/unix/sysv/i386 sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix
sysdeps/posix sysdeps/i386/i586 sysdeps/i386/i486 sysdeps/i386/fpu
sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96
sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754
sysdeps/generic/elf sysdeps/generic
checking for a BSD compatible install... /bin/install -c
checking whether ln -s works... yes
checking for pwd... /bin/pwd
checking build system type... i586-pc-linux-gnu
checking for gcc... gcc
checking version of gcc... 2.95.3, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.79.1, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... no
checking for makeinfo... makeinfo
checking version of makeinfo... 4.0, ok
checking for gsed... no
checking for sed... sed
checking version of sed... 3.02, ok
checking whether the C compiler (gcc  ) works... no
checking whether the C compiler (gcc  ) is a cross-compiler... (cached) yes
checking whether we are using GNU C... no
configure: error: GNU libc must be compiled using GNU CC

And this is the output when I type file $LFS/usr/bin/gcc from my host os
(slackware 8):
/usr/bin/gcc: ELF 32-bit LSB executable, Intel 80386, version 1, statically
linked, not stripped

It was compiles with gcc 2.95.3 and statically linked against slackware's
glibc 2.2.3. I really don't want to try the solution that worked for Elmar,
(start allover again) cause compiling everything takes 2 days on my slow
computer :( One thing may be worth to mention, I switched to kernel 2.4.14
and changed the default architecture of the kernel from i686 to i586 it that
should make any mather? Oh, I just discovered that there is a config.log in
my glibc-build directory, it sais:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:914: checking host system type
configure:1065: checking sysdep dirs
configure:1288: checking for a BSD compatible install
configure:1345: checking whether ln -s works
configure:1374: checking for pwd
configure:1413: checking build system type
configure:1441: checking for gcc
configure:1475: checking version of gcc
configure:1495: checking for gnumake
configure:1495: checking for gmake
configure:1495: checking for make
configure:1529: checking version of make
configure:1558: checking for gnumsgfmt
configure:1558: checking for gmsgfmt
configure:1558: checking for msgfmt
configure:1612: checking for makeinfo
configure:1646: checking version of makeinfo
configure:1666: checking for gsed
configure:1666: checking for sed
configure:1700: checking version of sed
configure:1718: checking whether the C compiler (gcc ) works
configure:1737: gcc -o conftest conftest.c 1>&5
gcc: installation problem, cannot exec `cpp0': No such file or directory
configure: failed program was:

#line 1732 "configure"
#include "confdefs.h"

configure:1768: checking whether the C compiler (gcc ) is a cross-compiler
configure:1780: checking whether we are using GNU C
configure:1789: gcc -E conftest.c
gcc: installation problem, cannot exec `cpp0': No such file or directory

I found cpp0 in $LFS/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/cpp0 so I made
a symbolic link from usr/bin/cpp0 to it and now ot works, was that symlink
missing from the lfs instructions or is it the wrong way to do it?

Regards David Nordenberg

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list