-
Notifications
You must be signed in to change notification settings - Fork 553
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
LLVM: Clang broken on Darwin; fails to compile code outside of the sandbox #9221
Comments
Looks like this is hard-coded in the build by Homebrew through ... where
|
Yeah, you need to pass the path to the SDK with something like
see the thread at JuliaLang/julia#47184 (comment) |
Right, I guess I'm arguing that we should configure this by default by setting |
I'm not sure ww can set a default sysroot path, because it depends on the macos version. I guess in homebrew they can do it because their packages are macos version-specific. |
The primary user of Clang_jll is Clang.jl which uses https://github.com/JuliaInterop/Clang.jl/blob/5e75b5f1b5321c33e6b5ece9cdf05b7e5b325f24/src/generator/context.jl#L243-L245 and https://github.com/JuliaInterop/Clang.jl/blob/5e75b5f1b5321c33e6b5ece9cdf05b7e5b325f24/src/platform/system.jl#L56 but interestingly no In ClangCompiler.jl we did end up setting it https://github.com/Gnimuc/ClangCompiler.jl/blob/acde0348968aae4afad4513fe08c22f611db0d59/examples/clang-interpreter/interpreter.jl#L32 |
There is a symlink:
|
This raises a question I always had. Could we do "CI" for our jlls? Right now we are doing verification, but I have always been hesitating to recommend using clang from Clang_jll since we do no work to verify that it is functional for C/C++. |
I could just paper over this by setting |
Yeah this reminded me of JuliaPackaging/BinaryBuilder.jl#687 I often have something like: https://github.com/JuliaParallel/PMIx.jl/blob/b5c6be4fe342bae7fc6ee770e1e5cc9d388ceab1/src/api.jl#L11 |
We do know how have JuliaPackaging/BinaryBuilder.jl#791 but that is a similar level of icky |
With verbosity cranked up:
math.h
is located in/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include
, which is only discovered by the system Clang.Looks like this is related to sysroot discovery; adding
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
or definingSDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
"fixes" the issue.The text was updated successfully, but these errors were encountered: