Skip to content

Build failed with enable-experimental-jit and enable-pystats #148957

Closed as duplicate

Description

@cocolato

Bug report

Bug description:

Because we added jit_got_size in #142316, but didn't update the corresponding struct and print functions in `pystat.

Build command: ./configure --enable-experimental-jit --enable-pystats & make

error:

In file included from ./Include/pystats.h:16,
                 from ./Include/Python.h:75,
                 from Python/jit.c:3:
Python/jit.c: In function ‘_PyJIT_Compile’:
Python/jit.c:685:18: error: ‘OptimizationStats’ {aka ‘struct _optimization_stats’} has no member named ‘jit_got_size’; did you mean ‘jit_code_size’?
  685 |     OPT_STAT_ADD(jit_got_size, state.got_symbols.size);
      |                  ^~~~~~~~~~~~
./Include/cpython/pystats.h:214:16: note: in definition of macro ‘_Py_STATS_EXPR’
  214 |             s->expr; \
      |                ^~~~
Python/jit.c:685:5: note: in expansion of macro ‘OPT_STAT_ADD’
  685 |     OPT_STAT_ADD(jit_got_size, state.got_symbols.size);
      |     ^~~~~~~~~~~~
gcc -shared      Modules/_zoneinfo.o   -o Modules/_zoneinfo.cpython-315-x86_64-linux-gnu.so
gcc -shared      Modules/mathmodule.o -lm  -o Modules/math.cpython-315-x86_64-linux-gnu.so
make: *** [Makefile:3402: Python/jit.o] Error 1
make: *** Waiting for unfinished jobs....

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bug
    build
    on Apr 24, 2026
  2. savannahostrowski commented on Apr 24, 2026

    @savannahostrowski
    Member

    This appears to be a duplicate of #148219, which has a PR opened for it already.

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

    buildtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions