ld taking way too much memory

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
Post Reply
.:Det:.
Posts: 20
Joined: November 25th, 2010, 6:48 am

ld taking way too much memory

Post by .:Det:. »

Hey all,

I'm trying to build Thunderbird 7.0b2 on a 64-bit Archlinux but I keep getting this error (http://pastebin.com/1Uy5mSLs):

Code: Select all

collect2: ld terminated with signal 9 [Killed]


When checking out dmesg it tells me that ld was terminated for consuming too much memory (I got 4GB of RAM):

Code: Select all

Out of memory: Kill process 5432 (ld) score 283 or sacrifice child


I actually have to create swap of 512MB to get past it. Is this caused by ld wanting to use _all_ of my RAM or something?

Thanks for your time
User avatar
tqft
Posts: 1232
Joined: April 22nd, 2003, 11:57 pm

Re: ld taking way too much memory

Post by tqft »

Do not try and build chromium on that machine unless you radically up the swap.

Linking uses a lot of memory. Why so little swap? Are you disk constrained?

I have learnt the hard way not try and build ff, chromium and a kernel at the same time.
.:Det:.
Posts: 20
Joined: November 25th, 2010, 6:48 am

Re: ld taking way too much memory

Post by .:Det:. »

Well, I'm only building _Thunderbird_ and I don't want to use swap because 4GB of RAM has always been enough up and till now.
User avatar
loadbang
Posts: 874
Joined: November 3rd, 2003, 12:18 pm
Location: Birmingham, UK.

Re: ld taking way too much memory

Post by loadbang »

I'm experiencing the same, but building Nighlty on a Mac.

ld rises to 2.8GB of memory, and swap file reaches 10GB+.

After running for 5 minutes. Swap will carry on rising.

Image
tmpname0920
Posts: 6
Joined: September 20th, 2011, 9:08 am

Re: ld taking way too much memory

Post by tmpname0920 »

.:Det:. wrote:Well, I'm only building _Thunderbird_ and I don't want to use swap because 4GB of RAM has always been enough up and till now.


On Windows/x64 (VS2008) a 32-bit build of Thunderbird 7 consumes a peak of 3.0GB RAM. A 64-bit build peaks at 3.6GB.

And that's for non-PGO builds. You need some serious resources to build contemporary Mozilla applications.
.:Det:.
Posts: 20
Joined: November 25th, 2010, 6:48 am

Re: ld taking way too much memory

Post by .:Det:. »

tmpname0920 wrote:On Windows/x64 (VS2008) a 32-bit build of Thunderbird 7 consumes a peak of 3.0GB RAM. A 64-bit build peaks at 3.6GB.

And that's for non-PGO builds. You need some serious resources to build contemporary Mozilla applications.

Ok then. So this is not a bug - it's just how things have turned out to be these days.
.:Det:.
Posts: 20
Joined: November 25th, 2010, 6:48 am

Re: ld taking way too much memory

Post by .:Det:. »

Ok, the real problem turned out to be the fact that Arch started using tmpfs.

Tmpfs is a virtual file system located in the RAM with the default maximum size of 2GB. Now, when one downloads the whole thunderbird sources and on top of this starts building it, it _really_ takes _a lot_ of space.

So if one is to build thunderbird/firefox/seamonkey/whatever it should be done outside /tmp. It's for smaller stuff more quickly accessed in your RAM.
Post Reply