System Info: OS : Gentoo Linux x86_64 Kernel : Linux 5.4.38 CPU : Intel core i7-7820HQ RAM : 16GiB CC : GCC 9.3.0
This problem always happens when I install the emerge software.My ccache directory is mounted on /dev/sda2, which is a primary partition in btrfs.The corresponding directory permissions have been set./etc/fstab I posted below.
This is one of error messages:
==> COMPILING "OBJ/amd64-linux-cc/pic/fcons.o"+ x86_64-pc-linux-gnu-gcc -fpic -march=native -O2 -pipe -finput-charset=ISO-8859-1 -fexec-charset=UTF-8 -DSCHILY_BUILD -IOBJ/amd64-linux-cc/pic -I../incs/amd64-linux-cc -I../include -Istdio -DUSE_SCANSTACK -DPORT_ONLY -D_GNU_SOURCE -c -o OBJ/amd64-linux-cc/pic/fcons.o stdio/fcons.cccache: error: Failed to create temporary file for /var/cache/ccache/7/d/f/cc59f6a892af180b36bf0d7b73f8c-148524.o.tmp.stdout: Permission deniedmake[2]: *** [../RULES/r-gmake.obj:51: OBJ/amd64-linux-cc/pic/fcons.o] Error 1make[2]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02/libschily'make[1]: *** [../RULES/rules.mks:23: all] Error 2make[1]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02/libschily'make: *** [RULES/rules1.dir:25: all] Error 2 * ERROR: app-cdr/cdrtools-3.02_alpha09-r2::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-cdr/cdrtools-3.02_alpha09-r2::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-cdr/cdrtools-3.02_alpha09-r2::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/temp/environment'. * Working directory: '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02' * S: '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02' Failed to emerge app-cdr/cdrtools-3.02_alpha09-r2, Log file:'/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/temp/build.log'
ccache config & status:
(default) base_dir = (environment) cache_dir = /var/cache/ccache(/var/cache/ccache/ccache.conf) cache_dir_levels = 3(/var/cache/ccache/ccache.conf) compiler = gcc(/var/cache/ccache/ccache.conf) compiler_check = %compiler% -v(/var/cache/ccache/ccache.conf) compression = true(/var/cache/ccache/ccache.conf) compression_level = 1(default) cpp_extension = (default) debug = false(default) depend_mode = false(default) direct_mode = true(default) disable = false(default) extra_files_to_hash = (default) hard_link = false(default) hash_dir = true(default) ignore_headers_in_manifest = (default) keep_comments_cpp = false(default) limit_multiple = 0.8(default) log_file = (default) max_files = 0(/var/cache/ccache/ccache.conf) max_size = 100.0G(/var/cache/ccache/ccache.conf) path = /usr/bin:/usr/local/bin(default) pch_external_checksum = false(default) prefix_command = (default) prefix_command_cpp = (default) read_only = false(default) read_only_direct = false(default) recache = false(default) run_second_cpp = true(default) sloppiness = (default) stats = true(default) temporary_dir = (default) umask = cache directory /var/cache/ccacheprimary config /var/cache/ccache/ccache.confsecondary config (readonly) /etc/ccache.confstats updated Sat May 23 16:40:07 2020cache hit (direct) 4029cache hit (preprocessed) 860cache miss 19704cache hit rate 19.88 %called for link 3119called for preprocessing 2708multiple source files 2compiler produced stdout 4compiler produced empty output 30compile failed 1624preprocessor error 247couldn't find the compiler 2bad compiler arguments 464autoconf compile/link 5507unsupported compiler option 835unsupported code directive 4could not write to output file 90no input file 1576cleanups performed 0files in cache 52712cache size 1.2 GBmax cache size 100.0 GB
some info of /var/cache/ccache:
drwxrwsr-x 1 root portage 66 May 23 16:40 0drwxrwsr-x 1 root portage 66 May 23 16:38 1drwxrwsr-x 1 root portage 66 May 23 16:39 2drwxrwsr-x 1 root portage 66 May 23 16:38 3drwxrwsr-x 1 root portage 66 May 23 16:38 4drwxrwsr-x 1 root portage 66 May 23 16:38 5drwxrwsr-x 1 root portage 66 May 23 16:38 6drwxrwsr-x 1 root portage 66 May 23 16:38 7drwxrwsr-x 1 root portage 66 May 23 16:38 8drwxrwsr-x 1 root portage 66 May 23 16:38 9drwxrwsr-x 1 root portage 66 May 23 16:38 adrwxrwsr-x 1 root portage 66 May 23 16:38 bdrwxrwsr-x 1 root portage 66 May 23 16:38 c-rwxrwxr-x 1 root portage 209 May 23 11:17 ccache.confdrwxrwsr-x 1 root portage 66 May 23 16:38 ddrwxrwsr-x 1 root portage 66 May 23 16:40 edrwxrwsr-x 1 root portage 66 May 23 16:38 fdrwxrwsr-x 1 portage portage 0 May 23 16:38 tmp
fstab :
UUID=EA7D-E1DB /boot vfat defaults,noatime,discard 0 2UUID=4f174448-dcef-4e12-ae0a-f5c79cfe3da6 none swap sw,discard 0 0UUID=1bb4ace3-1fba-4068-bea7-e7d307d56fa3 / btrfs noatime,discard 0 1UUID=81210f26-8349-4aed-9ad4-55626fc10be9 /home btrfs noatime,discard 0 1UUID=c8f65f22-8271-4457-a891-4e877fb2b98c /var/cache/ccache btrfs noatime,discard 0 1
make.conf :
COMMON_FLAGS="-march=native -O2 -pipe"CFLAGS="${COMMON_FLAGS}"CXXFLAGS="${COMMON_FLAGS}"FCFLAGS="${COMMON_FLAGS}"FFLAGS="${COMMON_FLAGS}"PORTDIR="/var/db/repos/gentoo"DISTDIR="/var/cache/distfiles"PKGDIR="/var/cache/binpkgs"LC_MESSAGES=CMAKEOPTS="-j2 -l2"GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo"INPUT_DEVICES="libinput evdev vmmouse touchpad joystick synaptics"VIDEO_CARDS="nvidia"USE_PYTHON="3.7"PYTHON_TARGETS="python3_7"USE="static-libs systemd dbus policykit udisks acpi bluetooth X alsa qt5 gtk kde wayland pulseaudio mysql networkmanager thunderbolt zsh-completion apparmor -ssh"CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"PORTAGE_ELOG_CLASSES="log"PORTAGE_ELOG_SYSTEM="save"FEATURES="ccache nostrip"CCACHE_DIR="/var/cache/ccache"