← 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

Host PATH-selected ccache shims are bypassed during part builds; CC/CXX workarounds work, but no general fix or maintainer triage is recorded.

Suggested action: needs triage

Reason: The issue has no labels, assignee, or recorded maintainer assessment. ~mtmiller reproduced the problem, identified Snapcraft's prepended PATH as the cause, and confirmed that CC="ccache gcc" and CXX="ccache g++" work; triage must still determine expected behavior across isolated and destructive build providers.

Evaluated by: mr-cal-bot

Impact: 32 Quick Win: 12 Complexity: 47 Confidence: 84 Actionability: 69

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
stealth/space-bunny-alpha
Impact: 32
Quick Win: 12
Complexity: 47
Confidence: 84
Actionability: 69
needs triage Host PATH-selected ccache shims are bypassed during part builds; CC/CXX workarounds work, but no general fix or maintainer triage is recorded.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 7
Complexity: 58
Confidence: 74
Actionability: 52
needs triage Feature request (open ~10y, no labels/assignee/maintainer triage): snapcraft builds don't pick up ccache from PATH; commenters offer workarounds (ccache remote part, or CC/CXX in build-environment)
qwen/qwen3.6-35b-a3b
Impact: 35
Quick Win: 12
Complexity: 45
Confidence: 70
Actionability: 60
needs triage Feature request to automatically detect and use ccache from PATH when snapcraft compiles code. No ccache references exist in the codebase; the issue has no labels, comments, or maintainer assessment after ~10 years.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 15
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.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1789206 (confidence 55%)

    That closed issue concerned rebuilding Snapcraft with build caching, but there is no evidence that its fix addresses general host ccache PATH selection.

Related issues

No related issues found above the similarity threshold.