Skip to content

--disable-gil & --enable-experimental-jit fails to build on M1 Mac #118844

Closed
@smontanaro

Description

@smontanaro

Bug report

Bug description:

On my M1 Mac, if I configure like so: ./configure --disable-gil --enable-experimental-jit I get a compilation error:

gcc -c -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall    -D_Py_TIER2=1 -D_Py_JIT -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 -o Python/jit.o Python/jit.c
In file included from Python/jit.c:392:
./jit_stencils.h:13419:49: error: use of undeclared identifier '_PyCriticalSection_Resume'
    patch_aarch64_16a(code + 0x198, (uintptr_t)&_PyCriticalSection_Resume);

(followed by many more of the same error).

I don't recall if I've tried this configure combination before or not. I'm using Apple's clang on an up-to-date MacOS (14.4.1):

% gcc --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Labels

OS-macbuildThe 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