GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a way to ignore JIT stencil digest · Issue #148646 · python/cpython

Add a way to ignore JIT stencil digest #148646

New issue
Copy link
New issue
Copy link
Open
Open
Add a way to ignore JIT stencil digest#148646
Copy link
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

@hroncok
hroncok
opened on Apr 16, 2026
Issue body actions

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:

--- /builddir/build/SOURCES/Python-3.15.0a7-x86_64-debug-jit_stencils.h 2026-03-10 00:00:00.000000000 +0000
+++ build/debug/jit_stencils-x86_64-unknown-linux-gnu.h 2026-03-31 21:12:53.391262973 +0000
@@ -1,4 +1,4 @@
-// 5e1dc452d67c20147c4ea13e692c2d3e7b0b47b24f8847354c58988c7ffa02bc
+// c783e3946f774d4d83e8fdcca35678ec77006e1b96b12661fcbd3ee680d10e94
 // $ python3.14 /builddir/build/BUILD/python3.14-3.15.0_a7-build/Python-3.15.0a7/Tools/jit/build.py x86_64-redhat-linux-gnu --output-dir . --pyconfig-dir . --cflags= --llvm-version= --debug

The autoconf-generated pyconfig.h file 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:

--- pyconfig.h
+++ pyconfig.h
@@ -1882,6 +1882,10 @@
 #ifndef _ALL_SOURCE
 # define _ALL_SOURCE 1
 #endif
+/* Enable extensions on Cosmopolitan Libc. */
+#ifndef _COSMO_SOURCE
+# define _COSMO_SOURCE 1
+#endif
 /* Enable general extensions on macOS.  */
 #ifndef _DARWIN_C_SOURCE
 # define _DARWIN_C_SOURCE 1

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.py tool 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

  • gh-148646: Add --enable-prebuilt-jit-stencils configure flag #148647

Activity

Next
  1. hroncok
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Apr 16, 2026
  2. hroncok
    added a commit that references this issue on Apr 16, 2026

    pythongh-148646: Add --enable-prebuilt-jit-stencils configure flag

    0f88675
  3. cocolato
    added
    topic-JIT
    buildThe build process and cross-buildThe build process and cross-build
    on Apr 16, 2026
  4. hroncok commented on Apr 17, 2026

    @hroncok
    hroncok
    on Apr 17, 2026
    ContributorAuthor
    More actions

    An alternate approach might be adding ./configure --with-prebuilt-jit-stencils=<path>, and when it is used, it copies the existing file instead of running Tools/jit/build.py. That would work for us as well and might even be easier to understand.

  5. hroncok
    added 2 commits that reference this issue on Apr 17, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    f398d09

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    fffd30c
  6. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Apr 19, 2026
  7. hroncok
    added 7 commits that reference this issue on May 5, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    5cd9499

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    942f78d

    pythongh-148646: Add --enable-prebuilt-jit-stencils configure flag

    ebe88b8

    pythongh-148646: Add --enable-prebuilt-jit-stencils configure flag

    9d17d1d

    pythongh-148646: Add --enable-prebuilt-jit-stencils configure flag

    1f0c38e

    0486:: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    1fafd61

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    059e0ca
  8. 6 remaining items

  9. hroncok
    added a commit that references this issue on Jul 18, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    92e0062
  10. befeleme
    added a commit that references this issue on Aug 10, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    5c2dd33
  11. hroncok
    added a commit that references this issue on Aug 12, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    55346f6
  12. befeleme
    added a commit that references this issue on Aug 13, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    dd54be3
  13. hroncok
    added a commit that references this issue on Aug 20, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    df8c3a4
  14. befeleme
    added 2 commits that reference this issue on Sep 3, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    ef73db4

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    aa3af4b
  15. befeleme
    added a commit that references this issue on Oct 1, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    5abf0a0
  16. hroncok
    added a commit that references this issue on Oct 3, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    0c29bb0
  17. befeleme
    added a commit that references this issue on Oct 9, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    b61bf3a
  18. hroncok
    added a commit that references this issue on Oct 22, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    90e8d66
  19. befeleme
    added a commit that references this issue on Oct 22, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    bf7d545
  20. hroncok
    added a commit that references this issue on Oct 26, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    635a33d
  21. befeleme
    added a commit that references this issue on Oct 26, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    5b7d643
  22. befeleme
    added a commit that references this issue on Nov 11, 2026

    00486: pythongh-148646: Add --enable-prebuilt-jit-stencils configure …

    d5ea41d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.