LFS 6.2 Chapter 6 step 6.9 glibc-2.3.6 configure can't link to gcc

Mike Murfin mike_murfin at hotmail.com
Sun Aug 20 08:32:33 PDT 2006

> Date: Sun, 20 Aug 2006 09:42:59 -0400
> From: chris at beaker67.com
> To: lfs-support at linuxfromscratch.org
> Subject: Re: LFS 6.2 Chapter 6 step 6.9 glibc-2.3.6 configure can't link to gcc
> Mike Murfin wrote:
> > Hi.
> > 
> > When I run the configure script, it fails with the message:  "error: cannot compute suffix of object files"
> > 
> > In config.log, I have:
> > 
> > configure:2361: checking for gcc
> > configure:2377: found /tools/bin/gcc
> > configure:2387: result: gcc
> > configure:2631: checking for C compiler version
> > configure:2634: gcc --version </dev/null/>&5
> > ../glibc-2.3.6/configure: line 2635: /tools/bin/gcc: No such file or directory
> > 
> > I have been back to Chapter 5 step '5.11 gcc-4.0.3 - Pass 2' and double checked everything, and even rebuilt the temporary system from scratch.  At this stage I applied the specs patch.  The results of the dummy compile in the 'caution' section tell me that my program interpreter is /tools/lib/ld-linux.so.2, so it would appear that the build of gcc has worked.
> What do you mean you applied the specs patch? At what point exactly? 
> Also, have you been removing the source and build dirs after each 
> installation?
> > Before running the configure in step 6.9, I extracted glibc-libidn into the glibc source directory and applied the patches for linux-types and inotify as per the book.
> That doesn't have anything to do with it.>
> > I have checked the result of the sed command in step '5.7 Adjusting the Toolchain'.  In the specs file, ($LFS/tools/lib/gcc/i686-pc-linux-gnu/4.0.3/specs) there is only one entry for ld-linux.so.2, as follows:
> > 
> > *dynamic linker:
> > /tools/lib/ld-linux.so.2
> > 
> > So, /tools/bin/gcc exists, but the configure script for glibc doesn't seem to be able to use it. 
> What is the output of "ldd /tools/bin/gcc"?


Thanks for getting back to me.

ldd /tools/bin/gcc   gives :

/tools/bin/ldd: line 124: /tools/bin/gcc: No such file or directory

The ldd command works OK - I tested it against 'make' and 'sed' and it listed all the librarys for those programs.

So, the shared librarys are not being seen.  Were these supposed to be created or linked in section '5.6.1 Installation of glibc'?  (Or have I made a complete mess of compiling gcc in stage 5 on two seperate occasions?!?)

I notice that there is a switch, '--with-headers=/tools/include' in the configure option for glibc.  I copied and pasted that text directly during the configuration of  glibc (section 5.6.1) and have just had a look in the /tools/include directory - there are loads of (*.h) header files sitting in there, but I don't know which ones (if any) would be required to compile gcc?

Be one of the first to try Windows Live Mail.

More information about the lfs-support mailing list