You are not logged in.

#1 2017-11-04 18:25:19

jugg
Member
Registered: 2014-07-03
Posts: 14

[SOLVED] build fails from out of memory, need to limit number of jobs

I'm building on an older computer with only 4gb ram (non upgradable) with two cores (4 threads).

Typically this isn't an issue.  I set /etc/makepkg.conf  MAKEFLAGS=-j1 which limits the number of jobs to 1

However, when building 'firefox-esr' from the AUR, the build process spins up four cc1plus processes which end up consuming all the memory and eventually erroring out.

I've tried removing from the firefox-esr PKGBUILD, the line options=(!emptydirs !makeflags) so that the global makeflags aren't ignored, but that also did not help.

I'm at a loss to what is causing the build to behave as if -j4 is specified in MAKEFLAGS.

Any ideas?

Last edited by jugg (2017-11-04 19:39:09)

Offline

#2 2017-11-04 18:29:15

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] build fails from out of memory, need to limit number of jobs

I'm not sure it's possible to build Firefox with that little RAM anymore.
You could try adding more swap to your system and then building but it would probably take days.

Is there any reason you can't use firefox-esr-bin instead?

Last edited by Slithery (2017-11-04 18:33:38)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-11-04 18:30:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] build fails from out of memory, need to limit number of jobs

Add swap? Make sure you're not building in tmpfs?

Offline

#4 2017-11-04 19:01:31

jugg
Member
Registered: 2014-07-03
Posts: 14

Re: [SOLVED] build fails from out of memory, need to limit number of jobs

Thanks for the responses.

I'm not using firefox-esr-bin because I understood that it requires pulseaudio.  If that isn't the case, I certainly will switch over.

I'm not building with tmpfs, and hitting swap is just painfully slow.  But if worse comes to worse...

I just know that limiting the make jobs keeps the memory usage within limits, as I've successfully built firefox-esr before by doing so.  So if I can figure out why the MAKEFLAGS aren't being respected, I'm hoping this can still work.

Offline

#5 2017-11-04 19:07:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] build fails from out of memory, need to limit number of jobs

Well the PKGBUILD seems to be calling mach, not make. I don't know what mach does, but if it's not calling make behind the scenes, MAKEFLAGS would understandably not do anything.

Offline

#6 2017-11-04 19:16:59

jugg
Member
Registered: 2014-07-03
Posts: 14

Re: [SOLVED] build fails from out of memory, need to limit number of jobs

Thanks, that might get me somewhere - I've located https://developer.mozilla.org/en-US/doc … ompilation

I'll dig into that further.

Offline

#7 2017-11-04 19:37:59

jugg
Member
Registered: 2014-07-03
Posts: 14

Re: [SOLVED] build fails from out of memory, need to limit number of jobs

Thanks Scimmia, I was able to get it working with this patch to the PKGBUILD

22c22
< options=(!emptydirs !makeflags)
---
> options=(!emptydirs)
123a124,125
> 
> mk_add_options MOZ_MAKE_FLAGS="$MAKEFLAGS"

Offline

Board footer

Powered by FluxBB