LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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

Reply
 
Search this Thread
Old 05-04-2010, 05:49 PM   #1
freemanpolys
LQ Newbie
 
Registered: May 2010
Posts: 16

Rep: Reputation: 0
Smile problem with gcc compilation!


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 !
 
Old 05-04-2010, 05:56 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

In the future, please try to give more details, including:

* LFS version, and where you got it
* Platform specifics
* GCC version
* the exact text of your error message(s)
* etc.

But to get past this problem, perhaps the easiest thing might be to just download GCC from here:

http://www.linuxfromscratch.org/blfs...neral/gcc.html

'Hope that helps .. PSM
 
0 members found this post helpful.
Old 05-04-2010, 06:02 PM   #3
freemanpolys
LQ Newbie
 
Registered: May 2010
Posts: 16

Original Poster
Rep: Reputation: 0
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).

*********************************************************************************
lfs@ametchia:/mnt/lfs/sources/gmp$ echo $PATH
/tools/bin:/bin:/usr/bin
 
Old 05-05-2010, 03:00 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

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

Hope this helps.
 
1 members found this post helpful.
Old 05-05-2010, 05:10 AM   #5
freemanpolys
LQ Newbie
 
Registered: May 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you guys!

*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

yes druuna, it is at chapter 5.5.1.

i've download the gcc from http://www.linuxfromscratch.org/blfs...neral/gcc.html and i've build it!! now it's the make command which generate errors!


make[2]: execvp: touch: Too many levels of symbolic links
make[2]: *** [stamp-picdir] Error 127
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/libiberty'
make[1]: *** [all-libiberty] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
 
Old 05-05-2010, 05:33 AM   #6
freemanpolys
LQ Newbie
 
Registered: May 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Here are my gmp and mpfr version

gmp-4.2.4.tar.bz2
mpfr-2.3.2.tar.bz2

is them alright?
 
Old 05-05-2010, 06:47 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Do _not_ use BLFS packages when building LFS!!

Just follow the steps I mentioned in post #4 (i.e.: follow the book!).

Remove that what you have done so far, including the gcc dir and the gcc build dir, and start at the top of chapter 5.5.

Hope this helps.
 
Old 05-05-2010, 09:22 AM   #8
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by freemanpolys View Post
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).

*********************************************************************************
lfs@ametchia:/mnt/lfs/sources/gmp$ echo $PATH
/tools/bin:/bin:/usr/bin
Hi,

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.
 
0 members found this post helpful.
Old 05-05-2010, 03:45 PM   #9
AlphaBravo
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
LFS 6.4? You should use either 6.6 or SVN. Preferably SVN.

Quote:
Originally Posted by druuna View Post
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 03:50 PM.
 
0 members found this post helpful.
Old 05-06-2010, 01:26 AM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by AlphaBravo View Post
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!

Hope this helps.
 
Old 05-06-2010, 02:16 AM   #11
AlphaBravo
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by druuna View Post
Hi,

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 View Post
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 02:25 AM.
 
0 members found this post helpful.
Old 05-06-2010, 02:24 AM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Quote:
Originally Posted by AlphaBravo View Post
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.

Lets stay on topic here.
 
Old 05-06-2010, 04:31 AM   #13
AlphaBravo
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by druuna View Post
Hi,


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 05:06 AM.
 
Old 05-07-2010, 01:47 AM   #14
freemanpolys
LQ Newbie
 
Registered: May 2010
Posts: 16

Original Poster
Rep: Reputation: 0
hi
I've build gcc packet! but i don't have the library libgcc.a in my gcc-build directory! is everything ok?

the result is that i can't create the soft link like this :

ln -vs libgcc.a `gcc -print-libgcc-file-name | \
sed 's/libgcc/&_eh/'`

here is the last output of the make install command:

make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/i686-pc-linux-gnu/libiberty'
make[3]: Entering directory `/mnt/lfs/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/i686-pc-linux-gnu/libiberty'
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
 
Old 05-07-2010, 02:01 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Assuming that you are still working on LFS 6.4, gcc pass 1 chapter 5.5.1, first a few questions:

- Did anything go wrong with the ./configure or the make steps?

- Is the output posted (the make install step) all the output that was shown?

- Did you do all the commands (except the mpfr and gmp steps) from the gcc-build directory ($LFS/sources/gcc-build, and not $LFS/sources/gcc-4.3.2)?

- Did you do as I suggested and use the LFS packages (and _not_ the blfs packages)?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7) compilation error adhesh_19 Red Hat 0 01-05-2010 05:34 AM
Compilation problem when downgrading from 64-bit gcc to 32-bit gcc huyhoang3673 Linux - Software 7 08-26-2009 11:31 AM
gcc compilation problem jestinjoy Ubuntu 2 08-23-2008 12:12 PM
have gcc compilation error during gcc installtion in linuxfromscratch vbshanmugaprakash Linux - General 3 12-13-2006 05:52 AM
Mplayer compilation problem on linux 2.6.3 gcc 3.3.3 glibc 2.3.2 realloc Linux - Software 4 10-22-2004 03:44 PM


All times are GMT -5. The time now is 11:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration