Packages that use scons fail to build when you use custom MAKEOPTS, for example --load-average. See bug 269724 for an example affecting media-gfx/lprof. games-strategy/blog2 is also affected, and all other packages using scons will be too. The problem is with dev-util/scons. There are some make options that SCons doesn't implement yet, and --load-average is one of them. When SCons sees one of these, it prints a warning to stderr, and then it exits with a zero status *without doing anything*. Of course, this fools Portage into thinking that the build was successful. This is obviously very broken behavior from scons -- if it's aborting the build, it should exit with an error status. I have already reported the problem upstream. I sent an email to the dev-team 3 weeks ago, to which there was no response. I have now found their bugtracker and made a report there, together with a patch to fix the problem. Note this affects *every* ebuild that uses scons, not just media-gfx/lprof. I will attach my patch here so we can apply it until upstream fixes this.
Forgot to mention, this is relating to dev-util/scons-1.2.0-r1. I don't know about earlier versions, but I assume they also have the bug.
Created attachment 212235 [details, diff] patch to fix the problem, made against scons-1.2.0 2009-12-06 Israel G. Lugo <israel.lugo@lugosys.com> * src/engine/SCons/Script/SConsOptions.py (Parser.opt_not_yet): Exit with status 1 to indicate error. Fixes fooling automated build scripts into thinking the build was successful.
URL to the bug I filed upstream: http://scons.tigris.org/issues/show_bug.cgi?id=2530
Update: upstream has accepted my patch, and it will be incorporated in the next release. It would still be nice to have this fixed in Gentoo in the meantime, I think... As it is now, dev-util/scons breaks builds with something as simple as MAKEOPTS=--load-average=3
This should be fixed in scons-1.2.0_p20091224.
It builds and installs linuxdcpp using MAKEOPTS="-j5 -l10" on my system. Trying out "MAKEOPTS="--unknownoptions" emerge linuxdcpp" breaks with: SCons error: no such option: --unknownoptions * ERROR: net-p2p/linuxdcpp-9999 failed: so scons-1.2.0_p20091224 seems to work like we expect it to for the ebuilds, with the added bonus of also ignoring -l until implemented.
Perfect, thanks.