Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 841812 - >=dev-util/ccache-4.6-r1: failures to write ccache/tmp break random packages in horribly confusing ways
Summary: >=dev-util/ccache-4.6-r1: failures to write ccache/tmp break random packages ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-30 06:33 UTC by Michał Górny
Modified: 2022-07-31 10:13 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-04-30 06:33:21 UTC
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
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-29 17:40:08 UTC
Also happens with 4.6.1.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-18 15:23:33 UTC
Please report the issue upstream.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-18 19:23:03 UTC
Upstream?  Feel free to convince them that this is their fault, not ours.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-28 13:45:49 UTC
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
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-31 08:40:06 UTC
Is there a reproducer you can give please?

Is this the same thing as https://github.com/llvm/llvm-project/issues/56816 or not?
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-31 09:09:14 UTC
(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.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-31 10:13:58 UTC
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.