[Scons-users] CacheDir entries

William Blevins wblevins001 at gmail.com
Fri Oct 24 19:13:44 EDT 2014


Andrew,

I'm not sure I am qualified to answer this question, but since no one else
has attempted, I will try to help the best I can :)

What pieces of information are combined to identify a CacheDir entry?


I imagine that all the information written into .sconsign.dblite for a
target is used.

I ask because I'm interested in setting up a CacheDir on a network share,
> but it is not clear to me what I need to do to make this work with
> heterogeneous client systems.


I wonder if CacheDir is thread safe.  Can more than 1 SCons instance
interact with CacheDir files at a time?  That might be the biggest
question.

As a practical example, consider two otherwise identical linux
> workstations, where the only difference is that one has GCC 4.8 and the
> other has GCC 4.9, but both installed as /usr/bin/gcc. Would these
> workstations share cache entries, assuming identical source files and tool
> invocations? Why, or why not? Similar question for two machines with
> varying contents of /usr/include/stdio.h or other system C and C++ headers
> reached by translation units? For /usr/bin/ld?


A SCons target essentially depends on every artifact that goes into a build
command which includes the compiler and/or linker.  Looking at the
dependency tree for an object compiled with gcc will show the gcc
executable as a dependency, so the cached objects will (most likely) differ
(based on the Decider) since the gcc binaries will not be equivalent.  Of
course this relates to ALL target traits including compiler, compiler
arguments, library paths, include paths, etc.

The system I'm considering would have a few populations of mostly
> homogeneous systems, so if necessary I could capture some information from
> the external environment (contents of env['CC'] --version, contents of
> /etc/lsb_release, etc.) to identify which population a given machine
> belongs to. If I had such a machine fingerprint, what would be the best way
> to inject it into the SCons view of the world such that cache entries with
> different fingerprints were differentiated?


In this case, I don't this that the platform will have an effect as long as
the tools and dependencies are the same.  A different linux OS may have
different system headers, etc, which would cause cache misses potentially.
Also, I know that the md5sum implementation for linux changed between RHEL5
and RHEL6, so that may also cause issues if python uses a 3rd-party library
for this?  I imagine python uses its own implementation though...

Sorry I couldn't be more helpful,
William


On Fri, Oct 24, 2014 at 12:47 PM, Andrew C. Morrow <
andrew.c.morrow at gmail.com> wrote:

>
> Hi All -
>
> What pieces of information are combined to identify a CacheDir entry?
>
> I ask because I'm interested in setting up a CacheDir on a network share,
> but it is not clear to me what I need to do to make this work with
> heterogeneous client systems.
>
> As a practical example, consider two otherwise identical linux
> workstations, where the only difference is that one has GCC 4.8 and the
> other has GCC 4.9, but both installed as /usr/bin/gcc. Would these
> workstations share cache entries, assuming identical source files and tool
> invocations? Why, or why not? Similar question for two machines with
> varying contents of /usr/include/stdio.h or other system C and C++ headers
> reached by translation units? For /usr/bin/ld?
>
> The system I'm considering would have a few populations of mostly
> homogeneous systems, so if necessary I could capture some information from
> the external environment (contents of env['CC'] --version, contents of
> /etc/lsb_release, etc.) to identify which population a given machine
> belongs to. If I had such a machine fingerprint, what would be the best way
> to inject it into the SCons view of the world such that cache entries with
> different fingerprints were differentiated?
>
> One obvious solution would be to have different subdirectories of the
> network mount for each client fingerprint, but that seems clunky. Are any
> contents of the Environment hashed into the cache id? If not, can I request
> that an Environment entry be incorporated, so that I could have
> env['MACHINE_FINGERPRINT'] = get_machine_fingerprint() and make that affect
> the cache id? Are there other techniques for injecting this sort of
> auxilliary information into the cache id for a node?
>
> Thoughts on the above questions, comments from others who have attempted
> this, or pointers to the relevant subsets of the SCons source would be
> greatly appreciated.
>
> Thanks, and apologies for the wall of questions,
> Andrew
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141024/174297f1/attachment.html>


More information about the Scons-users mailing list