Skip to content

Compile fails when --enable-pystats #131281

Closed
@xuantengh

Description

@xuantengh

Bug report

Bug description:

I've tried to compile CPython with --enable-pystats, but it fails

mkdir build && cd build
../configure --with-pydebug --enable-test-modules --enable-pystats
make -j8

...
In file included from ../Include/internal/pycore_interp.h:16,
                 from ../Include/internal/pycore_runtime.h:19,
                 from ../Include/internal/pycore_pystate.h:11,
                 from ../Include/internal/pycore_call.h:11,
                 from ../Python/ceval.c:9:
../Python/generated_cases.c.h: In function_PyEval_EvalFrameDefault’:
../Python/generated_cases.c.h:705:22: error: ‘BINARY_SUBSCRundeclared (first use in this function); did you meanBINARY_SLICE’?
  705 |             STAT_INC(BINARY_SUBSCR, hit);
      |                      ^~~~~~~~~~~~~
../Include/internal/pycore_code.h:362:76: note: in definition of macroSTAT_INC362 | #define STAT_INC(opname, name) do { if (_Py_stats) _Py_stats->opcode_stats[opname].specialization.name++; } while (0)
      |                                                                            ^~~~~~
../Python/generated_cases.c.h:705:22: note: each undeclared identifier is reported only once for each function it appears in
  705 |             STAT_INC(BINARY_SUBSCR, hit);
      |                      ^~~~~~~~~~~~~
../Include/internal/pycore_code.h:362:76: note: in definition of macroSTAT_INC362 | #define STAT_INC(opname, name) do { if (_Py_stats) _Py_stats->opcode_stats[opname].specialization.name++; } while (0)
      |                                                                            ^~~~~~

wth gcc 14.2.0

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-buildinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions