Skip to content

JIT does not build on the main branch #122869

Closed

Description

@ZeroIntensity

Bug report

Bug description:

Configuring with --enable-experimental-jit and then trying to build causes the following error (same as in #118343):

In file included from Python/optimizer_analysis.c:437:
Python/optimizer_cases.c.h: In function ‘optimize_uops’:
Python/optimizer_cases.c.h:548:23: error: assignment to ‘_PyInterpreterFrame *’ from incompatible pointer type ‘_Py_UopsSymbol *’ [-Wincompatible-pointer-types]
  548 |             new_frame = sym_new_not_null(ctx);
      |                       ^
Python/optimizer_cases.c.h:1176:23: error: assignment to ‘_PyInterpreterFrame *’ from incompatible pointer type ‘_Py_UopsSymbol *’ [-Wincompatible-pointer-types]
 1176 |             new_frame = sym_new_not_null(ctx);

Note that this doesn't occur on the 3.13 branch!

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. Eclips4 commented on Aug 9, 2024

    @Eclips4
    Member

    I cannot reproduce it on current main.

  2. Eclips4 commented on Aug 9, 2024

    @Eclips4
    Member

    Ah, nevermind. For some reason on macOS it generates warning, not an error:

    Python/optimizer_cases.c.h:548:23: warning: incompatible pointer types assigning to '_PyInterpreterFrame *' (aka 'struct _PyInterpreterFrame *') from '_Py_UopsSymbol *' (aka 'struct _Py_UopsSymbol *') [-Wincompatible-pointer-types]
                new_frame = sym_new_not_null(ctx);
                          ^ ~~~~~~~~~~~~~~~~~~~~~
    
  3. ZeroIntensity commented on Aug 9, 2024

    @ZeroIntensity
    MemberAuthor

    What version of GCC are you on?

  4. Eclips4 commented on Aug 9, 2024

    @Eclips4
    Member

    What version of GCC are you on?

    It's not a GCC; it's a clang.

  5. ZeroIntensity commented on Aug 9, 2024

    @ZeroIntensity
    MemberAuthor

    Oh, ok. I'm on clang 18.1, maybe it's a warning on future (or previous) versions.

  6. Eclips4 commented on Aug 9, 2024

    @Eclips4
    Member

    Oh, ok. I'm on clang 18.1, maybe it's a warning on future (or previous) versions.

    Can you share flags that are used by compiler? For example:

    gcc  -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall    -D_Py_TIER2=1 -D_Py_JIT -fstack-protector-strong -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include     -c ./Modules/selectmodule.c -o Modules/selectmodule.o
  7. ZeroIntensity commented on Aug 9, 2024

    @ZeroIntensity
    MemberAuthor
    gcc -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall    -D_Py_TIER2=1 -D_Py_JIT -fstack-protector-strong -Wtrampolines -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include    -DPy_BUILD_CORE
    
  8. self-assigned this
    on Aug 10, 2024
  9. aisk commented on Aug 11, 2024

    @aisk
    Member

    Hi, I can reproduce the bug on Arch with ./configure --with-pydebug --enable-experimental-jit, and the GCC version is 14.2.1.

  10. added a commit that references this issue on Aug 12, 2024
  11. added a commit that references this issue on Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions