[ccache] gcc42, gcc45 and make.conf
joel at rosdahl.net
Sat Jun 25 10:42:20 MDT 2011
On 2011-06-25 17:56, Beeblebrox wrote:
> I am trying to understand the difference how ccache detects gcc42 and
> gcc45 from make.conf.
Just to clarify: ccache doesn't know (or care) about make.conf or any
other configuration file. ccache only looks at environment variables and
command-line options passed to it.
When you have a symlink from gcc45 to ccache, then ccache by default
tries to locate gcc45 in PATH. (This can be overridden by setting
CCACHE_PATH, but that should normally not be necessary.)
> ccache: FATAL: Could not find compiler "gcc45" in PATH
And here ccache failed to do that.
> However I DO have in my csh.cshrc: /usr/bin:/usr/local/bin echo $PATH
> also shows this path where gcc45 is located.
Then the PATH is not the same as in your shell when ccache is called by
the build system. The build system most likely doesn't use csh, so your
personal settings in csh.cshrc probably won't apply.
> I have already re-built ccache & libtool with gcc45 and I am out of
> ideas of what any other step I can take to furthher diagnose the
I don't think you need to rebuild anything; you need to get a better
understanding of how FreeBSD's build system works (and I can't help you
To see which PATH is set by the build system, you could perhaps create a
script like this:
echo $PATH >/tmp/path.txt
exec /usr/local/libexec/ccache/world/gcc45 "$@"
Then point CC in make.conf to the script, build something and then check
Another option is to avoid letting ccache masquerade as the compiler and
instead use something like this in make.conf:
CC = ccache /path/to/gcc45
CXX = ccache /path/to/g++45
More information about the ccache