[Scons-users] Re-2: Code generation dependency problem
Roman Karlstetter
Roman.Karlstetter at ifta.com
Mon Dec 8 08:03:14 EST 2014
Hi Dirk,
> there's no real magic involved.
As with every magic: it's only magic as long as you don't understand what's really going on, so now I understand why this part works :) thanks for the explanation!
> Am I right in assuming that you're German?
That's right, I had a look at the slides and will perhaps watch the talk when I find time.
I tried some other things, and now I think that my problem is related to the fact that I'm using a variant_dir build.
When I activate the variant_dir build, there seems to be a problem with the dependencies, which explains why it works for a single process build: the cpp-file is, by chance, generated before the corresponding object file is built. For more processes, both jobs are started at the same time, with the result that the cpp-file is not available yet.
without variant_dir:
scons.py src/generated.o --tree=status
[ B ]+-src\generated.o
[E B C ] +-src\generated.cpp
[E C ] | +-src\external\schema1.xsd
[E C ] | +-src\external\schema2.xsd
...
with variant_dir='project_x86/build/debug/g++/' if the generated.cpp file does not exist:
scons.py project_x86/build/debug/g++/generated.o --tree=status
[E B ]+-project_x86\build\debug\g++\generated.o
[ ] +-src\generated.cpp
[E C ] +-C:\MinGW\bin\g++.EXE
with variant_dir='project_x86/build/debug/g++/' if the generated.cpp file exists, I get a python exception:
AttributeError: 'NoneType' object has no attribute 'get_contents':
...
Node\__init__.py", line 1102:
contents = self.get_executor().get_contents()
Any ideas what I am still doing wrong?
Thanks in advance,
Roman
More information about the Scons-users
mailing list