Live 6.3 r2032 & ncurses fails - Cannot link with G

EJBoshinski mistrz.linux at
Tue Oct 2 12:27:24 PDT 2007

>Yeah, that's a problem. This is LFS-6.3? Did you apply the specs patch
>in gcc-pass2? It's supposed to remove /usr/include with this chunk:
>diff -Naur gcc-4.1.0.orig/gcc/config/linux.h gcc-4.1.0/gcc/config/linux.h
>--- gcc-4.1.0.orig/gcc/config/linux.h    2005-08-06 09:26:35.000000000 -0400
>+++ gcc-4.1.0/gcc/config/linux.h    2006-02-28 22:02:21.000000000 -0500
>@@ -104,3 +104,7 @@
 >#define TARGET_C99_FUNCTIONS 1
>+/* Remove /usr/include from the end of the include search path.  */
>One way to check if the patch applied correctly is if the proper
>dynamic linker is referenced by gcc:
>$ gcc -dumpspecs | grep ld-linux
>If that doesn't have /tools, then the gcc-pass2 build was definitely borked.

That is exactly what is happening.  gcc -dumpspecs responds with:


However, at the end of gcc-pass2, 

$echo 'main(){}' > dummy.c
$cc dummy.c
$readelf -l a.out | grep ': /tools'
[Requesting program interpreter:    /tools/lib/]

For clarification, it is LFS LiveCD 6.3-r2032.  I am applying the patch, and it appears to be accepted....

`gcc/' -> `gcc/'
`gcc/' -> `gcc/'
patching file gcc/config/alpha/linux-elf.h
patching file gcc/config/arm/linux-elf.h
patching file gcc/config/frv/linux.h
patching file gcc/config/i386/gnu.h
patching file gcc/config/i386/linux.h
patching file gcc/config/i386/linux64.h
patching file gcc/config/ia64/linux.h
Hunk #1 succeeded at 43 with fuzz 1.
patching file gcc/config/linux.h
patching file gcc/config/m32r/linux.h
patching file gcc/config/m68k/linux.h
patching file gcc/config/mips/linux.h
patching file gcc/config/mips/linux64.h
patching file gcc/config/mn10300/linux.h
patching file gcc/config/pa/pa-linux.h
patching file gcc/config/rs6000/linux64.h
patching file gcc/config/rs6000/sysv4.h
patching file gcc/config/s390/linux.h
Hunk #1 succeeded at 86 with fuzz 2.
patching file gcc/config/sh/linux.h
patching file gcc/config/sparc/linux.h
patching file gcc/config/sparc/linux64.h
patching file gcc/config/xtensa/linux.h
mkdir: created directory `gcc-build'

I also verified that /gcc-4.1.2/gcc/config/linux.h was modified.  So at this point, I am a little stumped... 

Any other ideas where to poke around?  Obviously it must be something that I am doing, otherwise others would  have said something by now...

Here is the complete command set that I am using to build gcc-pass2...


cd $LFS/builds
rm -vrf gcc-build
rm -vrf gcc-4.1.2
tar -xjvf $LFS/sources/gcc-4.1.2.tar.bz2
cd gcc-4.1.2
cp -v gcc/{,.orig} && sed 's@\./fixinc\.sh at -c true@' gcc/ > gcc/
cp -v gcc/{,.tmp} && sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/ > gcc/
patch -Np1 -i ../../sources/gcc-4.1.2-specs-1.patch
cd ..
mkdir -v gcc-build
cd gcc-build
time { ../gcc-4.1.2/configure --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch && make && make -k check && make install; }


Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. 

More information about the lfs-support mailing list