You are not logged in.

#1 2011-05-02 07:12:01

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 193
Website

[SOLVED] Can't get ccache and colorgcc to work together

Hi all,

Has anyone figured out how to get ccache and colorgcc to work at the same time?  I can only get one or the other, but not both.

If I put them both in the path, with colorgcc first, then "g++" invokes colorgcc, which then calls /usr/bin/g++, skipping ccache.

If I put ccache first in the path instead, then running "g++" invokes ccache, which then calls /usr/bin/g++, skipping colorgcc for some reason.

Putting colorgcc back to first in the path, then editing /etc/colorgcc/colorgccrc means I can set the compiler paths to point to ccache.  However then running "g++" invokes colorgcc, which calls ccache, but then ccache seems to call colorgcc again, which calls ccache, which calls colorgcc, etc, etc.

Perhaps I'm missing something, but I can't see how you tell ccache where the compiler binaries are located, as this seems to be the problem - ccache autodetects them, and always seems to pick the ones I don't want!

Any suggestions?

Last edited by Malvineous (2011-05-03 01:29:48)

Offline

#2 2011-05-02 07:17:52

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 193
Website

Re: [SOLVED] Can't get ccache and colorgcc to work together

Ha, ok, as usual as soon as I post in a forum I stumble across the answer.  Turns out there's a CCACHE_PATH environment variable you can use to tell ccache where to look for the real compilers.  It doesn't seem to work setting this to point to colorgcc, but putting only colorgcc in the path, editing /etc/colorgcc/colorgcc to point to ccache, then setting CCACHE_PATH=/usr/bin seems to do the trick...

But if there's a better way please let me know!

Offline

Board footer

Powered by FluxBB