Skip to content

JIT does not build on the main branch #122869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ZeroIntensity opened this issue Aug 9, 2024 · 8 comments
Closed

JIT does not build on the main branch #122869

ZeroIntensity opened this issue Aug 9, 2024 · 8 comments
Assignees
Labels
build The build process and cross-build topic-JIT type-bug An unexpected behavior, bug, or error

Comments

@ZeroIntensity
Copy link
Member

ZeroIntensity commented Aug 9, 2024

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

@ZeroIntensity ZeroIntensity added the type-bug An unexpected behavior, bug, or error label Aug 9, 2024
@Eclips4 Eclips4 added build The build process and cross-build topic-JIT labels Aug 9, 2024
@Eclips4
Copy link
Member

Eclips4 commented Aug 9, 2024

I cannot reproduce it on current main.

@Eclips4
Copy link
Member

Eclips4 commented Aug 9, 2024

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);
                      ^ ~~~~~~~~~~~~~~~~~~~~~

@ZeroIntensity
Copy link
Member Author

What version of GCC are you on?

@Eclips4
Copy link
Member

Eclips4 commented Aug 9, 2024

What version of GCC are you on?

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

@ZeroIntensity
Copy link
Member Author

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

@Eclips4
Copy link
Member

Eclips4 commented Aug 9, 2024

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

@ZeroIntensity
Copy link
Member Author

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

@brandtbucher brandtbucher self-assigned this Aug 10, 2024
@aisk
Copy link
Contributor

aisk commented Aug 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build topic-JIT type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants