On Apr 9, 2012 3:12 PM, "Sean Hinchee" <[email protected]> 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@Von-Bek:/mnt/lfs/sources/glibc-build$ sudo make
You never need to be root to compile something, root is only required for
install
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
nptl_db/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
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page