Bug 16302

Summary: python3 exposes use of ccache in target
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: devtools / tool chainAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 6.1   
Target Milestone: 6.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2026-06-01 10:13:25 UTC
Python's on-target "build C extensions" logic duplicates the compiler flags used at build time, which means if ccache is enabled then it ends up in the target:

/usr/lib/python-sysconfigdata/_sysconfigdata.py: 'CC': 'ccache '

This means that without ccache being installed into the target, extension compilation will fail. For example, the python3-cffi ptests fail:

cffi.VerificationError: CompileError: command 'ccache' failed: No such file or directory