1

I am working with distcc and ccache to speed up the compilation of my project.

I noticed that I am not getting any hits when I am building the same code from different directories. I looked up online https://github.com/ccache/ccache/issues/212 and saw that I need to set the hash_dir flag = false. I already have the variable CCACHE_NOHASHDIR=true. Am I missing something? Do I need to set/unset any other variables?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
whacky_bruce
  • 99
  • 1
  • 6

1 Answers1

1

Does your command line contain absolute paths? If so, you need to set CCACHE_BASEDIR to the base directory of your working copy. See How do I make ccache cache compilation when using absolute paths to the compiled files in different directories?.

I wrote ccache quick guide which explains how to debug and avoid cache misses.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gerardo Hernandez
  • 1,889
  • 1
  • 16
  • 20