Description of problem:
icecream is a distributed compiler (see http://en.opensuse.org/Icecream).
icecream is in Rawhide. If both ccache and icecream are installed, icecream is
effectively disabled. Compilation jobs are handled by ccache, but cache misses
are not passed to icecream.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install icecream on a few machines on LAN, run icecc-scheduler on one of
them, run iceccd on all of them (including your own). Install ccache on your
2. Login on your machine. Notice that 'which gcc' points to ccache (that's
fine and expected).
3. Compile a kernel or something else with -j20. Notice that your ccache cache
is being populated, but since ccache does not know about icecream, the compile
jobs are not distributed to the other machines.
Everything is compiled locally.
Compile jobs should be distributed to other nodes running iceccd.
The attached patch makes ccache aware of icecream.
Created attachment 271341 [details]
teach ccache about icecream
Looks pretty sane at first sight, some comments though.
I'm slightly worried about unconditionally overriding $PATH that way. Wouldn't
that produce unexpected results if let's say a user wishes to use a real
compiler executable from /usr/local/bin (which comes before /usr/bin in the
default Fedora $PATH)?
Also, I'm not quite sure what the conditional in the wrapper script is for -
wouldn't it work to just always prepend $libdir/icecc/bin to $PATH? See eg.
(There's also a link to a C wrapper on that page which could be a bit faster
than invoking the shell)
Perhaps also doing 'exec ccache $compiler "$@"' instead of 'ccache $compiler
"$@"' could be a slight optimization (if the C wrapper above would not be used)?
Does ccache need to be invoked with hardcoded full path in the wrapper rather
than just invoking it as "ccache"?
Good points. I'll play with it some more and see what works best.
Actually no changes in ccache are required. In my earlier testing I had the
order of icecream and ccache in PATH reversed. This didn't work, icecc
complained about being called recursively.
Now that I have ccache before icecream in PATH it works fine. No new wrapper
There was a problem with the order of scripts in profile.d. They are sourced
in the collating order for the user's locale. To have ccache before icecream
in PATH, I wanted to have icecream.sh sourced before ccache.sh. I tried
renaming icecream.sh to cc-icecream.sh. This worked in C locale, but not with
my usual cs_CZ.UTF-8. Instead, I modified icecream.sh to insert icecc after
ccache in PATH if it finds it there. It is in icecream-0.8.0-6.20071101svn
which I'm building in Koji right now.
Closing this bug.
Thanks for the followup. If you ask me, locale dependent order of sourcing
/etc/profile.d snippets from /etc/profile would qualify as a bug in the "setup"