Skip to content

JIT compilation fails recently on Mac M1: 'assert.h' file not found #127480

@smontanaro

Description

@smontanaro

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.):

% clang -v    
Homebrew clang version 19.1.4
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.4/bin
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin24.cfg
System configuration file directory: /opt/homebrew/etc/clang
User configuration file directory: /Users/skip/.config/clang

and am told these are the default include file directories:

% echo | clang -xc -E -v -
...
#include "..." search starts here:
#include <...> search starts here:
 /opt/homebrew/Cellar/llvm/19.1.4/lib/clang/19/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/System/Library/Frameworks (framework directory)
End of search list.

There is an assert.h in the llvm wrappers subdir that first directory:

/opt/homebrew/Cellar/llvm/19.1.4/lib/clang/19/include/llvm_libc_wrappers/assert.h

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions