-
Notifications
You must be signed in to change notification settings - Fork 203
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
Failed to find headers with clitools clang on macOS 12.5 (M1) #590
Comments
Does it help if you build with:
|
For what it's worth, I confirmed that I get this error on my x86 Mac when I |
Looks like that fixes it! I've never had to manually set it before, what part of the build process uses |
A while back, macOS removed As best I can tell, Apple Clang does not need this to be set, because they add custom code on top of vanilla Clang to auto-detect it. In contrast, if you build a vanilla Clang, it will not (by default) detect this; but it will read But as for the reason why the error occurs with Apple Clang: the auto-detection seems to be finicky. For some reason I don't fully understand, when we use the full path to the C compiler (as we need to do to build LuaJIT), the auto-detection gets shut off. So even though Apple Clang should auto-detect it, you need to set But at any rate, you will need |
Gotcha, interesting quirk to note! Thanks for the detailed info, I can't recall if this is mentioned in the build instructions, but if not it might make a good footnote. Looks like clang might have added auto-detection in https://reviews.llvm.org/D109460?id=371426 through |
By the way, I'd be curious how the test suite looks on M1. You could run either |
I presume running both is redundant, but here's the pass rate and failing tests:
Are the tests meant to all pass on any platform? |
Hm, this failure rate makes me think you might have forgotten We pass 100% of tests on all x86 platforms: macOS, Linux, FreeBSD, and Windows. We also pass 100% of tests on PPC64le Linux. On ARM64 Linux, the pass rate is around 96% (#565 (comment)). Even in emulation I get 95% pass rate (#565 (comment)). I'm hoping that there's a simple fix (like |
|
I can't explain why You might be able to work around with:
That's a different way of specifying the path and shouldn't be necessary if You built with an LLVM from Homebrew, right? It may also be worth trying a vanilla LLVM (there's a build recipe here: https://github.com/terralang/terra#instructions-for-building-llvm-from-source). |
That seems to fix things up (manually setting
|
Thanks. It's good to know we at least have a path to getting it mostly working. I'd be surprised if |
@elliottslaughter apologies for the delay - from the current master branch (23559ea), using self-built LLVM 13 as per the instructions in the Terra docs, it still seems to fail to find the headers. Setting
|
Thanks for testing. I should have mentioned #597. On Linux, this means that AArch64 only works with LLVM 11. I suspect this would help you fix most or all of these outstanding failures. |
On an M1 mac, running macOS 12.5 and with clitools version 13.0.0.0.1.1627064638, if you try and use the stock clitools clang, the build process fails to find some headers - see below log. My current workaround is to use clang from Homebrew's
llvm@13
.Failing build:
Running
make
a 2nd time to try and just get the errors outputs the following:Some other info:
The text was updated successfully, but these errors were encountered: