running as root on a 4core machine(AMD A10-5700) I have had this error twice when building a particular piece of software.(OpenCV) Scanning dependencies of target pch_Generate_opencv_test_highgui [ 13%] Generating test_precomp.hpp [ 14%] Generating test_precomp.hpp.gch/opencv_test_highgui_Release.gch ccache: FATAL: Could not create /var/cache/compiler/e/1/3e1e93f23393193cfbe6a16baad520- 2050005.o.tmp.stdout.Horos.22534 (permission denied?) make[2]: *** [modules/core/perf_precomp.hpp.gch/opencv_perf_core_Release.gch] Error 1 make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_perf_core.dir/all] Error 2 By the time that I check the directories, everything looks normal $ ls -l /var/cache/compiler/e/1/ total 0 $ ls -l /var/cache/compiler/e/ total 568 drwxr-xr-x 2 root root 32768 Jan 3 10:38 0 drwxr-xr-x 2 root root 36864 Jan 3 10:38 1 drwxr-xr-x 2 root root 32768 Jan 3 10:29 2 drwxr-xr-x 2 root root 32768 Jan 3 10:29 3 drwxr-xr-x 2 root root 32768 Jan 3 10:44 4 drwxr-xr-x 2 root root 32768 Jan 3 10:29 5 drwxr-xr-x 2 root root 32768 Jan 3 10:40 6 drwxr-xr-x 2 root root 36864 Jan 3 10:29 7 drwxr-xr-x 2 root root 32768 Jan 3 10:36 8 drwxr-xr-x 2 root root 32768 Jan 3 10:29 9 drwxr-xr-x 2 root root 36864 Jan 3 10:29 a drwxr-xr-x 2 root root 28672 Jan 3 10:29 b drwxr-xr-x 2 root root 32768 Jan 3 10:29 c drwxr-xr-x 2 root root 32768 Jan 3 10:29 d drwxr-xr-x 2 root root 36864 Jan 3 10:38 e drwxr-xr-x 2 root root 36864 Jan 3 10:29 f -rw-r--r-- 1 root root 83 Jan 3 10:44 stats # ccache -s cache directory /root/.ccache cache hit (direct) 1060 cache hit (preprocessed) 573 cache miss 17095 called for link 4590 called for preprocessing 578 multiple source files 1 compile failed 287 preprocessor error 150 can't use precompiled header 2491 bad compiler arguments 57 unsupported source language 2 autoconf compile/link 890 unsupported compiler option 23 no input file 2440 files in cache 5479 cache size 1.5 Gbytes max cache size 2.0 Gbytes # ls -l /root/.ccache lrwxrwxrwx 1 root root 20 Oct 15 2009 /root/.ccache -> /var/cache/compiler/ It may be relevant that /var/cache is on a SSD drive # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 20644348 6465588 13130184 33% / /dev/sda5 21128344 5239144 14816056 27% /home /dev/sda8 41284928 18000720 21187072 46% /var/git /dev/sda7 4062816 2085324 1812348 54% /var/spool /dev/sda9 6603288 3044436 3223340 49% /var/cache # uname -a Linux Horos 3.7.1 #50 SMP PREEMPT Tue Dec 18 11:35:24 CET 2012 x86_64 GNU/Linux $ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.2/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /usr/src/gcc-4.7.2/configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --enable-threads=posix --enable-languages=c,c++ --with-bugurl=http://bugs.sourcemage.org --enable-bootstrap --enable-checking=release --disable-multilib --without-ppl --without-cloog --build=x86_64-pc-linux-gnu --with-system-zlib --disable-nls Thread model: posix gcc version 4.7.2 (GCC)
Do you remember if the problem showed up for test_precomp.hpp.gch/opencv_test_highgui_Release.gch both times?
I have just rerun the build, using the existing ccache, and get the same error. Scanning dependencies of target pch_Generate_opencv_test_highgui [ 13%] Generating test_precomp.hpp [ 14%] Generating test_precomp.hpp.gch/opencv_test_highgui_Release.gch ccache: FATAL: Could not create /var/cache/compiler/e/1/3e1e93f23393193cfbe6a16baad520- 2050005.o.tmp.stdout.Horos.14301 (permission denied?) make[2]: *** [modules/core/perf_precomp.hpp.gch/opencv_perf_core_Release.gch] Error 1 make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_perf_core.dir/all] Error 2 I monitored /var/cache/compiler/e/1 during the build and the file 3e1e93f23393193cfbe6a16baad520-2050005.o appeared, but is now gone. I was building OpenCV-2.4.3
Fixed in 83943e2522f8ea261c616adcc901620af80abb06 and 17791e1e460aec9c0efc1edbd031e975b81c1855 on the maint branch.
Fix included in v3.1.9.