Skip to content

Build requirements lacks jit dependencies #138613

@skirpichev

Description

@skirpichev

I'm trying to build CPython with --enable-experimental-jit=yes-off and gcc-12.

I don't see anything missing, according to
https://docs.python.org/3.14/using/configure.html#build-requirements
or
https://docs.python.org/3.14/using/configure.html#cmdoption-enable-experimental-jit
(yes, I've CPython 3.11.13 available)
or
https://docs.python.org/3.14/whatsnew/3.14.html#binary-releases-for-the-experimental-just-in-time-compiler
or
https://docs.python.org/3.13/whatsnew/3.13.html#whatsnew313-jit-compiler
or
git grep clang-19 Doc/

Though, I've (Debian 12):

$ ./configure -q --with-system-libmpdec --enable-experimental-jit=yes-off --prefix=/home/sk/3.15jit && make -s
In file included from ./Include/internal/pycore_dict.h:11,
                 from Objects/typeobject.c:7:
In function ‘Py_DECREF_MORTAL’,
    inlined from ‘PyStackRef_XCLOSE’ at ./Include/internal/pycore_stackref.h:730:9,
    inlined from ‘_PyThreadState_PopCStackRef’ at ./Include/internal/pycore_stackref.h:810:5,
    inlined from ‘vectorcall_maybe’ at Objects/typeobject.c:3108:9:
./Include/internal/pycore_object.h:481:8: warning: array subscript 0 is outside array bounds of ‘PyObject[0]’ {aka ‘struct _object[]’} [-Warray-bounds]
  481 |     if (--op->ob_refcnt == 0) {
      |        ^
==========================================================
JIT support for x86_64-pc-linux-gnu is still experimental!
         Please report any issues you encounter.
==========================================================

  + Exception Group Traceback (most recent call last):
  |   File "/home/sk/src/cpython/./Tools/jit/build.py", line 52, in <module>
  |     target.build(
  |     ~~~~~~~~~~~~^
  |         comment=comment,
  |         ^^^^^^^^^^^^^^^^
  |         force=args.force,
  |         ^^^^^^^^^^^^^^^^^
  |         jit_stencils=args.output_dir / f"jit_stencils-{target.triple}.h",
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |     )
  |     ^
  |   File "/home/sk/src/cpython/Tools/jit/_targets.py", line 236, in build
  |     stencil_groups = ASYNCIO_RUNNER.run(self._build_stencils())
  |   File "/usr/local/lib/python3.15/asyncio/runners.py", line 127, in run
  |     return self._loop.run_until_complete(task)
  |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  |   File "/usr/local/lib/python3.15/asyncio/base_events.py", line 719, in run_until_complete
  |     return future.result()
  |            ~~~~~~~~~~~~~^^
  |   File "/home/sk/src/cpython/Tools/jit/_targets.py", line 196, in _build_stencils
  |     async with asyncio.TaskGroup() as group:
  |                ~~~~~~~~~~~~~~~~~^^
  |   File "/usr/local/lib/python3.15/asyncio/taskgroups.py", line 72, in __aexit__
  |     return await self._aexit(et, exc)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/usr/local/lib/python3.15/asyncio/taskgroups.py", line 174, in _aexit
  |     raise BaseExceptionGroup(
  |     ...<2 lines>... 
  |     ) from None
  | ExceptionGroup: unhandled errors in a TaskGroup (2 sub-exceptions)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/sk/src/cpython/Tools/jit/_targets.py", line 178, in _compile
    |     await _llvm.run("clang", args_s, echo=self.verbose)
    |   File "/home/sk/src/cpython/Tools/jit/_llvm.py", line 107, in run
    |     raise RuntimeError(f"Can't find {tool}-{_LLVM_VERSION}!")
    | RuntimeError: Can't find clang-19!
    +---------------- 2 ----------------
    | Traceback (most recent call last):
    |   File "/home/sk/src/cpython/Tools/jit/_targets.py", line 178, in _compile
    |     await _llvm.run("clang", args_s, echo=self.verbose)
    |   File "/home/sk/src/cpython/Tools/jit/_llvm.py", line 107, in run
    |     raise RuntimeError(f"Can't find {tool}-{_LLVM_VERSION}!")
    | RuntimeError: Can't find clang-19!
    +------------------------------------
make: *** [Makefile:3284: jit_stencils.h] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixesbuildThe build process and cross-builddocsDocumentation in the Doc dirtopic-JIT

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions