[lfs-support] LFS 5.7 (Glibc-2.14.1)

Firerat firer4t at googlemail.com
Mon Apr 9 07:57:03 PDT 2012

On Apr 9, 2012 3:12 PM, "Sean Hinchee" <henesy1027 at gmail.com> wrote:
> This is my first time going through LFS, everything went fine (I think)
> up until I tried "sudo make" on glibc. I followed the directions

Must admit it has been a while since I went through the book, and I use a
slightly different approach with package management.
But does the book really tell you to do sudo make?

> verbatim and I have run through the steps from "gcc-4.6.2 - Pass 1" all
> the way back up to glibc. Everytime I run into this (only the last few
> lines):
>                   > /mnt/lfs/sources/glibc-build/shlib-versions.v.iT
> /bin/sh: i686-lfs-linux-gnu-gcc: not found
> make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.14.1/csu'
> make[1]: *** [csu/subdir_lib] Error 2
> make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.14.1'
> make: *** [all] Error 2

Look for the missing bin

    find /mnt/lfs -name i686*-gcc

Make sure you have the correct PATH do
    echo $PATH

You should see /tools at the beginning if not then did you
    source ~/.bashrc
> And this shows up a little bit after:
>  > /mnt/lfs/sources/glibc-build/shlib-versions.v.iT
> /bin/sh: cannot create /mnt/lfs/sources/glibc-build/shlib-versions.v.iT:
> Permission denied

Who owns glibc-build?
I'm guessing you added an sudo to the initial command but neglected to add
it to the rest of the commands in the paste
So root created the build dir and now you are not root so it failed
> make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.14.1/csu'
> make[1]: *** [csu/subdir_lib] Error 2
> make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.14.1'
> make: *** [all] Error 2
> lfs at Von-Bek:/mnt/lfs/sources/glibc-build$ sudo make

You never need to be root to compile something, root is only required for
And it is a bad idea to use root to install the toolchain on your host as
you could end up messing up your build host
> [sudo] password for lfs:
> make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.14.1 objdir=`pwd` all
> make[1]: Entering directory `/mnt/lfs/sources/glibc-2.14.1'
> sed '/^[        ]*%/!s/#.*$//;/^[       ]*$/d;s/^[      ]*%/#/' \
>            nptl/shlib-versions libidn/shlib-versions
> shlib-versions \

There is no reason to be using sudo to gain root
Initially you are compiling a temporary toolchain and you can do that as
lfs ( that is assuming you have given lfs permission to write to /mnt/lfs )
Later you setup the kernel filesystem and chroot , this where you need to
be root

Start over from the beginning and limit your use of root/sudo to when you
absolutely need it, I.e. creating the lfs user, mounting the lfs partition,
chown lfs /mnt/lfs/ and later with the bind mount of dev/proc fs  , dir
structure / file permssions and chroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20120409/ba5196c7/attachment.html>

More information about the lfs-support mailing list