-   Linux From Scratch (
-   -   A different issue with step 5.10.1 (GCC 2nd pass) (

davecove 11-24-2011 01:03 AM

A different issue with step 5.10.1 (GCC 2nd pass)
Working my way thru the book (ver 7) with openSUSE 12.1 as my host and things have gone very well up until now. The test at the end of 5.8 worked exactly as written and the Installation of Binutils in 5.9.1 went without errors.

But 5.10.1 (Installation of GCC) is not going well. Everything goes well until I run 'make'. After lots of encouraging-looking grinding, make stops on this:
checking for MPFR... no
configure: error: libmpfr not found or uses a different ABI.
make[1]: *** [configure-mpc] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
As instructed, mpfr-3.1.0 has been unzipped into /mnt/lfs/sources/gcc-4.6.2/mpfr (as has gmp and mpc)

Here is the CC line I am using right before the 'make':
CC="$LFS_TGT-gcc -B/tools/lib/" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib ../gcc-4.6.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 --disable-multilib --disable-bootstrap --disable-libgomp --without-ppl --without-cloog --with-mpfr-include=$(pwd)/../gcc-4.6.2/mpfr/src --with-mpfr-lib=$(pwd)/../gcc-4.6.2/mpfr/src/.libs
It does differ from the book in a few ways; 1) it uses gcc-4.6.2 instead of gcc-4.6.1 in the paths and 2) the --with-mpfr-lib directive uses a different path than in the book because the one in the book points to a non-existent location.

Why does 'make' not find libmpfr?

Thank you for your time,

czarherr 11-24-2011 01:27 AM

I had this problem. It turned out that I simply forgot to change the name of the "mpc-0.9" package to just "mpc" after I extracted it in the GCC directory.

Also, have you tried using the path specified in the book anyway?

By the way, I'm having a different problem on this step. Would you mind posting your shell history from the start of Glibc step 2 so I can compare?

druuna 11-24-2011 11:12 AM


Which book are you following: LFS 7.0 stable or LFS SVN/Development?

gcc 4.6.1 is used in the stable version (and works), gcc 4.6.2 is tested in svn/development. If (!!) you need to build gcc 4.6.2 in the stable version use the chapter from the svn book to do so.

BTW: I don't get this adjustment --with-mpfr-lib=$(pwd)/mpfr/src/.libs to --with-mpfr-lib=$(pwd)/../gcc-4.6.2/mpfr/src/.libs
You have the same command when using gcc 4.6.1 and that works perfectly, even though that location isn't present when issuing the command. I think you should remove the bold part.

Hope this helps.

davecove 11-24-2011 11:21 AM

Well, I am following the stable book, but somehow I got the wget-list file from the development branch I guess.

I went back and used gcc-4.6.1 and got past my issue.

Thank you for pointing that out.


druuna 11-24-2011 11:32 AM

You're welcome :)

BTW: Can you put up the [SOLVED] tag.
first post -> Thread Tools -> Mark this thread as solved

esornep 07-02-2012 09:47 AM

/home/lfs/LFS/sources/gcc-4.7.1/configure \
--target=$LFS_TGT \
--prefix=/home/lfs/LFS/tools \
--with-newlib \
--without-headers \
--with-local-prefix=/home/lfs/LFS/tools \
--with-native-system-header-dir=/home/lfs/LFS/tools/include \
--disable-nls \
--disable-shared \
--disable-multilib \
--disable-decimal-float \
--disable-threads \
--disable-libmudflap \
--disable-libssp \
--disable-libgomp \
--disable-libquadmath \
--enable-languages=c,c++ \
--with-mpfr-include=/home/lfs/LFS/sources/gcc-4.7.1/mpfr/src \

this was my configure file and same error and i have checked the paths can u put some light on it.thanks

druuna 07-02-2012 10:12 AM

@esornep: Please don't re-open a solved thread, start your own next time: Have a look here for an "answer" (in one of your other threads).

All times are GMT -5. The time now is 10:50 PM.