python / python/cpython

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

未關閉
#144,712 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

extension-modules topic-JIT type-bug
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

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-144713
  • gh-145840

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

檢查在 --enable-experimental-jit 下產生 Python/ceval.o 和 Modules/_testinternalcapi/interpreter.o 的定義,然後與 #143944 引入的宣告進行比較。完成的標準是,兩個物件可以在不產生重複的 _Py_jit_entry 符號的情況下連結到同一個 DSO 中,包括 macOS 建置組態。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
c, python
領域
build-system
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。