Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
i'm making my one distribution by using the LFS book version 6.4 and i have a problem with the building of gcc ! in fact it needs gmp and mpfr. i've download them but can't build them because of errors!! Somebody help me !
when building gcc
****************************************************************
checking for correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
********************************************************************
when building gmp
checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).
I have to assume you are stuck at chapter 5.5.1 (please tell us this information).
Did you install both GMP and MPFR as shown in this chapter?
In short:
- From your sources dir ($LFS/sources) unpack gcc,
- enter the created gcc dir,
- unpack and move both GMP and MPFR as shown in the book,
- follow the rest of the chapter starting with: mkdir -v ../gcc-build
cd ../gcc-build
*LFS version : 6.4 download from a search with google
* Platform specifics : Linux ametchia 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
* GCC version : gcc-4.1.2
when building gcc
****************************************************************
checking for correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
********************************************************************
when building gmp
checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).
you are not supposed to build gmp and mpfr separately. Just untar them into gcc's source directory and rename them as stated in the book. The only configure command that you run is gcc's configure. It will automatically configure gmp and mpfr, too.
LFS 6.4? You should use either 6.6 or SVN. Preferably SVN.
Quote:
Originally Posted by druuna
Hi,
Do _not_ use BLFS packages when building LFS!!
As long as you install them late in the process (like, after gettext), and don't forget dependencies, it will be okay. I always install PAM & Cracklib before Shadow, along with PCRE + Reinstall Grep around that time.
Last edited by AlphaBravo; 05-05-2010 at 04:50 PM.
LFS 6.4? You should use either 6.6 or SVN. Preferably SVN.
Could you tell me why? There is nothing wrong with using LFS 6.4, although the newest stable version is 6.6. If the OP has 6.4 handy, why should s/he get 6.6?
Quote:
As long as you install them late in the process (like, after gettext), and don't forget dependencies, it will be okay. I always install PAM & Cracklib before Shadow, along with PCRE + Reinstall Grep around that time.
This is BS! And it will NOT be ok!
The OP is setting up the temporary environment (LFS chapter 5). Gettext and grep are installed later in that chapter (the order in which things are installed are for a specific reason), PAM and PCRE aren't even part of LFS (they are BLFS specific).
@freemanpolys: Just follow the book and all will be fine. Deviating from the book will get you in to trouble in the long run. If you have specific issues, just ask!
Could you tell me why? There is nothing wrong with using LFS 6.4, although the newest stable version is 6.6. If the OP has 6.4 handy, why should s/he get 6.6?
Because 6.4 is outdated. 6.6 & SVN are freely available on the Internet. For installing BLFS packages while booted, that's what you have Chroot for. You can easily install an X WM & a Browser inside it.
Quote:
Originally Posted by druuna
This is BS! And it will NOT be ok!
The OP is setting up the temporary environment (LFS chapter 5). Gettext and grep are installed later in that chapter (the order in which things are installed are for a specific reason), PAM and PCRE aren't even part of LFS (they are BLFS specific).
I thank he was in Chapter 6. My mistake. Yes, in C5 you only do what the book says. but late in 6 you CAN install BLFS or packages - like Cloog-PPL (as long you first compile GCC w/o PPL then build it and recompile GCC - you need the C++ Headers).
And while PAM & PCRE are not part of LFS, that means nothing.
Also, MPFR & GMP are in LFS. And finally, if you're installing 6.6, remember to use Zlib 1.2.5 (instead of 1.2.4, which does not exist on the maintainers site), and change this line (6.11, installing zlib)
Code:
ln -sfv ../../lib/libz.so.1.2.4 /usr/lib/libz.so
Into this:
Code:
ln -sfv ../../lib/libz.so.1.2.5 /usr/lib/libz.so
Last edited by AlphaBravo; 05-06-2010 at 03:25 AM.
Because 6.4 is outdated. 6.6 & SVN are freely available on the Internet. For installing BLFS packages while booted, that's what you have Chroot for. You can easily install an X WM & a Browser inside it.
Most people install LFS as an exercise to learn more about linux and the way things are done. LFS 6.4 is not outdated (yes, it does use some older packages, I know). And like I already said: If the OP has LFS 6.4 handy and maybe s/he hasn't got a good/fast internet connection installing 6.4 doesn't do any harm whatsoever.
I don't get what you are trying to say about chrooted environments and BLFS and window managers. The OP clearly isn't at that point yet, so why bother with BLFS packages and workarounds that might or might not work?
Quote:
I thank he was in Chapter 6. My mistake. Yes, in C5 you only do what the book says. but late in 6 you CAN install BLFS or packages - like Cloog-PPL (as long you first compile GCC w/o PPL then build it and recompile GCC - you need the C++ Headers).
And while PAM & PCRE are not part of LFS, that means nothing.
This doesn't have anything to do with the OP's original question and is probably confusing.
Most people install LFS as an exercise to learn more about linux and the way things are done. LFS 6.4 is not outdated (yes, it does use some older packages, I know). And like I already said: If the OP has LFS 6.4 handy and maybe s/he hasn't got a good/fast internet connection installing 6.4 doesn't do any harm whatsoever.
I don't get what you are trying to say about chrooted environments and BLFS and window managers. The OP clearly isn't at that point yet, so why bother with BLFS packages and workarounds that might or might not work?
This doesn't have anything to do with the OP's original question and is probably confusing.
Lets stay on topic here.
The Chroot & WM was because you probably want to install X, and it's kinda hard to download packages while accessing the Internet in CLI (Although I'm sure EMACS can do it, with EMACS-W3M & EMACS Command Line Mode)
EDIT: EMACS can really do it. With a little help with EMACS-W3M.
Last edited by AlphaBravo; 05-06-2010 at 06:06 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.