LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-25-2007, 08:27 AM   #1
lfs-fan
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
LFS gcc-4.0.3 on ubuntu 5.0.4 can't compile


halo all

first to thank you all for a helpful site.i am really interested in seeing my lfs 6.2 work but i have hit my first real snag.i have been trying to compile gcc-4.03 on my ubuntu 5.0.4(hardware is hp laptop-pavilion- with intel centrino) but can't get to installing bootstrap.

the error message is something to do with the gcc release being unable to compile in its own source directory.
i have google and re googled but naught.what is a source directory in the first place?
kindly

ps:compiled binutils as root cos lfs user couldn't
lfs-fan
 
Old 07-25-2007, 11:19 AM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Quote:
ps:compiled binutils as root cos lfs user couldn't
Okely dokely, time to start again from the very beginning. This time read the instructions properly, and follow them to the letter.

Quote:
do with the gcc release being unable to compile in its own source directory. ... what is a source directory in the first place?
When you unpacked gcc-4.0.3.tar.bz2 the directory /mnt/lfs/sources/gcc-4.0.3 was created. This is the source directory. The error you get means you cannot run configure [...], make bootstrap, make install in that directory.

If you read the instructions (always a good plan), you will see the book instructs you to create ../gcc-build (/mnt/lfs/sources/gcc-build), this is where you will compile gcc. Do it there and you will not see the error.

You might want to have a go at compiling a few things for the host system, for practice.

Correct me if I'm wrong, but it looks as though you are rushing this. LFS is not the sort of thing you want to rush or it will all go wrong. Some friendly advice: 1) take your time when typing the commands, one typo can ruin an entire build. 2) Don't do it all at once, spread it out over a few days. 3) Do not expect it to work first time (For me it was 3rd attempt that booted successfully)

Last edited by Daws; 07-31-2007 at 07:28 AM.
 
Old 07-27-2007, 06:59 AM   #3
lfs-fan
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
thanks Daws

your're right!infact that same night,after agonizing, i read the gcc faq carefully and compiled gcc easily thereafter.i have since discovered many other faults and true to your words, if a newbie follows instructions,nothing to worry about.i am now working to patch expect..gz, before continuing


lfs-fan
 
Old 07-28-2007, 12:05 AM   #4
reccaX
LQ Newbie
 
Registered: Apr 2007
Location: DKI Jakarta
Distribution: ubuntu
Posts: 21

Rep: Reputation: 15
Hi.. Maybe it's cause ubuntu couldn't have good environment to build temporary system for LFS, i suggest for you to build LFS with other linux distributions such as debian, fedora which have support for development..

trims..
 
Old 07-28-2007, 08:05 AM   #5
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
Quote:
Hi.. Maybe it's cause ubuntu couldn't have good environment to build temporary system for LFS, i suggest for you to build LFS with other linux distributions such as debian, fedora which have support for development..

trims..
Out of the box, I'd agree, Ubuntu may not have everything you need. But with the right packages installed it is as good as any. If you install all the packages (including -dev packages) LFS itself uses, you can't go wrong. Oh, and use gawk not mawk if you are using Debian.
 
Old 07-29-2007, 07:24 AM   #6
lfs-fan
LQ Newbie
 
Registered: Jul 2007
Posts: 5

Original Poster
Rep: Reputation: 0
ubuntu -compiling lfs

hi all

actually i read somewhere that ubuntu is founded on debian and perhaps the reason i have not encountered any other hitch.i am now installing linux-libc header patches for stage2 and expect things to go well for me [as far as i follow instructions well-which i learnt the hardway].i havent encountered anyother problem so far.

lfs-fan
 
Old 07-30-2007, 10:04 PM   #7
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current
Posts: 465

Rep: Reputation: 53
Daws, thank you very much for explaining, it really helped me set things straight.
 
  


Reply



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 - 5.4. GCC-3.4.3 - Pass 1 - Failed cruiseoveride Linux From Scratch 7 06-07-2007 10:34 PM
LFS 6.2-3 chp. 5.4 GCC-4.0.3 compile error threekgtvr4 Linux From Scratch 1 12-29-2006 04:45 PM
gcc in ubuntu faile to compile some sources raduromeo Linux - Software 7 08-20-2006 09:14 AM
LFS without gcc and glibc nazir Linux From Scratch 5 08-05-2005 11:23 AM
gcc not working after LFS 6.0 ch 6.61 Barnette Linux From Scratch 1 01-11-2005 09:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration