[Scons-users] Previous build information lost with ProtoBuilder/Gch interaction

Carl Cerecke carl.cerecke at compacsort.com
Mon Aug 3 22:36:24 EDT 2015


I have two Sconscript files, both building a single static library,
and both called from the same SConstruct (they are the only two
Sconscript files called).

One StaticLibrary uses ProtocBuilder
(https://bitbucket.org/scons/scons/wiki/ProtocBuilder) as part of its
build. Let's call this library libProto.
The other StaticLibrary uses g++ precompiled headers
(https://bitbucket.org/scons/scons/wiki/GchBuilder) as part of its
build. Let's call this libGch.

Building from scratch works fine.

Problem: Rebuilding (after no changes) builds everything again and
--debug=explain gives the message "scons: Cannot explain why
`/path/to/build/Filename.o' is being rebuilt: No previous build
information found"

If I stop libGch from using precompiled headers, the rebuild (for both
libraries) works as expected.

If I stop LibProto from depending on the .cc file that was generated
by the ProtocBuilder, then the rebuild (for both libraries) works as
expected.

What is utterly confusing is that, whether or not libGch finds
previous build information or not, depends on whether an unrelated
dependency exists in a *separate* Sconscript file that should be
completely independent!

Both Sconscript files use a clone of the environment they imported
from the parent SConstruct, so they should be independent.

I've tried env.Decider('MD5') and env.Decider('MD5-timestamp').
I've tried looking at the differences in .sconsign.dblite between
libGch working correctly, and libGch failing to find previous build
information - nothing seemed obviously amiss.
Likewise I've looked at any difference in environment, but again, it
all seems OK.

I checked the code in Node.__init__.py and noticed that the 'old'
variable in the explain() method doesn't have any of the attributes
{'bsources','bdepends','bimplicit'} which causes the exception. It
does have the -sigs version of those attributes, but they are simply
empty lists. I don't know what that means, though.

I'm using scons 2.3.1

Any ideas on what might be going wrong?

I might extract a small example set of files which exhibit the problem
if that would help
-- 
Carl Cerecke


More information about the Scons-users mailing list