Skip to content

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

@cocolato

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions