[Scons-users] Error in python function Command
Kermin Elliott Fleming
kfleming at MIT.EDU
Tue Apr 2 15:20:33 EDT 2013
Hi,
I'm attempting to use a python function as a Command-based builder. Invocation
looks something like this:
def cut_tree_build(target, source, env):
print "XXX src: " + str(source)
print "XXX target: " + str(target)
# remainder of builder removed
tree_components = moduleList.env.Command(treeNodeBSV, boundary_logs,
cut_tree_build)
Now, at runtime, I get the following cryptic error:
scons: done reading SConscript files.
scons: Building targets ...
scons: `depends-init' is up to date.
scons: done building targets.
ValueError: Cell is empty:
File
"/home/kfleming/topo/build/default/traffic_light_exe_synth/pm/SConstruct", line
110:
Build(moduleList)
File
"/home/kfleming/topo/build/default/traffic_light_exe_synth/pm/site_scons/build_pipeline/SimulationPipeline.py",
line 21:
bsv = BSV(moduleList)
File
"/home/kfleming/topo/build/default/traffic_light_exe_synth/pm/site_scons/bsv_tool/BSV.py",
line 126:
tree_components = moduleList.env.Command(treeNodeBSV, boundary_logs,
cut_tree_build)
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Environment.py",
line 1849:
bld = apply(SCons.Builder.Builder, (), bkw)
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Builder.py",
line 246:
kw['action'] = SCons.Action.Action(kw['action'])
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Action.py",
line 407:
return _do_create_action(act, kw)
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Action.py",
line 366:
return action_type(act, kw)
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Action.py",
line 897:
self.funccontents = _callable_contents(execfunction)
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Action.py",
line 177:
return _function_contents(obj)
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Action.py",
line 284:
xxx = map(lambda x: _object_contents(x.cell_contents), closure)
File
"/afs/csail.mit.edu/group/csg/tools/tools_lx86/scons/1.2/lib/scons-1.2.0/SCons/Action.py",
line 284:
xxx = map(lambda x: _object_contents(x.cell_contents), closure)
make: *** [all] Error 2
I have no idea what this means, nor did I have luck googling or examining the
SCons source Action.py. As far as I can tell Action.py is doing some
dependence calculation and building a closure to be called at runtime in
_function_contents. I am not sure why it fails because SCons has no problem
with similar python function commands elsewhere in our rather complex build
process, this one seems to choke it.
Anybody seen this one before?
Thanks,
Elliott
More information about the Scons-users
mailing list