Bug 16302 - python3 exposes use of ccache in target
Summary: python3 exposes use of ccache in target
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 6.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-06-01 10:13 UTC by Ross Burton
Modified: 2026-06-04 14:41 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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