Opensuse and ccache problems

I installed ccache with zypper. I want to have it setup like Ubuntu and Red Hat has by default, meaning that gcc, g++ and co are symlinks to ccache binary.

Like so:


[root@tawny bin]# ls -lha /usr/lib/ccache/bin/gcc
lrwxrwxrwx 1 root root 6 Jul 10  2009 /usr/lib/ccache/bin/gcc -> ccache
[root@tawny bin]# ls -lha /usr/lib/ccache/bin/g++
lrwxrwxrwx 1 root root 6 Jul 10  2009 /usr/lib/ccache/bin/g++ -> ccache

Then you simply add /usr/lib/ccache/bin in your path variable first and it automatically uses ccache instead of the normal gcc, g++ & co binaries. This is because I have a big Qt project where I can not touch the Makefiles or the pro-files just because of the ccache, I need it to work automatically (like it does in above mentioned Ubuntu and Red Hat).

I tried creating symlinks from g++, gcc and the rest that point to /usr/bin/ccache but that does not work.

Any ideas how it should be done?

Anyone with openSuSE and ccache working like described above?

Please help! :slight_smile:

Do you have any idea what you mean with: “I tried to create a symlink and it does not work”? Do you mind showing us the* ln -s* statements you made and showing us any errors, or what *ls -l *showed afterwords so we can see:

  1. what symlinks you tried to create;
  2. what happened?