-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
JIT compilation fails recently on Mac M1: 'assert.h' file not found #127480
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
Comments
This error looks pretty familiar to me. Sometime ago, we saw this error after upgrading LLVM from version 18 to version 19. The problem was not on our side, IIRC. Here's a fix for our CI #126494. |
So, I also have a MacBook with an M1 chip, and it has LLVM 19.1.2 installed. JIT compilation didn't fail with that version, but after upgrading to LLVM 19.1.4 (I also use homebrew), I started getting the same error during JIT compilation: /Users/admin/Projects/cpython/Include/Python.h/Users/admin/Projects/cpython/Include/Python.h::1919::1010:: fatal error: fatal error: 'assert.h' file not found'assert.h' file not found
19 | #include <assert.h> 19 | #include <asse rt./h/> a s s e r t ( )
| ^~~~~~~~~~
// assert()
| ^~~~~~~~~~ |
I'm not much of a homebrew swiss army knife user. How would I back up to 19.1.2? |
Unfortunately, there's no easy way to install a specific version :( |
That's certainly the easiest route for me. Thanks. |
Not being content to leave well enough alone, I asked the Homebrew folks for help (not being sure where to ask, so I started there). The reply I got suggested this:
which seems to have solved the issue for me. I'm closing this ticket. |
Thank you, Skip, for sharing this. I'll also apply it to fix the JIT build on my machine. 🙂 |
(Changing the title to make it easier to find for someone who might be fighting with the same thing) |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
In the past few days, the JIT fragment compilation step began failing for me on my M1 MacBook Pro (running Sequoia 15.1.1). The complaint is that
assert.h
can't be found. I'm using clang 19 from homebrew. (Apple's /usr/bin/clang is still v16, which isn't new enough to compile the JIT stuff, as I understand it.):and am told these are the default include file directories:
There is an
assert.h
in the llvm wrappers subdir that first directory:I assume that the LLVM folks know what they are doing and actually search that wrappers directory. ¯_(ツ)_/¯
I've attached a file with the output of the compilation.
errors.txt
In the end, I suspect it will turn out that I've done something wrong, but I post here just in case I'm correct.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
The text was updated successfully, but these errors were encountered: