Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Out of Memory for Large Builds
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
SDNick484
Apprentice
Apprentice


Joined: 05 Dec 2005
Posts: 212

PostPosted: Tue Feb 24, 2009 7:32 am    Post subject: Out of Memory for Large Builds Reply with quote

I'm encountering the OOM killer when I try to build some large packages (eg. boxee or xbmc), is there a simple way to limit the RAM for the build and allow it to complete (eg. can I do it with something like ulimit)? I'm currently running 32bit Gentoo with 4GB of RAM & 4GB swap, so I'm a bit surprised I'm seeing this. I was running free in a second terminal while the build occurs and I seem to limit out around 3GB of RAM & 3GB of swap in use before the OOM killer comes out and takes care of business.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3789
Location: sleeping in the bathtub

PostPosted: Tue Feb 24, 2009 8:09 am    Post subject: Reply with quote

Try building them with -j1 in MAKEOPTS?
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
SDNick484
Apprentice
Apprentice


Joined: 05 Dec 2005
Posts: 212

PostPosted: Tue Feb 24, 2009 8:26 am    Post subject: Reply with quote

I've actually already given that a shot (needed to do it to get XBMC to compile), but so far no luck on boxee, thanks for the suggestion.
Back to top
View user's profile Send private message
gentoo-dev
Apprentice
Apprentice


Joined: 24 Jan 2006
Posts: 172

PostPosted: Tue Feb 24, 2009 11:30 am    Post subject: Reply with quote

Quit X or any other memory hungry processes. I guess you tried that before.
Try removing -pipe from your CFLAGS.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Feb 24, 2009 12:52 pm    Post subject: Reply with quote

Can you double that plz :

When you compile, run htop and see what is going on.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Tue Feb 24, 2009 2:44 pm    Post subject: Reply with quote

I wonder what's the memory usage *before* you start compiling.

However, you can always add more swap space inside a loopback file if really needed.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
SDNick484
Apprentice
Apprentice


Joined: 05 Dec 2005
Posts: 212

PostPosted: Wed Feb 25, 2009 4:56 pm    Post subject: Reply with quote

Thanks everyone for all the suggestions, I eventually found my issue was related to a very bad libtool included in the package (Boxee, like XBMC, includes its own version of several major patches, some much older than the current release of those packages). In particular the issue occurred when I started to compile Boxee's libmad, basically it would spawn a bunch of sh & sed commands until I ran out of RAM (similar to a fork bomb). I resolved the issue by copying over libtool and ltmain.sh from libmad in portage. One thing I did find odd was even though swap is set much higher, it maxed out around 3GB (same with RAM, but that's expected on a 32 bit system even with 4GB of RAM).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum