LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   GCC 4.3.2 2nd pass Out of memory cc1plus (http://www.linuxquestions.org/questions/linux-from-scratch-13/gcc-4-3-2-2nd-pass-out-of-memory-cc1plus-718638/)

yaplej 04-12-2009 02:58 PM

GCC 4.3.2 2nd pass Out of memory cc1plus
 
Anyone run into this problems where the 2nd pass on GCC hangs with an error message about being out of memory, and the id being killed? I was able to build fine on a system with 1GB of memory + 1GB swap, but now I am trying on a VMachine with 512MB, and 1GB swap and it fails.

I increased the memory to 1GB + 1GB swap on my VMachine to see if that will fix the problem. Just waiting now to see if it worked. Did I miss somewhere where it says how much memory/swap you need?

I am using the LFS livecd as my host.

paulsm4 04-12-2009 03:11 PM

Hi -

512MB RAM should be more than enough.

Two things to look at:

1. See if you've got a header with a lot of in-line functions (they can be a real pig).. If so, see if you can reduce the #/in-line functions (or at least segregate them to a separate module)

2. Consider rebuilding your GCC with "--with-low-memory":
Quote:

make clean
./configure --with-low-memory
make install
'Hope that helps .. PSM

yaplej 04-12-2009 11:57 PM

Thanks for the reply. Increasing the memory didnt help, but I did find some problems with the toolchain adjustment script. I think it was causing some major errors when compiling, and testing. I think Iv got them fixed so I am running through another build right now to check it.

yaplej 04-13-2009 01:52 AM

Well that didnt help. I guess I didnt have any errors in my script. Here is the screen of it finally stopping. Tons of failures before it finally got to this point.

Code:

FAIL: g++.dg/overload/arg4.C (test for excess errors)
Out of memory: kill process 9697 (cc1plus) score 498039 or a child
Killed process 9697 (cc1plus)


yaplej 04-13-2009 07:03 PM

Well I finally got it working. My script had an extra space in one of the sed commands after a pipe <. I assume that the pipe command does not like double spaces before/after it judging by the results I got :)

yaplej 04-13-2009 07:51 PM

Bah. My command works fine, but not when I run it from a script using sh myscript.sh.


All times are GMT -5. The time now is 05:12 AM.