Skip to content

Python 3.13 beta 2 fails to build when --enable-experimental-jit is attempted -- FIXED #120275

@wbeebe

Description

@wbeebe

Bug report

Bug description:

Environment:

Linux Mint 21.3 x86_64
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Configure Invocation:

../Python-3.13.0b2/configure --enable-optimizations --disable-gil --enable-experimental-jit

Compilation Error Messages:

==========================================================
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/mint/Develop/build-python/../Python-3.13.0b2/Tools/jit/build.py", line 28, in <module>
  |     args.target.build(pathlib.Path.cwd(), comment=comment, force=args.force)
  |     ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/home/mint/Develop/Python-3.13.0b2/Tools/jit/_targets.py", line 214, in build
  |     stencil_groups = asyncio.run(self._build_stencils())
  |   File "/usr/local/lib/python3.13/asyncio/runners.py", line 194, in run
  |     return runner.run(main)
  |            ~~~~~~~~~~^^^^^^
  |   File "/usr/local/lib/python3.13/asyncio/runners.py", line 118, in run
  |     return self._loop.run_until_complete(task)
  |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  |   File "/usr/local/lib/python3.13/asyncio/base_events.py", line 721, in run_until_complete
  |     return future.result()
  |            ~~~~~~~~~~~~~^^
  |   File "/home/mint/Develop/Python-3.13.0b2/Tools/jit/_targets.py", line 189, in _build_stencils
  |     async with asyncio.TaskGroup() as group:
  |     ...<4 lines>...
  |             tasks.append(group.create_task(coro, name=opname))
  |   File "/usr/local/lib/python3.13/asyncio/taskgroups.py", line 154, in __aexit__
  |     raise me from None
  | ExceptionGroup: unhandled errors in a TaskGroup (2 sub-exceptions)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/mint/Develop/Python-3.13.0b2/Tools/jit/_targets.py", line 164, in _compile
    |     await _llvm.run("clang", args_ll, echo=self.verbose)
    |   File "/home/mint/Develop/Python-3.13.0b2/Tools/jit/_llvm.py", line 99, in run
    |     raise RuntimeError(f"Can't find {tool}-{_LLVM_VERSION}!")
    | RuntimeError: Can't find clang-18!
    +---------------- 2 ----------------
    | Traceback (most recent call last):
    |   File "/home/mint/Develop/Python-3.13.0b2/Tools/jit/_targets.py", line 164, in _compile
    |     await _llvm.run("clang", args_ll, echo=self.verbose)
    |   File "/home/mint/Develop/Python-3.13.0b2/Tools/jit/_llvm.py", line 99, in run
    |     raise RuntimeError(f"Can't find {tool}-{_LLVM_VERSION}!")
    | RuntimeError: Can't find clang-18!
    +------------------------------------
make[2]: *** [Makefile:3019: jit_stencils.h] Error 1
make[2]: Leaving directory '/home/mint/Develop/build-python'
make[1]: *** [Makefile:877: profile-gen-stamp] Error 2
make[1]: Leaving directory '/home/mint/Develop/build-python'
make: *** [Makefile:889: profile-run-stamp] Error 2

I've already built this beta without the GIL and it built and is working fine for my experimental purposes. I decided to rebuild with JIT enabled as well as the disabled GIL and this is what happened. This was just an attempt to experiment with Python with JIT enabled, so I'm not at all upset this happened. But it is interesting.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildpendingThe issue will be closed if no feedback is providedtopic-JITtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions