This happens e.g. with sys-libs/llvm-libunwind's test suite. With ccache-4.5.1, it works just fine. With 4.6-r1, it fails with confusing errors. After digging, it turns out that internal (silent) checks for compiler flags fail with errors like: ccache: error: Failed to create directory /var/lib/portage/home/.cache/ccache/tmp: Permission denied
Also happens with 4.6.1.
Please report the issue upstream.
Upstream? Feel free to convince them that this is their fault, not ours.
Now I see it also with 4.5.1: $ "/usr/lib/ccache/bin/i686-pc-linux-gnu-clang++" "--target=i686-pc-linux-gnu" "-nostdinc++" "-I" "/tmp/portage/sys-libs/libcxxabi-15.0 .0.9999/work/libcxxabi/include" "-I" "/tmp/portage/sys-libs/libcxxabi-15.0.0.9999/work/runtimes_build-abi_x86_32.x86/include/c++/v1" "-I" "/tmp/portage/sys-libs/libcxxabi-15.0.0.9999/work/runtimes_build-abi_x86_32.x86/include/i686-pc-linux-gnu/c++/v1" "-I" "/tmp/portage/sys-libs/libcxxabi-15.0.0.9999/work/libcxxabi/../libcxx/test/support" "-I" "/tmp/portage/sys-libs/libcxxabi-15.0.0.9999/work/libcxxabi/../libcxx/src" "-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS" "-std=c++2b" "-Werror" "-Wall" "-Wextra" "-Wshadow" "-Wundef" "-Wno-unused-command-line-argument" "-Wno-attributes" "-Wno-pessimizing-move" "-Wno-c++11-extensions" "-Wno-noexcept-type" "-Wno-atomic-alignment" "-Wno-user-defined-literals" "-Wno-tautological-compare" "-Wsign-compare" "-Wunused-variable" "-Wunused-parameter" "-Wunreachable-code" "-Wno-unused-local-typedef" "-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER" "-D_LIBCPP_ENABLE_ASSERTIONS=1" "-D_LIBCPP_DISABLE_AVAILABILITY" "-fcoroutines-ts" "-Werror=thread-safety" "-Wuser-defined-warnings" "-Wno-unreachable-code" "-c" "/tmp/portage/sys-libs/libcxxabi-15.0.0.9999/work/libcxxabi/test/incomplete_type.sh.cpp" "-o" "/tmp/portage/sys-libs/libcxxabi-15.0.0.9999/work/runtimes_build-abi_x86_32.x86/Output/incomplete_type.sh.cpp.dir/t.tmp.one.o" # command stderr: ccache: error: Failed to create temporary file for /var/lib/portage/home/.cache/ccache/tmp/tmp.cpp_stdout.XXXXXX: Permission denied error: command failed with exit status: 1
Is there a reproducer you can give please? Is this the same thing as https://github.com/llvm/llvm-project/issues/56816 or not?
(In reply to Sam James from comment #5) > Is there a reproducer you can give please? > > Is this the same thing as https://github.com/llvm/llvm-project/issues/56816 > or not? Yeah, sorry, the 4.5.1 issue is upstream's fault. Gotta recheck 4.6.1.
Ok, I'm pretty sure this 4.6.1 issue is also upstream stripping env too agressively. ccache upgrade makes the resulting problems more profound, I guess.