[Scons-dev] scons terminating silently

Brady Johnson bradyallenjohnson at gmail.com
Mon Aug 27 09:27:19 EDT 2012


Ive seen the silent termination behavior you mention. Strangely it was
caused by switching from Python 2.6 to 2.7.

With Python 2.6 errors were caught and displayed before exiting. With
Python 2.7 with the exact same SCons scripts and same error, it just quit
silently.

This was with a Hierarchical SCons build, so I had to "wrap" the calls to
SConscript in the root SConstruct with try/except blocks to get details
about the SCons.Errors.BuildError.

Hope that helps,

Brady


On Mon, Aug 27, 2012 at 12:21 PM, Tom Tanner (BLOOMBERG/ LONDON) <
ttanner2 at bloomberg.net> wrote:


> I think I know have a handle on this.

>

> My SConscript is calling env.Subst before the main build process starts.

> This doesn't offhand seem to be a particularly wrong thing to do. I think

> it's not unrelated to another problem I have, as our C++ include path and

> defiens are different to our C ones, and our C++ objects are called with

> env.StaticObject(blah, CPPDEFINES = env['CXXDEFINES'], CPPPATH =

> env['CXXPATH'] + env['CPATH'])

> whereas our C ones are called thus:

> env.StaticObject(blah, CPPDEFINES = env['CDEFINES'], CPPPATH =

> env['CPATH'])

>

> and if I change Subst.py at line 444 to just raise the exception, with my

> previously mentioned broken import:

>

> def _concat_dict(blah):

> from SCons.Defaults import _concay

>

> env['_concat'] = _contact_dict

>

> Then the stack trace goes back via bits of Subst to a env.StaticObject

> call.

>

> So, basically, Subst 'does things' to any exceptions raised during

> processing, and this calls scons to fail silently. Please could this be

> fixed. I'm not knowledgable enough to determine whether or not the change I

> did is at all safe.

>

> env.Subst can under the right circumstances throw a BuildError. I think

> it's related to the code at lines 444 and / or 666 which translates any

> raised exception into a BuildError.

>

> As this is happening when reading the SConscript file, this gets caught in

> Main.py, which promptly prints nothing at all and exits quietly.

>

>

>

>

>

> ----- Original Message -----

> From:

> To: garyo at oberbrunner.com, scons-dev at scons.org

> At: Aug 24 2012 18:01:07

>

> OK, for some reason, SCons is getting this ImportError thrown whilst

> processing my SConstruct file. This is throwing a BuildError which has

> wrapped an ImportError. The code at line 986 only traps StopErrors, so it

> goes back up to to main code and doesn't print anything (see lines 1380 or

> so)

>

> ----- Original Message -----

> From: garyo at oberbrunner.com

> To: TOM TANNER (BLOOMBERG/ LONDON)

> At: Aug 23 2012 20:56:05

>

> On Tue, Aug 21, 2012 at 3:55 AM, TOM TANNER (BLOOMBERG/ LONDON)

> <ttanner2 at bloomberg.net> wrote:

> > That helps not at all, sadly

>

> Please do let us know if you figure it out. A bunch of over-broad

> exception handlers were cleaned up a couple of years ago, maybe some

> are still lurking.

>

> --

> Gary

>

> _______________________________________________

> Scons-dev mailing list

> Scons-dev at scons.org

> http://two.pairlist.net/mailman/listinfo/scons-dev

>

> _______________________________________________

> Scons-dev mailing list

> Scons-dev at scons.org

> http://two.pairlist.net/mailman/listinfo/scons-dev

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20120827/57f449f1/attachment.htm>


More information about the Scons-dev mailing list