On 03/25/2010 10:45 PM, John Stephens wrote:
> Greetings,
>
> I am attempting to build my first LFS project, but can't see to get past
> the GCC, pass 1 compile.  FWIW, Linux is not new to me.  I have had an
> interest in working through a LFS project for several years, and now I
> actually have some time to do it.
>
> I suspect I have a configuration setting gone wrong, however I am unable
> to see what is going wrong.
>
> I have a Ubuntu 9.10 host (AMD Athlon CPU, 1G memory).  I've defined an
> lsf user and have a separate 50G partition mounted at /mnt/lfs.  All the
> suggested symlinks are in place.
>
>
> At this point, I believe all is OK.  GCC is then unpacked in
> $LFS/gcc-build, mpfr-3.4.3 and gmp-5.0.0 are unpacked into
> $LFS/gcc-build/gcc-4.4.3 as mpfr and gmp respectively.
>
> GCC is then configured using:
> l...@carina:/mnt/lfs/gcc-build/gcc-4.4.3$ ../gcc-4.4.3/configure
> --target=$LFS_TGT --disable-nls --disable-shared --disable-multilib
> --disable-decimal-float --disable-threads --disable-libmudflap
> --disable-libssp --disable-libgomp --enable-languages=c
> ...snip...
> configure: creating ./config.status
> config.status: creating Makefile

I see 3 problems here...

1. The LFS book does not say to create gcc-build before unpacking the 
source tarball. Seems you need to take a close look at page 5.3, in 
particular the very last "Note" there - it says that you are to unpack 
the source tarball, cd into the created directory, *then* follow the 
instructions on the page.

2. The gcc-build directory is not in $LFS/sources, so that means that 
either you have become root (or used sudo) to create it, or you have 
chowned/chmodded $LFS, neither of which you should be doing. If you did 
this because you were getting permissions errors attempting to create 
gcc-build, see #1 above that will solve that issue. Also, do not use 
root/sudo at any point in Chapter 5 until you are told to, and if you 
did chown/chmod $LFS, change it back (owned by root, 755 permissions).

3. You forgot --prefix on that configure command. That would explain the 
permission errors on make install.

I don't recognize the particular error you are getting and don't know 
whether it's related to any of the above issues, but the fact that you 
did miss those is an indicator that you do need to read a bit more 
closely. The compile errors you are getting are likely due to some other 
detail you've overlooked. Remove the GCC source and build dirs and try 
again, this time reading more slowly and carefully. If that still 
doesn't work, rm -rf /tools/* and go back to the beginning of Chapter 5.

>
> If I try to do a "make install", I get the following:
>
> l...@carina:/mnt/lfs/gcc-build/gcc-4.4.3$ make install
> make[1]: Entering directory `/mnt/lfs/gcc-build/gcc-4.4.3'
> /bin/bash ./mkinstalldirs /usr/local /usr/local
> make[2]: Entering directory
> `/mnt/lfs/gcc-build/gcc-4.4.3/host-i686-pc-linux-gnu/fixincludes'
> rm -rf /usr/local/libexec/gcc/i686-lfs-linux-gnu/4.4.3/install-tools
> /bin/bash ../.././fixincludes/../mkinstalldirs
> /usr/local/libexec/gcc/i686-lfs-linux-gnu/4.4.3/install-tools
> mkdir -p -- /usr/local/libexec/gcc/i686-lfs-linux-gnu/4.4.3/install-tools
> mkdir: cannot create directory `/usr/local/libexec': Permission denied
> make[2]: *** [install] Error 1
> make[2]: Leaving directory
> `/mnt/lfs/gcc-build/gcc-4.4.3/host-i686-pc-linux-gnu/fixincludes'
> make[1]: *** [install-fixincludes] Error 2
> make[1]: Leaving directory `/mnt/lfs/gcc-build/gcc-4.4.3'
> make: *** [install] Error 2

Obviously make install won't work if make has errors.
>
>
> Can anyone shed some light on this for me?
>
> Thanks in advance.
>
> John Stephens
>
Bruce is right about gawk, and more generally that you have missed a 
page about Host System Requirements. I don't believe it affects GCC, but 
it does need to be addressed as otherwise it will cause problems later.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to