Skip to content

Compile fails when --enable-pystats #131281

Description

@xuantengh

Bug report

Bug description:

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

mkdirbuild&&cdbuild
../configure--with-pydebug--enable-test-modules--enable-pystatsmake-j8
...
Infileincludedfrom ../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: Infunction_PyEval_EvalFrameDefault’:
../Python/generated_cases.c.h:705:22: error: ‘BINARY_SUBSCRundeclared (firstuseinthisfunction); didyoumeanBINARY_SLICE’?
705|STAT_INC(BINARY_SUBSCR, hit);
|^~~~~~~~~~~~~
../Include/internal/pycore_code.h:362:76: note: indefinitionofmacroSTAT_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: eachundeclaredidentifierisreportedonlyonceforeachfunctionitappearsin705|STAT_INC(BINARY_SUBSCR, hit);
|^~~~~~~~~~~~~
../Include/internal/pycore_code.h:362:76: note: indefinitionofmacroSTAT_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