I have tuned the number of jobs I want building so that there are not build errors from the heat on some older hardware and so that there is less impact on using the system while compiling.
In watching top during a build of samba, I was surprised to see all 8 cores used for the install phase instead of 6, 3, or even 1. The compile phase is accurately limited according to the MAKEOPTS -j seeing, but other phases aren't.
For me, that meant that ld failed because of hardware issues when this particular system overheats. I don't believe that's a bug in samba, because I had similar issues with other packages until I lowered the jobs level to better manage the heat. But samba continued to cause me errors.
Today I found a pointer in the ebuild to #683148 which discovered that waf-utils.eclass is not passing the jobs arg to waf during configure phase. That didn't matter for the big in question because they had to cap samba at 1 job during the configure phase.
Inspecting the eclass, the jobs arg is not passed in either configure or install phase.
For this machine editing the samba rebuild in my local overlay to add `--jobs 1` to the waf install line allowed the build to complete. So, if waf-utils.eclass respected my jobs setting I could avoid the hardware settings until I can afford to replace this machine.
Steps to Reproduce:
1. Use a lower than normal jobs setting in MAKEOPTS (like -j3 or -j1)
2. Build samba while watching with top
3. Count number of active jobs during install phase.
The install phase used 8 jobs (following number of effective cores) during install phase. It did this no matter the MAKEOPTS setting (I tried with -j6, -j3, and -j1).
The max number of jobs should respect MAKEOPTS in all phases, not just during compile.
While testing this I disabled all system services that weren't necessary so that as few things were running as possible.
The hardware issues are not what this issue is about. I'm asking for a change of the waf-utils.eclass.
Link to related bug#683148 that found that configure phase was not getting jobs setting.