[lfs-support] Issues with compiling GCC-4.8.1 (LFS 7.4)

Bernard Hurley bernard at marcade.biz
Sat Nov 2 05:14:45 PDT 2013

Hi there!

I have been trying to compile GCC-4.8.1 in section 5.5 of LFS 7.4.  The
first problem was that the compiler didn't seem to understand (a
parameter to configure on p.37):


In case anyone else has the problem, I found after running "configure
--help" that the solution seems to be to replace it with:


The second problem is a bit more intractible.  Having made the apbove
adjustment to "configure", when I run "make" it bombs out with:

================ snip ===============
configure: creating ./config.status
config.status: creating Makefile
config.status: creating auto-target.h
config.status: linking ../.././libgcc/enable-execute-stack-empty.c to enable-execute-stack.c
config.status: linking ../.././libgcc/unwind-generic.h to unwind.h
config.status: linking ../.././libgcc/config/i386/linux-unwind.h to md-unwind-support.h
config.status: linking ../.././libgcc/config/i386/sfp-machine.h to sfp-machine.h
config.status: linking ../.././libgcc/gthr-single.h to gthr-default.h
config.status: executing default commands
make[2]: Entering directory `/mnt/lfs/gcc-build/gcc-4.8.1/x86_64-lfs_7_4-linux-gnu/libgcc'
Makefile:162: ../.././gcc/libgcc.mvars: No such file or directory
make[2]: *** No rule to make target `../.././gcc/libgcc.mvars'.  Stop.
make[2]: Leaving directory `/mnt/lfs/gcc-build/gcc-4.8.1/x86_64-lfs_7_4-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mnt/lfs/gcc-build/gcc-4.8.1'
make: *** [all] Error 2
================ snip ===============

I am running Debian Wheezy amd64 on a Dell Inspiron 1525.  The output
from "Host System Requirements" is:[1]

================ snip ===============
bash, version 4.2.37(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Debian) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc-4.7.real (Debian 4.7.2-5) 4.7.2
g++-4.7.real (Debian 4.7.2-5) 4.7.2
(Debian EGLIBC 2.13-38) 2.13
grep (GNU grep) 2.12
gzip 1.5
Linux version 3.2.0-4-rt-amd64 (debian-kernel at lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP PREEMPT RT Debian 3.2.51-1
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
================ snip ===============

I have the following environment variables set:


I have tried seaching for a solution bu all I have found has been
memory problems with Gentoo.  I suspect the problem may be related to
one of the following:

There appears to be somthing wrong with the "sed" command on page 37:

   sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure

as the output from 'grep "k prot" gcc/configure' (before running "sed")

  # Test for stack protector support in target C library.
        # all versions of Bionic support stack protector

Another thing that seems strange is the configure option (again on page


There is no file "mpfr/src/.libs", in fact there is nothing called
".libs" in the whole of mpfr's source tree.

If you've read so far you are truly one of my heros!  I hope to be able
to contribute to the community myself once I have built LFS.

Kind regards,


[1]  Originally I had /bin/sh -> /bin/dash, as seems to be the default
on Debian, but I changed it so I could follow the book more closely.


i'm living so far beyond my income that we may almost be said to be
living apart.
		-- e. e. cummings

More information about the lfs-support mailing list