[ccache] Problem with using ccache during kernel compilation

Piotr Kiszka piotrkisz at gmail.com
Wed Jan 15 09:16:58 MST 2014


I am trying to use ccache during kernel building.But there is always
zero cache hits during second kernel compilation:

-- ccache -s -------------------------------------------------------
cache directory                     /home/kernelbuild/.ccache
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                         21551
called for link                       77
called for preprocessing            4427
unsupported source language          131
no input file                       3992
files in cache                     53462
cache size                           4.4 Gbytes
max cache size                       5.0 Gbytes

Tested on2 machines with Debian Wheezy:
uname: Linux ______ 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
ccache version: 3.1.7-1

How ccache is added to PATH in building script:
        if [ -d "$ccache_path_dir" ] ; then
                echo "Detected ccache directory, adding to path:
                echo "WARNING: not using ccache (this is OK, but will
take longer overall)"

Build command:
faketime "$TIMESTAMP_RFC3339"   nice -n "$BUILD_NICENESS" time make-kpkg
--rootcmd fakeroot kernel_image kernel_headers --initrd --revision
"$DEBIAN_REVISION" --overlay-dir "$overlay_dir" 2>&1 | tee

Link to part of logfile:

Link to file where ccache is used:

It will be great if someone could help me with tis problem.
Best regards

Piotr Kiszka

More information about the ccache mailing list