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

Matias Iturburu matias.iturburu at tallertechnologies.com
Tue Nov 5 08:34:45 EST 2013


2013/11/4 Dirk Bächle <tshortik at gmx.de>


> 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.

>


Wow. Well thank you very much for the insight.
We were certainly feeling the smell.
Before I read this I made a proof of concept Tool for astyle you can see it
here<https://bitbucket.org/fudepan/fudepan-build/src/de85887ecaf0098e2eea9c34542ff1ac0e01b471/site_scons/site_tools/astyle/__init__.py?at=issue195>
.
That made me notice the point you are making about having dirs as targets.
I don't really understand why is a bad idea the thing about "run always
tasks". It would really help if you elaborate.

Our current efforts on fbuild are about using more proper SCons recipes for
every task we have.
Right now the priority are the astyle and cppcheck tools. Hopefully we end
up with something we can share back to the community.


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.

>


Ok. I'll give this a try and let you all know.

Thank you again for all the support!



>

> Best regards,

>

> Dirk

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>



--
<http://www.tallertechnologies.com>
Matías Iturburu
Software Engineer




*San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina *

*Phone: +54 351 4217888 / +54 351 4218211 Skype: matias.iturburu*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131105/1ad2f6fd/attachment.htm


More information about the Scons-users mailing list