[Pkg-osg-devel] ccache

Alberto Luaces aluaces at udc.es
Fri Jan 28 20:10:57 UTC 2011


(Sorry for sending the message to you instead of the list.)

Hi Manuel,

"Manuel A. Fernandez Montecelo" writes:

> Hi,
>
> On Wednesday 26 January 2011 14:19:06 Alberto Luaces wrote:
>> Hi,
>> 
>> while testing several changes that I'm commiting to the git repository,
>> I noticed that 'ccache -s' reports always cache faults, even usually I
>> don't make any changes to the source, issuing the compilation at normal
>> (low) speed.
>> 
>> I think this comes from the fact that we are compiling OSG in two
>> passes --- static and dynamic --- and as soon as ccache hits a file with
>> the other configuration, it throws away the one that it had for the
>> newer one. I thought it stored files by md5sum, not file name, that's
>> why I'm surprised. Does it sound sensible?
>
> Maybe when compiling different flags are issued, so the source file includes 
> a slightly different content (e.g. "#define STATIC_BUILD 1"), and that 
> causes the md5sum to be different?
>

Of course, but I thought the preprocessed files were stored by md5sum on
their content and not by name. Anyway, I'm not really sure if this is
the case.

>
>
>> In that case maybe I could implement a switch system as it is done with
>> patches, in order to at least reuse the last configuration:
>> 
>> static → dynamic → (recompilation) → dynamic → static →
>> (recompilation)...
>> 
>> Or maybe is just fine for the testing period to comment out one of the
>> configurations and uncomment it for commits :)
>
> I usually compile in a big machine with 8 processors and use "parallel=10", 
> so for me this is not a problem.
>

Lucky you! :)

>
> Maybe commenting out is enough, or some sort of switch can be
>implemented
> (if it's allowed by debian/rules guidelines): e.g. build optionally dynamic 
> only:
>
> http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
>

I have gone somewhat on that route and created a patch for myself in
order to enable/disable static building. Now ccache works as it did, and
only the final combined test build takes longer.

-- 
Regards,

Alberto



More information about the Pkg-osg-devel mailing list