[Scons-users] Problem with Repository build

Martin Ritter martin.ritter at lmu.de
Mon Aug 8 05:24:06 EDT 2016


Hi Dirk,

thanks for all the effort :)

On 06/08/16 12:43, Dirk Bächle wrote:
> Martin,
> 
> I checked the log files a bit, thanks for providing them. To me it looks
> as if the file "MilleData.os" doesn't have any children assigned, when
> compiling/building the full package.

It does have children but it cannot print them because the first child throws the exception. 

> This seems to be a problem elsewhere, possibly throwing an exception
> during startup...leading to uninitialized nodes in the internal tree
> representation.

I think the nodes are initialized fine but then the executor info gets freed in release_target_info and then it's accessed again. I added printout to SCons/Node/__init__.py:1462 and SCons/Node/FS.py:2988 to just output when has_changed and release_target_info are excecuted:

scons: done reading SConscript files.
scons: Building targets ...
Node.has_changed: include/alignment/GblMultipleScatteringController.h
Node.has_changed: include/alignment/GlobalLabel.h
[...]
Node.has_changed: include/alignment/PedeApplication.h
Node.has_changed: include/alignment/dataobjects/MilleData.h
Node.has_changed: include/alignment/modules/AlignmentGenerator/AlignmentGeneratorModule.h
FS.release_target_info: alignment/include/GblMultipleScatteringController.h
[...]
FS.release_target_info: alignment/data/misalignmentVXD.xml
Node.has_changed: alignment/data/misalignmentVXD.xml
Node.has_changed: data/alignment/misalignmentVXD.xml
FS.release_target_info: data/alignment/misalignmentVXD.xml
Node.has_changed: data/alignment/misalignmentVXD.xml
FS.release_target_info: alignment/dataobjects/include/MilleData.h 
Node.has_changed: alignment/dataobjects/include/MilleData.h
Node.has_changed: include/alignment/dataobjects/MilleData.h
FS.release_target_info: include/alignment/dataobjects/MilleData.h
Node.has_changed: include/alignment/dataobjects/MilleData.h
FS.release_target_info: alignment/dataobjects/include/PedeSteering.h
Node.has_changed: alignment/dataobjects/include/PedeSteering.h
Node.has_changed: include/alignment/dataobjects/PedeSteering.h
FS.release_target_info: include/alignment/dataobjects/PedeSteering.h
Node.has_changed: include/alignment/dataobjects/PedeSteering.h
Node.has_changed: None executor for  include/alignment/dataobjects/MilleData.h <--- exception happens here
Node.has_changed: build/Linux_x86_64/opt/alignment/dataobjects/src/MilleData.os
Node.has_changed: build/Linux_x86_64/opt/alignment/dataobjects/src/MilleData.os
scons: *** [build/Linux_x86_64/opt/alignment/dataobjects/src/MilleData.os] AttributeError : 'NoneType' object has no attribute 'get_contents'
 
note that MilleData.os depends on MilleData.h and for some reason it's executor info is freed before the requirements of MilleData.os are examined. Strange thing is that I cannot reproduce this in a minimal example so it could be something with our tools but I haven't found anything so far. If I just comment out line 2995 in Node/FS.py where it sets the executor to None everything seems to work fine.


> 
> Here's what you can do to track this further down:
> 
> - Check all your custom Scanners and Emitters (if you have any) and
> ensure that they test for the existence of the current File Node, before
> trying to open it and reading its contents.

Will do

> - Try trimming down CPPPATH to a minimum set for compiling the
> "MilleData" package only, and see if this makes the error go away too.
> If yes, it would imply that the problem is related to scanning in a way.

I will try, but sadly our dependencies are numerous and chaotic :/

> - Finally, run the build until the first exception happens. For this,
> you can comment out the setup/teardown of the sig_handler() and remove
> the try/finally block in src/engine/SCons/Job.py, such that the run()
> method looks like:
> 
>   def run(self, postfunc=lambda: None):
>     self.job.start()
>     postfunc()

This does not seem to have any effect

Cheers,

Martin


-- 
Dr. Martin Ritter

LMU München, Excellence Cluster Universe
Boltzmannstrasse 2, 85748 Garching

Tel: (+49) 89 35831-7152
Fax: (+49) 89 3299-4002


More information about the Scons-users mailing list