Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927740 - dev-util/ccache-4.9.1: does not cache compilations with distcc
Summary: dev-util/ccache-4.9.1: does not cache compilations with distcc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Toolchain Maintainers
URL: https://github.com/ccache/ccache/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-24 17:52 UTC by satmd
Modified: 2024-03-24 18:02 UTC (History)
1 user (show)

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


Attachments
ccache-4.9.1-r1.ebuild (-4.9.1 + patch inclusion line) (ccache-4.9.1-r1.ebuild,3.71 KB, application/vnd.gentoo.ebuild)
2024-03-24 17:53 UTC, satmd
Details
Commit 33d390b, fix (ccache-4.9.1-33d390b.patch,601 bytes, patch)
2024-03-24 17:58 UTC, satmd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description satmd 2024-03-24 17:52:45 UTC
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
Comment 1 satmd 2024-03-24 17:53:37 UTC
Created attachment 888463 [details]
ccache-4.9.1-r1.ebuild (-4.9.1 + patch inclusion line)
Comment 2 satmd 2024-03-24 17:58:35 UTC
Created attachment 888464 [details, diff]
Commit 33d390b, fix
Comment 3 Larry the Git Cow gentoo-dev 2024-03-24 18:02:57 UTC
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(+)