[Scons-users] Issue with repositories
Tom Tanner (BLOOMBERG/ LONDON)
ttanner2 at bloomberg.net
Tue Sep 24 03:32:38 EDT 2013
I've discovered something odd happens to my sconsign file with repositories:
Given this directory structure in my 'test' directory
a.hh
a.cc includes a.hh
fred/b.cc
SConstruct
out/ (for building in)
SConstruct contains:
----
env = DefaultEnvironment()
o2 = env.StaticObject('fred/b.cc')
a = env.Object('a.cc')
env.Program('a.out', (a, o2))
-----
build once, and run sconsign:
--------
=== .:
a.cc: 49995f9409d51c51534c02483d262eb9 1380007290 46
a.o: bf0d95f1615e5adc89d702276b0aa2a9 1380007349 492
a.cc: 49995f9409d51c51534c02483d262eb9 1380007290 46
/home13/ttanner/test/a.hh: d41d8cd98f00b204e9800998ecf8427e 1342541574 0
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
7ddbddaea8e8f90e89d45e9fa7d470d3 [$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES]
a.out: 567092ea1ea42d1d1a17d6563f5c2404 1380007349 5744
a.o: bf0d95f1615e5adc89d702276b0aa2a9 1380007349 492
fred/b.o: 7398ff69997948bc3dd4bc0fd2d12e7a 1380007349 452
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
6492ffd1a58e6c69946cb8b6d4001bb7 [$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS]
=== /home13/ttanner/test:
a.hh: d41d8cd98f00b204e9800998ecf8427e 1342541574 0
=== /usr/local/bin:
g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
=== fred:
b.cc: d41d8cd98f00b204e9800998ecf8427e 1379947770 0
b.o: 7398ff69997948bc3dd4bc0fd2d12e7a 1380007349 452
fred/b.cc: d41d8cd98f00b204e9800998ecf8427e 1379947770 0
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
bd195602be1db3bf1c055a2cd88bcc22 [$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES]
--------
Now all I do is change a.cc by adding a comment, and the sconsign file changes to this:
----------
=== .:
a.cc: 478319ac3c75658c260975e0a6943067 1380007583 55
a.o: bf0d95f1615e5adc89d702276b0aa2a9 1380007591 492
a.cc: 478319ac3c75658c260975e0a6943067 1380007583 55
/home13/ttanner/test/a.hh: d41d8cd98f00b204e9800998ecf8427e 1342541574 0
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
7ddbddaea8e8f90e89d45e9fa7d470d3 [$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES]
a.out: 567092ea1ea42d1d1a17d6563f5c2404 1380007349 5744
a.o: bf0d95f1615e5adc89d702276b0aa2a9 1380007591 492
fred/b.o: 7398ff69997948bc3dd4bc0fd2d12e7a 1380007349 452
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
6492ffd1a58e6c69946cb8b6d4001bb7 [$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS]
=== /home13/ttanner/test:
a.cc: 49995f9409d51c51534c02483d262eb9 1380007290 46
a.hh: d41d8cd98f00b204e9800998ecf8427e 1342541574 0
a.o: bf0d95f1615e5adc89d702276b0aa2a9 1380007349 492
a.cc: 49995f9409d51c51534c02483d262eb9 1380007290 46
/home13/ttanner/test/a.hh: d41d8cd98f00b204e9800998ecf8427e 1342541574 0
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
7ddbddaea8e8f90e89d45e9fa7d470d3 [$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES]
a.out: 567092ea1ea42d1d1a17d6563f5c2404 1380007349 5744
a.o: bf0d95f1615e5adc89d702276b0aa2a9 1380007349 492
fred/b.o: 7398ff69997948bc3dd4bc0fd2d12e7a 1380007349 452
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
6492ffd1a58e6c69946cb8b6d4001bb7 [$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS]
=== /usr/local/bin:
g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
=== fred:
b.cc: d41d8cd98f00b204e9800998ecf8427e 1379947770 0
b.o: 7398ff69997948bc3dd4bc0fd2d12e7a 1380007349 452
fred/b.cc: d41d8cd98f00b204e9800998ecf8427e 1379947770 0
/usr/local/bin/g++: 7cb5dc0848a5cc6435829c5579423bd0 1067169538 379332
bd195602be1db3bf1c055a2cd88bcc22 [$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES]
---------------
Note that a.o is now showing in /home13/ttanner/test and .
This causes at least one of my problems with checking for out-of-date files because there's 2 versions of a.o and one of them gets the signature updated but it appears it's the *other* one that gets passed to the Decider function so when I do the target.get_stored_info().ninfo.csig, I get a different target to what the build is using, making it look like the md5 is incorrect.
Not to mention it doubles the size of the .sconsign file which is quite considerable for our real build.
More information about the Scons-users
mailing list