You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm following this tutorial on how to generate C# interop bindings for a clang library.
After doing dotnet tool install --global ClangSharpPInvokeGenerator --version 16.0.0. I got a missing file error, so I followed the instructions to manually build the missing library.
ClangSharpPInvokeGenerator --file ../library/api_client/public/include/api_client.h -n api --methodClassName apiClient -o ./apiClient.cs --libraryPath api
*****IMPORTANT*****
Failed to resolve libClangSharp.
If you are running as a dotnet tool, you may need to manually copy the appropriate DLLs from NuGet due to limitations in the dotnet tool support. Please see https://github.com/dotnet/clangsharp for more details.
*****IMPORTANT*****
Unhandled exception: System.DllNotFoundException: Unable to load shared library 'libClangSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/dan/.dotnet/tools/.store/clangsharppinvokegenerator/16.0.0/clangsharppinvokegenerator/16.0.0/tools/net7.0/any/libClangSharp.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.14/libClangSharp.so: cannot open shared object file: No such file or directory
/home/dan/.dotnet/tools/.store/clangsharppinvokegenerator/16.0.0/clangsharppinvokegenerator/16.0.0/tools/net7.0/any/liblibClangSharp.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.14/liblibClangSharp.so: cannot open shared object file: No such file or directory
/home/dan/.dotnet/tools/.store/clangsharppinvokegenerator/16.0.0/clangsharppinvokegenerator/16.0.0/tools/net7.0/any/libClangSharp: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.14/libClangSharp: cannot open shared object file: No such file or directory
/home/dan/.dotnet/tools/.store/clangsharppinvokegenerator/16.0.0/clangsharppinvokegenerator/16.0.0/tools/net7.0/any/liblibClangSharp: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.14/liblibClangSharp: cannot open shared object file: No such file or directory
I followed the instructions described in the README.md and managed to build libClangSharp. I thought all I'd have to do is cp libClangSharp.so to /home/dan/.dotnet/tools/.store/clangsharppinvokegenerator/16.0.0/clangsharppinvokegenerator/16.0.0/tools/net7.0/any/libClangSharp.so but that's not working. I have confirmed that everything was downloaded and built properly but the hint saying "If you are running as a dotnet tool, you may need to manually copy the appropriate DLLs from NuGet due to limitations in the dotnet tool support. Please see https://github.com/dotnet/clangsharp for more details.". I don't have a DLL, I assumed this hint was telling me to copy libClangSharp.so to the spot mentioned in the error message.
This is the command I ran
ClangSharpPInvokeGenerator --file ../library/api_client/public/include/api_client.h -n api --methodClassName apiClient -o ./apiClient.cs --libraryPath api
How do I correct the segmentation fault so that I can run this program and generate my interop bindings? An AUR repo would be ideal but I need to fix this faster than that.
The text was updated successfully, but these errors were encountered:
I'm following this tutorial on how to generate C# interop bindings for a clang library.
After doing
dotnet tool install --global ClangSharpPInvokeGenerator --version 16.0.0
. I got a missing file error, so I followed the instructions to manually build the missing library.I followed the instructions described in the README.md and managed to build libClangSharp. I thought all I'd have to do is
cp
libClangSharp.so to/home/dan/.dotnet/tools/.store/clangsharppinvokegenerator/16.0.0/clangsharppinvokegenerator/16.0.0/tools/net7.0/any/libClangSharp.so
but that's not working. I have confirmed that everything was downloaded and built properly but the hint saying "If you are running as a dotnet tool, you may need to manually copy the appropriate DLLs from NuGet due to limitations in the dotnet tool support. Please see https://github.com/dotnet/clangsharp for more details.". I don't have a DLL, I assumed this hint was telling me to copylibClangSharp.so
to the spot mentioned in the error message.This is the command I ran
And this was its response
System stats:
How do I correct the segmentation fault so that I can run this program and generate my interop bindings? An AUR repo would be ideal but I need to fix this faster than that.
The text was updated successfully, but these errors were encountered: