Hello, ENV Variable: CCACHE_PREFIX=distcc CCACHE_READONLY=1 CCACHE_LOGFILE=/tmp/ccache.harish.log CCACHE_BASE=/home/builder3/cache/ccache CCACHE_TEMPDIR=/home/hchandrasekaran/.ccache get Read Only Mode all the time. How to fix this? Also it is complaing that the .o is not in cache but the .o files are in cache. [2014-09-05T14:24:46.165564 40971] Got object file hash from preprocessor [2014-09-05T14:24:46.165578 40971] Preprocessor created ../../../pf_ne/ppc/cmn/dep/component-SysCommon-TpPayload-S.i [2014-09-05T14:24:46.165610 40971] Object file /home/builder3/cache/ccache/sb-nile-icomm-431/ppc/d/6/108dccb7a911267203f815e0c289fd-269481.o not in cache [2014-09-05T14:24:46.165618 40971] Read-only mode; running real compiler [2014-09-05T14:24:46.165626 40971] Failed; falling back to running the real compiler
Hi, > CCACHE_READONLY=1 > [...] > get Read Only Mode all the time. How to fix this? I don't think I understand the issue. If you have set CCACHE_READONLY=1, then ccache will work in read-only mode. Isn't this what you intended? > Also it is complaing that the .o is not in cache but the .o files are in cache. Do you mean that /home/builder3/cache/ccache/sb-nile-icomm-431/ppc/d/6/108dccb7a911267203f815e0c289fd-269481.o exists but ccache says it doesn't exist?
Yes intended to have read only cache but it is not working as expected. home/builder3/cache/ccache/sb-nile-icomm-431/ppc/d/6/ 108dccb7a911267203f815e0c289fd-269481.o exists but ccache says it doesn't exist. On Sun, Sep 7, 2014 at 12:01 PM, <samba-bugs@samba.org> wrote: > https://bugzilla.samba.org/show_bug.cgi?id=10795 > > --- Comment #1 from Joel Rosdahl <joel@rosdahl.net> 2014-09-07 19:01:42 > UTC --- > Hi, > > > CCACHE_READONLY=1 > > [...] > > get Read Only Mode all the time. How to fix this? > > I don't think I understand the issue. If you have set CCACHE_READONLY=1, > then > ccache will work in read-only mode. Isn't this what you intended? > > > Also it is complaing that the .o is not in cache but the .o files are in > cache. > > Do you mean that > > /home/builder3/cache/ccache/sb-nile-icomm-431/ppc/d/6/108dccb7a911267203f815e0c289fd-269481.o > exists but ccache says it doesn't exist? > > -- > Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You reported the bug. >
I suggest running via strace to find out more details about what happens. I.e., something like this: strace ccache compiler args ... 2>&1 | grep 108dccb7a911267203f815e0c289fd
Hello, I think I found the issue that when compiling in different directories, cache is not found since the compiler option has -g (includes absolute path). i.e. cache is updated when compiled under folder /home/builder/main/src and CCACHE_DIR is CCACHE_DIR=/home/builder/cache/ccache/main and if we recompile the code under same folder again, cache gets hit and compilation is fast. However if the compilation is done under different folder /home/harish/main/src, it is computing different hash and hence falls back on real compilation. I understand that setting CCACHE_BASEDIR mitigates this problem, But what we need to set for CCACHE_BASEDIR when compiling with ccache for these two folders /home/harish/main/src and /home/builder/main/src , so that hash is computed same for both? Thanks for the help Regards, Murali
> I think I found the issue that when compiling in different directories, > cache is not found since the compiler option has -g (includes absolute > path). OK, but this is a totally different issue than the one you reported, right? > However if the compilation is done under different > folder /home/harish/main/src, it is computing different hash and hence > falls back on real compilation. Yup, that's expected and has nothing to do with read-only mode. > I understand that setting CCACHE_BASEDIR mitigates this problem, But what > we need to set for CCACHE_BASEDIR when compiling with ccache for these two > folders /home/harish/main/src and /home/builder/main/src , so that hash is > computed same for both? See the manual section "Compiling in different directories": <http://ccache.samba.org/manual.html#_compiling_in_different_directories>. In your case, use "/home".