[ccache] FATAL: Could not create ... (permission denied?)

Andy Lutomirski luto at amacapital.net
Tue May 29 13:03:43 MDT 2012


I just enabled precompiled headers in my project, and I'm getting
intermittent ccache failures.  The log says (partially redacted):

[2012-05-29T11:35:36.768787 27203] === CCACHE STARTED
=========================================
[2012-05-29T11:35:36.768982 27203] Being sloppy about __DATE__ and __TIME__
[2012-05-29T11:35:36.769016 27203] Command line: /usr/lib64/ccache/g++
-frandom-seed=../subdir1/subdir2/file.cpp --std=gnu++0x -msse2 -msse3
-O2 -g -pthread -march=corei7 -mtune=corei7-avx
-include../some_non_pch_header.h -Wall -Winit-self -Werror=return-type
-Werror=address -Wno-reorder -Wno-sign-compare -Wno-unused-variable
-Wno-parentheses -Wno-unknown-pragmas -fno-working-directory
-Wno-uninitialized -fPIC -Isubdir1 -I../subdir1 -I. -I.. -Isubdir3
-I../subdir3 -Isubdir4 -I../subdir4
-I/usr/local/include/third_party_project -I/usr/include/libxml2
-Isubdir1 -I../subdir1 -DBOOST_DISABLE_ASSERTS=1
-D__STDC_FORMAT_MACROS -DSUBDIR1_EXPORTS ../subdir1/subdir2/file.cpp
-c -o subdir1/subdir2/file.cpp.1.o
[2012-05-29T11:35:36.769066 27203] Hostname: my_machine.localdomain
[2012-05-29T11:35:36.769093 27203] Working directory: [redacted]
[2012-05-29T11:35:36.769185 27203] Source file: ../subdir1/subdir2/file.cpp
[2012-05-29T11:35:36.769214 27203] Object file: subdir1/subdir2/file.cpp.1.o
[2012-05-29T11:35:36.769245 27203] Trying direct lookup
[2012-05-29T11:35:36.769308 27203] Looking for object file hash in
/home/luto/.ccache/8/5/e2faa4c047692208d0e5377fa6ff67-1931.manifest
[2012-05-29T11:35:36.769355 27203] No such manifest file
[2012-05-29T11:35:36.769382 27203] Did not find object file hash in manifest
[2012-05-29T11:35:36.769407 27203] Running preprocessor
[2012-05-29T11:35:36.769448 27203] Executing /usr/bin/g++
-frandom-seed=../subdir1/subdir2/file.cpp --std=gnu++0x -msse2 -msse3
-O2 -g -pthread -march=corei7 -mtune=corei7-avx
-include../some_non_pch_header.h -Wall -Winit-self -Werror=return-type
-Werror=address -Wno-reorder -Wno-sign-compare -Wno-unused-variable
-Wno-parentheses -Wno-unknown-pragmas -fno-working-directory
-Wno-uninitialized -fPIC -Isubdir1 -I../subdir1 -I. -I.. -Isubdir3
-I../subdir3 -Isubdir4 -I../subdir4
-I/usr/local/include/third_party_project -I/usr/include/libxml2
-Isubdir1 -I../subdir1 -DBOOST_DISABLE_ASSERTS=1
-D__STDC_FORMAT_MACROS -DSUBDIR1_EXPORTS -c -E
../subdir1/subdir2/file.cpp
[2012-05-29T11:35:36.769563 27204] Unlink
/home/luto/.ccache/tmp/FieldGroup.tmp.my_machine.localdomain.27203.ii
(as-tmp)
[2012-05-29T11:35:36.769709 27204] Unlink
/home/luto/.ccache/tmp/tmp.cpp_stderr.my_machine.localdomain.27203
(as-tmp)
[2012-05-29T11:35:37.161828 27203] Got object file hash from preprocessor
[2012-05-29T11:35:37.161901 27203] Object file
/home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o not in
cache
[2012-05-29T11:35:37.161925 27203] Running real compiler
[2012-05-29T11:35:37.161938 27203] Executing /usr/bin/g++
-frandom-seed=../subdir1/subdir2/file.cpp --std=gnu++0x -msse2 -msse3
-O2 -g -pthread -march=corei7 -mtune=corei7-avx
-include../some_non_pch_header.h -Wall -Winit-self -Werror=return-type
-Werror=address -Wno-reorder -Wno-sign-compare -Wno-unused-variable
-Wno-parentheses -Wno-unknown-pragmas -fno-working-directory
-Wno-uninitialized -fPIC -Isubdir1 -I../subdir1 -I. -I.. -Isubdir3
-I../subdir3 -Isubdir4 -I../subdir4
-I/usr/local/include/third_party_project -I/usr/include/libxml2
-Isubdir1 -I../subdir1 -DBOOST_DISABLE_ASSERTS=1
-D__STDC_FORMAT_MACROS -DSUBDIR1_EXPORTS -c -o
/home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.my_machine.localdomain.27203
/home/luto/.ccache/tmp/FieldGroup.tmp.my_machine.localdomain.27203.ii
[2012-05-29T11:35:37.162056 27215] Unlink
/home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.stdout.my_machine.localdomain.27203
(as-tmp)
[2012-05-29T11:35:37.162356 27215] Unlink
/home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.stderr.my_machine.localdomain.27203
(as-tmp)
[2012-05-29T11:35:37.377566 26882] Unlink
/home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.stderr.my_machine.localdomain.27203
via /home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.stderr.my_machine.localdomain.27203.my_machine.localdomain.26882.rmXXXXXX
[2012-05-29T11:35:37.377665 26882] Unlink
/home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.stdout.my_machine.localdomain.27203
via /home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.stdout.my_machine.localdomain.27203.my_machine.localdomain.26882.rmXXXXXX
[2012-05-29T11:35:39.139220 27203] FATAL: Could not create
/home/luto/.ccache/0/5/86c6c606e035773cb8c1c6e56dfb76-3188758.o.tmp.stdout.my_machine.localdomain.27203
(permission denied?)
[2012-05-29T11:35:39.139285 27203] Unlink
/home/luto/.ccache/tmp/FieldGroup.tmp.my_machine.localdomain.27203.ii
(as-tmp)
[2012-05-29T11:35:39.140240 27203] Unlink
/home/luto/.ccache/tmp/tmp.cpp_stderr.my_machine.localdomain.27203
(as-tmp)

Running the exact same command again works.  Clearing the cache and
restarting the build seems to fail in different places, but this could
be due to my build tool being nondeterministic.  This is reasonably
(12-way) parallel build.

The odd thing is that the files that are failing don't use precompiled
headers.  (The CCACHE_SLOPPINESS option is not necessary to trigger
the failure.)  On occasion, I see the same failure on files that do
use precompiled headers.

Any idea what's wrong?

Thanks,
Andy


More information about the ccache mailing list