← Back to issue list

Make snapcraft work with ccache

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1626766
Type
issue
State
open
Author
~oparoz
Labels
Created
Updated
Closed

Current evaluation

Request that snapcraft automatically pick up a host-configured ccache (via $PATH) when compiling parts. Very old (filed ~10 years ago, last activity ~7 years ago), no labels, no maintainer response, and the premise is outdated: modern snapcraft builds run in a confined core20/core22 base where the host PATH/ccache is not inherited.

Suggested action: close stale

Reason: The issue is ~10 years old with zero comments, no labels, and no maintainer engagement, and its core premise no longer holds: modern snapcraft (core20/core22) builds parts inside a confined Ubuntu base rather than on the host, so a host-side ccache wrapper on $PATH is not inherited by the build step. craft-parts' executor builds its own PATH (craft_parts/executor/environment.py:114-115) and there is no ccache handling anywhere in the parts stack, so the original 'just pick up $PATH' expectation is no longer applicable. If ccache support is still desired it should be re-filed against the current architecture (e.g. a ccache part or explicit env), not this stale report.

Impact: 25 Quick Win: 15.0 Staleness: 95 Complexity: 40 Confidence: 55 Support Request: 30

Issue body

Despite having a properly configured ccache using $PATH, parts don't seem to be using it when compiling code. It should be automatically picked up and used. A simple test is to build a snap using a simple C++ example. Compiling by hand uses ccache, compiling uses snapcraft doesn't. ``` $ whereis g++ g++: /usr/bin/g++ /usr/lib/ccache/g++ /usr/share/man/man1/g++.1.gz $ which g++ /usr/lib/ccache/g++ ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 15.0
Staleness: 95
Complexity: 40
Confidence: 55
Support Request: 30
close stale Request that snapcraft automatically pick up a host-configured ccache (via $PATH) when compiling parts. Very old (filed ~10 years ago, last activity ~7 years ago), no labels, no maintainer response, and the premise is outdated: modern snapcraft builds run in a confined core20/core22 base where the host PATH/ccache is not inherited.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Feature request for snapcraft to automatically detect and use ccache for compilation. Unaddressed for nearly 10 years with zero maintainer interaction or labels.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 95
Support Request: 20
close stale Report that snapcraft ignores ccache in PATH during compilation. No maintainer response, inactive for years, likely irrelevant to current snapcraft versions.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 40
Confidence: 85
Support Request: 15
close stale snapcraft fails to use ccache from the PATH during compilation. The report is nearly a decade old, lacks maintainer interaction or labels, and likely applies to outdated snapcraft versions.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 35
Confidence: 90
Support Request: 20
close stale snapcraft fails to use ccache during builds despite correct PATH configuration. It should automatically detect and leverage ccache. Open, zero comments, no labels, and inactive for years. Requires triage and assignment.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1869544 snapcraft use cached packages across VMs snapcraft (launchpad) open Feature request to cache apt packages centrally across snapcraft build VMs so they survive `snapcraft clean`. No labels or comments in 6+ years; premise tied to outdated-version Launchpad bug 1869542.
71%
#1841618 snapcraft should run apt-get update snapcraft (launchpad) open Feature request (2019) for snapcraft to refresh stale apt-get caches in process containers to avoid build failures. Open ~7 years with zero comments, no labels, no maintainer response; no general cache-refresh logic found in the build path.
70%