If CCACHE_HARDLINK is set, ccache will fall back to running the compiler if it fails to create the hard link. log: [2016-02-03T19:32:17.368179 2517 ] === CCACHE 3.2.1 STARTED ========================================= [... [2016-02-03T19:32:17.378361 2517 ] Got object file hash from manifest [2016-02-03T19:32:17.379446 2517 ] Unlink test.o via test.o.rm.hostname.2517.XXXXXX [2016-02-03T19:32:17.380619 2517 ] Failed to link /path/to/ccache/1/9/a6a636ff20485f7d9b0b5b1e80e26f-586953.o to test.o: Invalid cross-device link [2016-02-03T19:32:17.380719 2517 ] Failed; falling back to running the real compiler [2016-02-03T19:32:17.381237 2517 ] Acquired lock /path/to/ccache/1/stats.lock [2016-02-03T19:32:17.386757 2517 ] Releasing lock /path/to/ccache/1/stats.lock [2016-02-03T19:32:17.386869 2517 ] Unlink /path/to/ccache/1/stats.lock [2016-02-03T19:32:17.387254 2517 ] Result: ccache internal error I think it would make sense to simply fall back to copying the file from the cache, as if CCACHE_HARLINK wasn't set. If you don't want to change the meaning of CCACHE_HARDLINK, then perhaps this new functionality could be enabled with a CCACHE_ALLOW_HARDLINK option?
Sounds reasonable. Fixed in 9612954e19099c7e741ee56f2cb5f763b26601e0 on master.
Included in 3.2.5.