LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 04-12-2009, 01:58 PM   #1
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 148
Blog Entries: 1

Rep: Reputation: 22
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.
 
Old 04-12-2009, 02:11 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
 
Old 04-12-2009, 10:57 PM   #3
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 148
Blog Entries: 1

Original Poster
Rep: Reputation: 22
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.
 
Old 04-13-2009, 12:52 AM   #4
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 148
Blog Entries: 1

Original Poster
Rep: Reputation: 22
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)
 
Old 04-13-2009, 06:03 PM   #5
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 148
Blog Entries: 1

Original Poster
Rep: Reputation: 22
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
 
Old 04-13-2009, 06:51 PM   #6
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 148
Blog Entries: 1

Original Poster
Rep: Reputation: 22
Bah. My command works fine, but not when I run it from a script using sh myscript.sh.
 
  


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
gcc: error trying to exec 'cc1plus': execvp: No such file or directory- Fedora 10 AtmoHawk03 Linux - Newbie 5 09-17-2013 12:25 PM
GCC 2nd pass make error - xgcc cannot find -lc cogitocumimpune Linux From Scratch 1 01-11-2009 07:13 AM
Out of Memory gcc-3.4.1 -Pass 1 status1 Linux From Scratch 22 09-10-2006 05:21 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 09:23 PM
glibc error on 2nd pass buffed317 Linux From Scratch 3 09-05-2004 07:33 AM


All times are GMT -5. The time now is 02:30 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