Skip to content
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

ClangSharp for Gentoo #355

Closed
kant2002 opened this issue Jul 7, 2022 · 5 comments
Closed

ClangSharp for Gentoo #355

kant2002 opened this issue Jul 7, 2022 · 5 comments

Comments

@kant2002
Copy link
Contributor

kant2002 commented Jul 7, 2022

I did try to run Gentoo on Linux without involving portage, just using dotnet tool, but I found that https://github.com/dotnet/ClangSharp/tree/main/packages/libClangSharp missing runtime package for generic Linux RID. Why? Would it be reasonable to ask for adding generic Linux RID, maybe stating that this is unsupported area?

@Perksey
Copy link
Member

Perksey commented Jul 7, 2022

See #244 #336 #340

Dealing with n+ Linux distributions and the various quirks and oddities that each has in how they package and distribute binaries is out of scope of the project.

@kant2002
Copy link
Contributor Author

kant2002 commented Jul 7, 2022

Because I cannot use ClangSharp, can you suggest other libraries with approximately similar functionality for me to evaluate?

@tannergooding
Copy link
Member

Clang itself doesn't provide official Gentoo binaries. If you want to use Gentoo or any other distro that doesn't have official support, you have to build the relevant binaries yourself.

This is going to be true for any distro that doesn't have official binaries produced directly by Clang/LLVM.

@kant2002
Copy link
Contributor Author

I do not know what to say. I do not expeке in Linux which I use mostly as regular user, but from my understanding libclang.so shipped in a lot of distro. Also from https://github.com/dotnet/ClangSharp/tree/main/packages/libclang only Ubuntu is supported on x64, but on ARM64 any Linux distro will works. So that means that technically having linux-x64 instead of overly specific ubuntu.VERSION-x64 maybe do the trick and all variants of Linux would be supported.

I did test with Alpine in WSL and ClangSharp was not working as well because libClangSharp was not found. I assume based on RID listed in the https://github.com/dotnet/ClangSharp/tree/main/packages/libClangSharp that anything RedHat-based would not work either.

@tannergooding
Copy link
Member

but from my understanding libclang.so shipped in a lot of distro

Yes, clang is popular enough that many distros compile their own copy of the library. This is different from the official set of binaries that Clang produces itself: https://github.com/llvm/llvm-project/releases/tag/llvmorg-14.0.0:

  • Armv7a Linux GNU HardFloat
  • Arm64 Linux GNU
  • PowerPC 64 IBM AIX 7.2
  • PowerPC 64 LE Linux RHEL 7.9
  • PowerPC 64 LE Linux Ubuntu 18.04
  • Sparc v9 Sun Solaris 2.11
  • x64 Apple Darwin
  • x64 Linux GNU Ubuntu 18.04
  • x64 Linux SLES 12.4
  • x64 PC Solaris 2.11
  • x64 Unknown FreeBSD 12
  • x64 Unknown FreeBSD 13
  • x64 Win64
  • x86 Win32

Many of these don't have official .NET binaries either and only the Arm32/Arm64 targets are "portable" today. Most of these won't work across other distros due to glibc/glibc++ version specific dependencies and need to be recompiled for each target for if a different LIBC is used (such as MUSL).

This means that it requires significant effort on dotnet/clangsharp to support all possible Linux distros and that is out of scope for the project. Linux devs on other platforms can build a copy specific for their platform, which is a fairly common task for many different project types on Linux as most (outside the most popular projects) don't have official binaries let alone binaries in the respective package manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants