[ccache] feature wishes and questions
Basile STARYNKEVITCH
basile at starynkevitch.net
Sun Sep 25 15:29:46 GMT 2005
Dear Ccache developers
I'm giving here some features I would wish to suggest for
ccache. Unfortunately, I don't have the incentive or time to develop
them.
First (and this is actually a question) how to deal with cache
corruption. My laptop (MSI S270 - see
http://starynkevitch.net/Basile/msi_s270_linux.html for more - seems
to have occasionaly problems (maybe memory, but memtest don't detact
any errors in a 12hour run, maybe bus controller?)
The symptom is for example that a cc1 or as pass of the gcc compiler
output a single wrong bit, or (for as) got a single wrong bit on
input. For a concrete example (this one is a kernel compile not using
ccache, but it is the only example I actually saved to a file)
CC drivers/message/i2o/i2o_config.mod.o
LD [M] drivers/message/i2o/i2o_config.ko
CC drivers/message/i2o/i2o_core.mod.o
LD [M] drivers/message/i2o/i2o_core.ko
CC drivers/message/i2o/i2o_proc.mod.o
{standard input}: Assembler messages:
{standard input}:6185: Error: unknown pseudo-op: `.uleb1'
{standard input}:6186: Error: junk at end of line, first unrecognized character is `"'
make[1]: *** [drivers/message/i2o/i2o_proc.mod.o] Error 1
make: *** [modules] Error 2
Then I restart thru make, and the same file is compiled ok:
Building modules, stage 2.
MODPOST
CC drivers/message/i2o/i2o_proc.mod.o
LD [M] drivers/message/i2o/i2o_proc.ko
So you see that the produced assembly got a .uleb1 instead of .ulab1
directive. This is a single-bit error.
I once (when compîling Qt4 snapshot) got a similar error, and the
erronous .o file got into ccache ~/.ccache file. I saw no other way to
remove this fault from the cache that to erase the entire cache. It
took me a whole hour (ok I am a ccache newbie) to guess that the fault
was indeed stored in the cache ~/.ccache of ccache.
This brings several suggestions
1. have an option to force recompilation (ie behave as if there is
always a cache miss), like
ccache -F gcc ....
2. have some log option which tell in which file a given compilation
is cached (the source code of ccache seems to suggest there is
something for this, I didn't found it yet).
I also have another question: if the same file foo.c is in 2 different
directories compiled the same way, does the compilation from the first
directory serves as cache for the second one? And what if dir1/foo.c
is the same as dir2/foo2.c?
Also, can we remove individual files from the cache?
Regards, and thanks for your good work!
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile(at)starynkevitch(dot)net
8, rue de la Faïencerie, 92340 Bourg La Reine, France
More information about the ccache
mailing list