[ccache] lilypond doesn't compile with ccache (DEPENDENCIES_OUTPUT)
Koblinger Egmont
egmont at uhulinux.hu
Mon Aug 11 00:13:17 EST 2003
Hi,
lilypond 1.6.10 compiles fine without ccache, however it fails if ccache
is used.
Get the source from ftp://ftp.lilypond.org/pub/LilyPond/v1.6/ and the two
patches from http://www.uhulinux.hu/~egmont/lilypond/ (these make it
compile with gcc 3.3). Do a "./configure; make". If ccache is not in your
PATH, it will succeed.
When I use ccache (installed with symlinks as the manpage suggests as the
second way, no $CCACHE_* variables set, empty ~/.ccache dir at the
beginning) "make" fails with this error:
make[2]: *** No rule to make target `/home/egmont/.ccache/tmp.stdout.boci.5961.
make[2]: Leaving directory `/tmp/lilypond-1.6.10/flower'
make[1]: *** [out/lilypond] Error 2
rm out/parser.cc out/lexer.cc
make[1]: Leaving directory `/tmp/lilypond-1.6.10/lily'
make: *** [all] Error 2
Everything up to this message is the same as if I compile without ccache.
Strange, but if I type "make" once again, or start the complete procedure
from the very beginning (untarring the source and then ./configure; make)
but leave the old contents of ~/.ccache, then I get a different error
message ("collect2: ld returned 1 exit status" without any further
explanation).
There are a lot of .dep files generated at the early stage of "make". The
one that contains the string "/home/egmont/.ccache/tmp.stdout.boci.5961"
is flower/out/axis.dep. This file looks like this when compiling without
ccache:
./out/axis.o: axis.cc include/axes.hh include/string.hh \
include/arithmetic-operator.hh include/flower-proto.hh include/real.hh \
include/string-handle.hh include/string-handle.icc \
include/string-data.hh include/string-data.icc include/international.hh \
include/compare.hh include/string.icc
but when ccache is used, this file has one more line:
./out/axis.o: axis.cc include/axes.hh include/string.hh \
include/arithmetic-operator.hh include/flower-proto.hh include/real.hh \
include/string-handle.hh include/string-handle.icc \
include/string-data.hh include/string-data.icc include/international.hh \
include/compare.hh include/string.icc
./out/axis.o: /home/egmont/.ccache/tmp.stdout.boci.5961.ii
All the other *.dep files have a similar extra line appended which point
to some ccache-internal filename, which means that somehow ccache fails to
remain transparent for lilypond.
The command that generates this .dep file is:
DEPENDENCIES_OUTPUT="./out/axis.dep ./out/axis.o" c++ -c -DHAVE_CONFIG_H
-DSTRING_UTILS_INLINED -Iinclude -I./out -I../flower/include
-I../flower/./out -O2 -finline-functions -g -O2 -finline-functions -g
-Wall -W -Wmissing-prototypes -Wconversion -o out/axis.o axis.cc
I can't see yet how these .dep files are included from the Makefiles, but
I don't think it's important.
Please take a look at this problem. It seems to me that ccache should fix
the DEPENDENCIES_OUTPUT files after running gcc itself, but real
developers should know it better than me :-)
Another trivial workaround might be to let an existing DEPENDENCIES_OUTPUT
env variable simply imply CCACHE_DISABLE. A small patch is attached.
Have a nice holiday,
Egmont
Ps: gcc 3.3.1, ccache 2.2.
-------------- next part --------------
diff -urN ccache-2.2.orig/ccache.c ccache-2.2/ccache.c
--- ccache-2.2.orig/ccache.c 2003-02-17 02:11:58.000000000 +0100
+++ ccache-2.2/ccache.c 2003-08-10 15:56:21.000000000 +0200
@@ -553,6 +553,17 @@
struct stat st;
char *e;
+ if (getenv("DEPENDENCIES_OUTPUT")) {
+ cc_log("environment variable DEPENDENCIES_OUTPUT is unsupported\n");
+ stats_update(STATS_UNSUPPORTED);
+ failed();
+ }
+ if (getenv("SUNPRO_DEPENDENCIES")) {
+ cc_log("environment variable SUNPRO_DEPENDENCIES is unsupported\n");
+ stats_update(STATS_UNSUPPORTED);
+ failed();
+ }
+
stripped_args = args_init(0, NULL);
args_add(stripped_args, argv[0]);
More information about the ccache
mailing list