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 — Duplicate symbol _Py_jit_entry when built with --enable-exterimental-jit · Issue #144712 · python/cpython

Duplicate symbol _Py_jit_entry when built with --enable-exterimental-jit #144712

New issue
Copy link
New issue
Copy link
Open
Open
Duplicate symbol _Py_jit_entry when built with --enable-exterimental-jit#144712
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@jjhelmus
jjhelmus
opened on Feb 11, 2026
Issue body actions

Bug report

Bug description:

When building with the --enable-experimental-jit option, the _Py_jit_entry symbol is duplicated in Python/ceval.o and Modules/_testinternalcapi/interpreter.o preventing them from being linked into the same DSO.

The later symbol was added in #143944. This symbol should likely be marked as extern.

I found this issue when building 3.15.0a6 for python-build-standalone, astral-sh/python-build-standalone#981. The build is configured so that the _testinternalcapi module is statically linked into the interpreter.

Example build log

cpython-3.15> ld64.lld: error: duplicate symbol: _Py_jit_entry
cpython-3.15> >>> defined in Python/ceval.o
cpython-3.15> >>> defined in Modules/_testinternalcapi/interpreter.o
cpython-3.15> clang: error: linker command failed with exit code 1 (use -v to see invocation)

CPython versions tested on:

CPython main branch, 3.15

Operating systems tested on:

macOS

Linked PRs

  • gh-144712 extern _Py_jit_entry in Modules/_testinternalcapi/interpreter.c #144713
  • gh-144712: Export _Py_jit_entry symbol via PyAPI_DATA #145840

Activity

  1. jjhelmus
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Feb 11, 2026
  2. StanFromIreland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    topic-JIT
    on Feb 11, 2026
  3. jjhelmus commented on Feb 11, 2026

    @jjhelmus
    jjhelmus
    on Feb 11, 2026
    ContributorAuthor
    More actions

    This is a bit tricky. When statically linking _testinternalcapi the symbol must not be duplicated and the second definition can be marked extern. In the more common case where _testinternalcapi is dynamic the symbol needs to be defined in the module because it is not a global.

  4. jjhelmus commented on Feb 11, 2026

    @jjhelmus
    jjhelmus
    on Feb 11, 2026
    ContributorAuthor
    More actions

    The declaration of _Py_jit_entry in Modules/_testinternalcapi/interpreter.c is unusual as it is NULL. I does not seem to be used for anything functionally but is needed to allow the extension to be properly linked. Should this be made more clear in the file?

  5. dlin09119-design commented on Feb 19, 2026

    @dlin09119-design
    dlin09119-design
    on Feb 19, 2026 · Hidden as spam
    show commentMore actions
  6. ashm-dev
    added a commit that references this issue on Apr 15, 2026

    Merge branch 'main' into pythongh-144712

    61840e1
  7. ashm-dev
    added 2 commits that reference this issue on Apr 29, 2026

    Merge branch 'main' into pythongh-144712

    d7a1a08

    pythongh-144712: Fix _Py_jit_entry initializer after merge

    082a57e
  8. ashm-dev
    added 2 commits that reference this issue on May 19, 2026

    pythongh-144712: Export _Py_jit_entry symbol via PyAPI_DATA

    00c9eb3

    Merge branch 'main' into pythongh-144712

    a553b9f
  9. ashm-dev
    added a commit that references this issue on Aug 24, 2026

    Merge branch 'main' into pythongh-144712

    cf15bb6
  10. ashm-dev
    added a commit that references this issue on Sep 17, 2026

    Merge branch 'main' into pythongh-144712

    519d58b
  11. diegorusso
    added a commit that references this issue on Sep 17, 2026

    gh-144712: Export _Py_jit_entry symbol via PyAPI_DATA (#145840)

    e8c06d6
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

    extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — 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.