Repository navigation
Add a way to ignore JIT stencil digest #148646
Copy link
Copy link
Open
Labels
buildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancement
on Apr 16, 2026 - addedbuildThe build process and cross-buildThe build process and cross-build
on Apr 16, 2026 An alternate approach might be adding
./configure --with-prebuilt-jit-stencils=<path>, and when it is used, it copies the existing file instead of runningTools/jit/build.py. That would work for us as well and might even be easier to understand.- addedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
on Apr 19, 2026 - added 7 commits that reference this issue
on May 5, 2026 1 remaining item
Metadata
Metadata
Assignees
Labels
buildThe build process and cross-buildThe build process and cross-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
Proposal:
In Fedora, we use prebuilt JIT stencils on some of the Fedora versions/editions.
When autoconf was updated from 2.72 to 2.73 in Fedora Rawhide, we observed a change in the checksum:
The autoconf-generated
pyconfig.hfile is part of the checksum input:https://github.com/python/cpython/blob/v3.15.0a8/Tools/jit/_targets.py#L75
My understanding is that the reason for this checksum check is to prevent outdated JIT stencils when Python is re-configured with different options (or when the stencils generation code is updated).
As suspected, the change in checksum was caused by a change in
pyconfig.h:This is expected, see https://cgit.git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS?h=v2.73#n99
tl;dr When a new autoconf version changes the output of
pyconfig.h, the checksum changes as well.We cannot update the pre-built stencils with the new checksum because that would make the build fail with older autoconf.
Hence, I am proposing we have a way to instruct the
Tools/jit/_targets.pytool to ignore checksum mismatch. We would then use this option in Fedora.For example,
./configure --enable-prebuilt-jit-stencils.I will open a draft PR for consideration. Thanks.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
What we do in Fedora was previously discussed in https://discuss.python.org/t/building-the-jit-with-pre-built-stencils/91838
Linked PRs