[Scons-users] Implicit cache error after running a successful build

Dirk Bächle tshortik at gmx.de
Mon Nov 4 18:04:09 EST 2013


Hi Matias,

On 04.11.2013 17:48, Matias Iturburu wrote:

>

>>

>> [...]

>>

>> Got this:

>>

>> $ fbuild biopp:astyle

>>

>> scons: Reading SConscript files ...

>> scons: qt4: no header for

>> 'build/mili/examples/example_prepos-caller.cpp'.

>> scons: qt4: no header for 'build/mili/examples/example_ranker.cpp'.

>> [...]

>>

>>

>> Not sure how to read it, but it seems that the tool doesn't find

>> anything interesting.

>

> if the Qt4 Tool would add implicit dependencies, the debug

> messages should show it...the problem seems to lie elsewhere. Can

> you show us how the Astyle Builder looks like?

>

>

> Ok, it's a multipart answer.

> The builder is "registered" here

> <https://bitbucket.org/fudepan/fudepan-build/src/4bb61283da51e8d8c7aa67e20977d482846c9982/site_scons/builders.py?at=default#cl-65>.

> Defined here

> <https://bitbucket.org/fudepan/fudepan-build/src/4bb61283da51e8d8c7aa67e20977d482846c9982/site_scons/builders.py?at=default#cl-266>.

> And is ran via the alias declared here

> <https://bitbucket.org/fudepan/fudepan-build/src/4bb61283da51e8d8c7aa67e20977d482846c9982/site_scons/core_components.py?at=default#cl-691>.

> That last procedure also prepares the file list and everything related.

>


I was able to reproduce the error on my side, and debugged it a little
bit. Here's basically what happens: The Qt4 Tool registers its own
special Emitters with the default ones for objects and programs. These
emitters get then called for each source file and create a bunch of
"dummy nodes", for each possible header extension like '*.H' or '*.hpp'
(this is needed for the AutoMoc feature to work correctly).
Usually, the Taskmaster will skip over these nodes and remove them
automatically during the Build phase.
But for your AStyle Builder, you are adding a directory as target. This
means that SCons picks up all "dummy nodes" under this folder again as
children,...that's where those funny implicit dependencies come from.

So, using directories as a target is a bad idea in general. Using SCons
for this kind of "run always" tasks is a bad idea, too. ;)

However, I found a workaround that might help you out for now. In the
attached patch, I change the definition of the AStyle Builder such that
it has a File as target. The name of the target never exists, which
means that the build will get executed every time (no AlwaysBuild
needed). Additionally, since its a File, it doesn't pick up the "dummy
nodes" from the Qt4 Tool anymore.

Please give it a try, and use it if you like. But take into account that
this is pretty hacky and not guaranteed to work under all circumstances.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131105/c4a8b227/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fudepan_astyle.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
Url : http://four.pairlist.net/pipermail/scons-users/attachments/20131105/c4a8b227/attachment-0001.bin


More information about the Scons-users mailing list