Out of Memory gcc-3.4.1 -Pass 1
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
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.
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
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
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 *** [insn-attrtab.o] Error 1
make Leaving directory '/2/gcc'
make *** [stage2_build] Erroe 2
make 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 ?
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:
Hope this helps.
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
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.
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
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
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
Only sensible thing I can suggest: Start over, use the 6.2 book and its packets/patches and follow every step.
Shouldn't that be the other way around ?
I do not leave my computer on if I am not using it
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
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
LFS is, and always will be, work in progress.....
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
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
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 ?
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.
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.
tar jxf binutils-2.16.1.tar.bz2
mkdir -v ../binutils-build
<rest of the steps>
Version number may differ, but you hopefully get the point.
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?
|All times are GMT -5. The time now is 02:15 PM.|