-
Notifications
You must be signed in to change notification settings - Fork 151
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
ClangSharpPInvokeGenerator fails on MacOS (Apple silicon) #319
Comments
It looks like the clang installed with You'd need to ensure it is resolvable either by adding the relevant path to the native library loading search paths or ensuring |
@tannergooding could you elaborate on how to specify the native library path? I tried installing standalone LLVM, but it also gets installed to a location not compatible with these default search paths. I wonder if the default search paths need revision for MacOS platform? |
Adding some context here for another MacOS/Apple Silicon user — Also getting DLL missing issues. |
.NET simply uses the system default resolution path for a given platform. If .NET can't resolve it then a standard native executable wouldn't resolve it either. Copying the native libraries next to the executable will "typically" allow resolution to succeed. As would ensuring they are in one of the folders on the default search path for the system. You may have to use tools or environment variables (i.e. |
I'm placing libclang in all the places the DLL is reporting as looking but the program seems not to resolve any of the paths as correct. Can you look at my other linked issues and see if it even looks right? |
You need both |
Sorry - that one picture was slightly out of date. See the other comment:
What I'm wondering is that since it's an M1 it's looking for an M1 compiled clang or clangSharp? |
It might be and there is no corresponding version of Notably, the picture I saw showed a symlink to |
Ah, I wasn't aware they were different. I'll give that a go and see what happens |
I'm publishing osx-arm64 binaries as part of v15.0.0 (going to track via #345). |
Just updating this as well for anyone that finds themselves here as I finally got around to fixing this and there's been some updates. You can manually download the libClang: https://www.nuget.org/packages/libclang.runtime.osx-arm64 If installed as a Global dotnet tool, you can just put the .dylib files next to your install of ClangSharpPinvokeGenerator here (or your version): I was able to get the tool to work this way. |
The latest global tool (ClangSharpPInvokeGenerator v 13.0) installs fine, however when I run from the command line it cannot find libClang. Is there an extra installation of LLVM that needs to be done?
Clang is installed as part of XCode:
The text was updated successfully, but these errors were encountered: