# ccache and buildworld



## Matty (Jun 4, 2010)

I was wondering why it is apparently impossible to buildworld with ccache enabled?

All my builds stop and random point in the build proces.


----------



## wblock@ (Jun 4, 2010)

Works here.  Maybe you have a hardware problem.  I'd compare your specifics to mine, but...


----------



## dennylin93 (Jun 5, 2010)

Does buildworld work if ccache is disabled?


----------



## Matty (Jun 5, 2010)

yeah it works great without

I will compile again to get the error message


----------



## Matty (Jun 5, 2010)

I got this error

```
#time make -j2 buildkernel

sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtbegin.o /usr/obj/usr/src/lib32/usr/lib32/crtbegin.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtend.o /usr/obj/usr/src/lib32/usr/lib32/crtend.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtbeginT.o /usr/obj/usr/src/lib32/usr/lib32/crtbeginT.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtbegin.So /usr/obj/usr/src/lib32/usr/lib32/crtbeginS.o
sh /usr/src/tools/install.sh -o root -g wheel -m 444  crtend.So /usr/obj/usr/src/lib32/usr/lib32/crtendS.o
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error

real	19m16.053s
user	13m27.208s
sys	9m21.256s
```



make.conf:

```
CFLAGES= -O -fno-strict-aliasing -pipe -s
NO_PROFILE=true

# added by use.perl 2010-01-14 21:14:07
PERL_VERSION=5.8.9
NO_WERROR=
WERROR=
.if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) 
&& !defined(NOCCACHE)
CC= /usr/local/libexec/ccache/world-cc
CXX= /usr/local/libexec/ccache/world-c++
.endif
```

As said works without ccache
c


----------



## wblock@ (Jun 5, 2010)

If any of the make.conf stuff was causing problems, I'd expect it to happen consistently.  That it dies randomly suggests memory or hard drive problem.  But messing with CFLAGS (typo) is risky, and the NO_WERROR and WERROR suggests you've been trying clang.  Easy enough to remove those for testing.

Clear the cache with ccache -C before trying again.


----------



## dennylin93 (Jun 5, 2010)

Yes, do remove CFLAGS. They cause more trouble than they're worth. Flags for optimization are automatically used.


----------



## Matty (Jun 7, 2010)

same error at buildworld but buildkernel works as expected.


----------



## t1066 (Jun 7, 2010)

An 'me too' here.

Maybe, compiling 32 bit libraries on amd64 would confuse ccache.


----------

