Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295972 - [patch] dev-util/scons: silently breaks ebuilds when using custom MAKEOPTS
Summary: [patch] dev-util/scons: silently breaks ebuilds when using custom MAKEOPTS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
Keywords: Inclusion
Depends on:
Blocks: 269724
  Show dependency tree
Reported: 2009-12-06 15:01 UTC by Israel G. Lugo
Modified: 2010-01-04 10:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

patch to fix the problem, made against scons-1.2.0 (scons-1.2.0-notimpl-error.patch,586 bytes, patch)
2009-12-06 15:11 UTC, Israel G. Lugo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Israel G. Lugo 2009-12-06 15:01:28 UTC
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.
Comment 1 Israel G. Lugo 2009-12-06 15:06:10 UTC
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.
Comment 2 Israel G. Lugo 2009-12-06 15:11:42 UTC
Created attachment 212235 [details, diff]
patch to fix the problem, made against scons-1.2.0

2009-12-06  Israel G. Lugo <>

    * src/engine/SCons/Script/ (Parser.opt_not_yet): Exit
    with status 1 to indicate error. Fixes fooling automated build scripts
    into thinking the build was successful.
Comment 3 Israel G. Lugo 2009-12-06 15:13:46 UTC
URL to the bug I filed upstream:
Comment 4 Israel G. Lugo 2009-12-15 03:23:02 UTC
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
Comment 5 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-01-04 08:42:23 UTC
This should be fixed in scons-1.2.0_p20091224.
Comment 6 Xake 2010-01-04 10:45:58 UTC
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.
Comment 7 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-01-04 10:55:40 UTC
Perfect, thanks.