ccache 4.9.1 contains a bug where it fails to cache compilations because it extracts filenames from the .i files and tries to read them. This bug can be triggered when the referenced files are inaccessible such as with distcc or generally with ccache not running in the same context as the compiler originally did (e.g. chroot) ccache 4.9 then falls back to non-direct mode, ccache 4.9.1 fails with bad_input_file. The attached patches are a new -r1 for ccache 4.9.1 and a fix taken from upstream bug report. Reproducible: Always Steps to Reproduce: 1. Install ccache 4.9.1 2. Use ccache through distcc 3. use distcc to compile things Actual Results: Compile will succeed, but nothing will be cached, counter for bad_input_file increases Expected Results: Compile succeeds and ideally adds to the compiler cache
Created attachment 888463 [details] ccache-4.9.1-r1.ebuild (-4.9.1 + patch inclusion line)
Created attachment 888464 [details, diff] Commit 33d390b, fix
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baacb85f312792e72d5f289d841d78a28e14a05a commit baacb85f312792e72d5f289d841d78a28e14a05a Author: Sam James <sam@gentoo.org> AuthorDate: 2024-03-24 18:02:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-24 18:02:31 +0000 dev-util/ccache: backport fix for distcc Thanks to satmd for reporting. Closes: https://bugs.gentoo.org/927740 Signed-off-by: Sam James <sam@gentoo.org> dev-util/ccache/ccache-4.9.1-r1.ebuild | 132 ++++++++++++++++++++++++ dev-util/ccache/files/ccache-4.9.1-distcc.patch | 38 +++++++ 2 files changed, 170 insertions(+)