LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 12-16-2010, 04:35 AM   #1
prakashsince92
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.10 Maverick
Posts: 37

Rep: Reputation: 0
LFS 6.7 gcc pass 1 clarification


Hi,
I'm using Ubuntu 10.10 as my host and following LFS book 6.7
I'm giving my second shot @ the LFS. My first attempt failed due to gcc make error in pass 2, which means there was an issue with pass 1 .So i need some clarifications about pass 1 of gcc before i start along.

1)File structure:
in side the sources directory
Quote:
-tarballs
-uncompressed source
-<package>build

is this right?

2)According to the command given in the book (for mpfr,gmp and mpc),
i should be one step down the tree.

Quote:
So should i create a new mpfr-build,gmp-build and mpc-build directories to compile them?

3)The configure command for gcc in pass1 mentions
Code:
--with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs
Quote:
so should i move the gmp or gmp-build directory (which one should i move )to gcc directory? before i proceed with my compilation from the gcc-build directory ?

Thanks in advance for any valuable comments

Last edited by prakashsince92; 12-16-2010 at 04:37 AM.
 
Old 12-16-2010, 05:00 AM   #2
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:
1)File structure:
in side the sources directory
-tarballs
-uncompressed source
-<package>build
That looks correct. To elaborate, specified to gcc pass 1:

$LFS/sources holds the gcc-4.5.1.tar.bz2 package.

After uncompressing gcc-4.5.1.tar.bz2 enter the created gcc directory ($LFS/sources/gcc-4.5.1).

At this point you execute the mpfr, gmp and mpc commands.

The unpacking and renaming (moving) of the afore mentioned 3 packages are done from _inside_ the $LFS/sources/gcc-4.5.1 directory! Besides the gcc files and directories, you should now have 3 extra directories called:

$LFS/sources/gcc-4.5.1/mpfr
$LFS/sources/gcc-4.5.1/gmp
$LFS/sources/gcc-4.5.1/mpc

If all went well, then you can precede to create and enter the build directory ($LFS/sources/gcc-build).

From within $LFS/sources/gcc-build you build gcc, starting with the ../gcc-4.5.1/configure --target=$LFS_TGT ..... command.

Hope this clears things up.
 
1 members found this post helpful.
Old 12-16-2010, 05:10 AM   #3
prakashsince92
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.10 Maverick
Posts: 37

Original Poster
Rep: Reputation: 0
Hi druuna,thanks for the quick reply,

Yes, Now i'm sure about the directory structure,But

should i compile gmp mpfr and mpc packages seperately before i run the configure command for gcc??
 
Old 12-16-2010, 05:31 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,

Quote:
should i compile gmp mpfr and mpc packages seperately before i run the configure command for gcc??
No, you should not. This is taken care of by the gcc configure step.

In general: All the steps needed are present in the LFS book and no extra steps need to be done. If you need to change the given steps or add extra steps to fix a problem you encounter then something is wrong and you need to go back and try to figure out what happened.

Hope this helps.
 
Old 12-16-2010, 08:01 AM   #5
prakashsince92
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.10 Maverick
Posts: 37

Original Poster
Rep: Reputation: 0
oh, awryt that helped to clarify things

Thank you
 
Old 12-16-2010, 08:07 AM   #6
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
You're welcome
 
Old 12-29-2010, 07:16 PM   #7
ProEng
LQ Newbie
 
Registered: Dec 2010
Location: Ontario
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 0
I spent a whole day trying to figure this out! Many Thanks to you druuna!
 
Old 12-30-2010, 02:57 AM   #8
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
@ProEng:
 
  


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
LFS version 6.5 I'm on step 5.10 I have a problem with gcc-4.4.1 pass 2 redpill Linux From Scratch 2 01-29-2010 09:23 AM
gcc second pass does not compile. LFS version 6.4 5.12 arielsegal Linux From Scratch 18 06-15-2009 11:12 AM
LFS-5.0 GCC problem with binutils-2.14 pass 1 NCappaZoo Linux From Scratch 6 06-14-2009 03:47 AM
LFS - 5.4. GCC-3.4.3 - Pass 1 - Failed cruiseoveride Linux From Scratch 7 06-07-2007 10:34 PM
LFS GCC - first pass install error arnuld Linux From Scratch 2 12-20-2006 07:59 AM


All times are GMT -5. The time now is 04:00 AM.

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