LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial 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 09-06-2006, 08:57 PM   #1
status1
Member
 
Registered: Sep 2006
Posts: 122

Rep: Reputation: 15
Unhappy Out of Memory gcc-3.4.1 -Pass 1


Hello,
I am trying to install LFS for the first time on a laptop
with 128 mb ram.
The LFS is verxion 6.0 that came with the book LFS 2-nd edition.
I am somewhat new to linux but I know some of the basics.
I got to the point of installing GCC-3.4.1 and I am stuck because I am getting out of memory messages and getting stopped.
My first question is :
Is this a real problem or is it caused by something else ?
In other words is 128 mb enough to be able to install
and compile gcc-3.4.1 ?
Another question I have is for someone who used the cd from the book.
On page 21 it mentions the packages needed one of them being gcc-3.4.1 27000kb however I don't have that on the cd
The closest one I have is gcc-core-3.4.1.tar.bz2 plus 2 other ones (c++ and testsuites I believe) in place where
the word "core" is.
Am I supposed to use just the "core" file or all 3 or
none of the above and download the exact file ?
The "out of memory" messages comes with different numbers
because it gets stuck at different places every time I run it so I didn't include them here but I could if that makes it easier to diagnose this problem
 
Old 09-06-2006, 09:02 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
128mb ram couldnt be the problem. do you have enough space on the hdd, paste the output of df -H. gcc-core will do.
and try to paste in the exact errors you get and the command you input too.
 
Old 09-07-2006, 07:51 PM   #3
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I set up the linux partition with 5gb and the swap with 1gb
I am not sure how best to transfer the output from the laptop to the pc so I will just have to type in
Here is the output of df -H after just loging in and without doing anything
Filesystem size used avail use% mounted on
/dev/hdc 348M 348M 0 100% /.cdrom
none 131M 0 131M 0% /dev/shm
/dev/loop0 384M 384M 0 100% /usr
/dev/loop1 14M 14M 0 100% /opt

Then what I do is I mount my floppy because I made some script files to
save on retyping everytime I reboot and run my first script which sets up the lfs so after that I have 2 more lines at the bottom of the list

/dev/fd0 1.5M 30k 1.4M 3% /mnt/floppy
/dev/hd7 6.3g 29k 5.9g 1% /mnt/lfs

How is it so far ?
It will take some time compile the program so I will have to do that tommorrw
What is the best way to paste the errors ?
I am not sure that I will be able to type much after it stops but I will give it a try
 
Old 09-08-2006, 03:08 PM   #4
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Here is the error messages that I get after compiling for about 20 minutes
This is after I run the comand make BOOT_LDFLAGS="-static" bootstrap

Normal free: 928kb min:476kb low:952kb high:1428kb active:147976kb inactive:
84348kb present: 245632kb
Protections: 0 238 238
high mem free:0kb min:128kb low:256kb high:384kb active:0kb inactive:0kb present :0kb
Protections: 0 0 0
DMA some numbers here
Normal some numbers here
Highmem: empty
Swap cache : add 0, delete 0, find 0/0, race 0+0
Out of Memory: Killed process 14245 (cc1)
xgcc: Internal error Terminated (program cc1)
Submit full bug report URL...
make[2] *** [insn-attrtab.o] Error 1
make[2] Leaving directory '/2/gcc'
make[1] *** [stage2_build] Erroe 2
make[1] Leaving directory '2//gcc'
make *** [bootstrap] Error 2

Can anyone make any sense out of this ?
I ran it again while I was typing this and it's pretty much the same except
the Out of Memory killed process is 14579(cc1)
The df -H command has the same output before and after compiling

Any ideas anyone ?

In the book it sais that the bootstrap command compiles it once and then uses that program to compile itself a 2nd and a 3rd time and then compares them
Is it possible to break the bootstrap command or to use a different command to do this proccess on step at a time to help narrow down where the problem is ?
 
Old 09-08-2006, 06:05 PM   #5
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,

You mention that you have a 1Gb swap partition. Is it activated?

Use top or free or cat /proc/swaps to check.

If swap is missing:

swapon /dev/hd<yourswappartition>

Hope this helps.
 
Old 09-08-2006, 07:20 PM   #6
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Thanks for the tip
The swap was not activated
I wonder why this was not mentioned in the book
I will run it again and see if the problem goes away
 
Old 09-09-2006, 05:52 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,

It (making and activating swap) is mentioned in the book (LFS 6.2 chapter 2.3 and 2.4). Older version also mention it. I do believe that your initial problem will be solved by turning swap on.

Anyway, hope this gets you going again.
 
Old 09-09-2006, 11:39 AM   #8
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I have the lfs 6.0 2nd edition and I don't see that mentioned in those chapters
It should be right after mkswap command but it's not there

Well I tried to compile it with the swap activated but I seem to have other problems now.
I compiled it without doing the Binutils first to save some time
It compiled for a lot longer this time (about 1hr) so I was checking it from time to time. I saw it going thru stage 1 and 2 and then when I checked it again it rebooted for some reason.
After loging in, it continued a little with an error something about
init id1 respawning too fast: disabled for 5 minutes then after waiting for 5
minutes it rebooted again and after loging in again I did not get anything
just a blinking cursor without the prompt

So I tried it again this time installing Binutils first but now when I get to decompress the gcc-3.4.1 file it runs for a while and then it slows down
severely.
After slowing down to a file every 10-15 seconds it gets to a file called
MD5SUMS and it stays there for more than 20 minutes after which I gave up
because I felt it was taking too long. The cd is getting accessed and the hard drive led is blinking but no progress is made.
Also after I stopped it every time I issue a command it takes much longer
to execute
Is a 1gb swap size enough ?
Perhaps I should start a new thread since I don't have the initial problem
but it may still be memory/swap related
 
Old 09-09-2006, 12:14 PM   #9
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 status1
I have the lfs 6.0 2nd edition and I don't see that mentioned in those chapters
It should be right after mkswap command but it's not there
Earlier version of the LFS book do not show this command, but it is/supposed to be basic knowledge (if you want to start with LFS that is).

Quote:
Well I tried to compile it with the swap activated but I seem to have other problems now.
I compiled it without doing the Binutils first to save some time
It compiled for a lot longer this time (about 1hr) so I was checking it from time to time. I saw it going thru stage 1 and 2 and then when I checked it again it rebooted for some reason.
After loging in, it continued a little with an error something about
init id1 respawning too fast: disabled for 5 minutes then after waiting for 5
minutes it rebooted again and after loging in again I did not get anything
just a blinking cursor without the prompt
You really need to follow the steps in the correct order. It's no use continueing if you have forgotten the previous step.

Quote:
So I tried it again this time installing Binutils first
Did you start with a clean sheet? Removing the old stuff, setting needed variables etc.

Quote:
but now when I get to decompress the gcc-3.4.1 file it runs for a while and then it slows down
severely.
After slowing down to a file every 10-15 seconds it gets to a file called
MD5SUMS and it stays there for more than 20 minutes after which I gave up
because I felt it was taking too long. The cd is getting accessed and the hard drive led is blinking but no progress is made.
How did you check the progress? Although I do agree that 20 minutes is rather a long time, even with 128Mb/1Gbswap.

Only sensible thing I can suggest: Start over, use the 6.2 book and its packets/patches and follow every step.
 
Old 09-09-2006, 01:46 PM   #10
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna
Hi,



Earlier version of the LFS book do not show this command, but it is/supposed to be basic knowledge (if you want to start with LFS that is).

.
If it's supposed to be basic knowledge why mention it in ver 6.2 and not the earlier versions ?
Shouldn't that be the other way around ?
Just curious

Quote:
Originally Posted by druuna
You really need to follow the steps in the correct order. It's no use continueing if you have forgotten the previous step.
.
I did not forget. That was on purpose to see if that solved the problem and to save time which it did

Quote:
Originally Posted by druuna
Did you start with a clean sheet? Removing the old stuff, setting needed variables etc.
.
This may be a dumb question but do I not start with a clean sheet everytime I reboot untill a certain point ?
I do not leave my computer on if I am not using it

Quote:
Originally Posted by druuna
How did you check the progress? Although I do agree that 20 minutes is rather a long time, even with 128Mb/1Gbswap.
.

By progress I just meant that it's not going to the next file It's just sitting there doing something but I don't know what


Quote:
Originally Posted by druuna
Only sensible thing I can suggest: Start over, use the 6.2 book and its packets/patches and follow every step.

Thanks but if it's not working with 6.0 I am not going to try another version just to see if it works faster
 
Old 09-09-2006, 02:23 PM   #11
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 status1
If it's supposed to be basic knowledge why mention it in ver 6.2 and not the earlier versions ?
Shouldn't that be the other way around ?
Just curious
These 'details' are filled in during the development of LFS. The main focus was/is on building your own linux box, from the ground up. For some (or a lot, depending on experience) of the things that need to be done, a certain level of experience is expected.

LFS is, and always will be, work in progress.....

Quote:
This may be a dumb question but do I not start with a clean sheet everytime I reboot untill a certain point ?
I do not leave my computer on if I am not using it
That is indeed starting with a clean sheet. Even cleaner than I ment :-)

After each reboot certain things need to be re-done in order to continue with the LFS build.

Among other things: setting the LFS variable, mounting etc etc.

Just in case, here's a hint on LFS: resume work after a break

Quote:
By progress I just meant that it's not going to the next file It's just sitting there doing something but I don't know what
I do think that memory/swap isn't the problem (just a feeling), but if memory is (too) low a lot of swapping is needed to get the deed done and that cane take a lot of time. But 20 minutes for a md5 file is (too?) long.

Quote:
Thanks but if it's not working with 6.0 I am not going to try another version just to see if it works faster
I understand, the reason I suggested it is this: 6.0 has evolved (fixed bugs, some packages upgraded, swapon is added etc.).
 
Old 09-09-2006, 07:06 PM   #12
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna
Hi,
After each reboot certain things need to be re-done in order to continue with the LFS build.
Among other things: setting the LFS variable, mounting etc etc.
Just in case, here's a hint on LFS: resume work after a break
.
I read that article that's why I started working on lfs again
after giving up because of all the retyping
I just a made a small improvement to that. I put the instructions into small files so I only have to execute a few simple files which I put on a floppy so I just have to mount
the floppy manually and execute a few files

Quote:
Originally Posted by druuna
I understand, the reason I suggested it is this: 6.0 has evolved (fixed bugs, some packages upgraded, swapon is added etc.)
.
Well , I was hoping that all the bugs were worked out before the book was printed. That's why I am here hoping that someone has already noticed this problem and found a fix for it


I ran gcc-3.4.1 again without installing binutils first just to find out how it stopped.
I was watching it closely and it ran about 15 minutes into stage 2 after which it started showing Out of memory messages again but I didn't see that because it ran a little bit further and finishing with the INIT : ID "1" respawning too fast : disabled for 5 minutes after which it just reboots
One other clue perhaps is that when I reboot it doesn't do it right away. It starts killing all the Out of memory processes first.

So it looks like I have to give it up again unless someone has a solution for this
So even with the swapon it gives an Out of memory message
but it's much later in the compilation. That's if I run gcc-3.4.1 first.
If I run binutils first with swapon then I can't even run gcc-3.4.1 because it slows down so much during decompressing that it's virtually unusable

Just out of curiosity if anyone knows
what is being used as swap if swap is not activated ?
 
Old 09-10-2006, 05:31 AM   #13
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 start to wonder if LFS is the problem, your mention of the 'respawning too fast' message makes me to believe that the base system isn't working correctly. This message cannot come from LFS, 'cause it's not the active OS.

- What are you using as your base? A LFS liveCD or something else?
- Any strange things during/after startup?
- Did your base system met all the Host Requirements (6.2)?

BTW: If no swap (or swapfile) is activated/created, only memory is used.

Last edited by druuna; 09-10-2006 at 05:42 AM.
 
Old 09-10-2006, 10:23 AM   #14
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I think I know what the problem is but I am not sure how to fix it at this moment.
In the book where it says to make a separate directory "mkdir../binutils"
Where is that located ?
Is it in the root directory or the /mnt directory ?

The other problem is that when I switch to the lfs environment I cannot create
any directories in ../ because I get Permission denied

So I am thinking I was compiling as root (not lfs) in the ramdisk portion of lfs and I guess after a while the ramdisk runs out of memory.
Is that possible ?

BTW I read that article "LFS: resume work after a break" and it says that if
you are not using a swap file you don't need to activate it.
So I tried it again without making/activating the swap and it was pretty much the same so I guess that means that I am only using the memory.

So I have to figure out how to make a directory as lfs and where to place it.
 
Old 09-10-2006, 10:54 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,

Quote:
I think I know what the problem is but I am not sure how to fix it at this moment.
In the book where it says to make a separate directory "mkdir../binutils"
Where is that located ?
Is it in the root directory or the /mnt directory ?
cd $LFS/sources
tar jxf binutils-2.16.1.tar.bz2
cd binutils-2.16.1
mkdir -v ../binutils-build
cd ../binutils-build
<rest of the steps>


Version number may differ, but you hopefully get the point.

Quote:
BTW I read that article "LFS: resume work after a break" and it says that if
you are not using a swap file you don't need to activate it.
So I tried it again without making/activating the swap and it was pretty much the same so I guess that means that I am only using the memory.
You definitely need swap. 128Mb is not enough if you do not have an active swap partition.

But like I said before, I think that memory/swap is not the reason, it's the result of something else.

BTW: Does your base system meet the requirements that are needed to install LFS 6.0?
 
  


Reply

Tags
lfs


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 - 5.4. GCC-3.4.3 - Pass 1 - Failed cruiseoveride Linux From Scratch 7 06-07-2007 11:34 PM
questions on GCC-3.4.3 - Pass 2 and Binutils-2.15.94.0.2.2 - Pass 2 satimis Linux From Scratch 7 12-26-2005 10:23 PM
GCC Second pass fails thelonewolf Linux From Scratch 1 08-06-2005 12:07 PM
GCC second pass Mystified Linux From Scratch 6 07-28-2005 10:21 PM
GCC pass 1 error mugwump84 Linux From Scratch 2 05-10-2005 06:21 PM


All times are GMT -5. The time now is 01:07 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration