-
Notifications
You must be signed in to change notification settings - Fork 890
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
Libgit2sharp on centos #1391
Comments
The version of the libgit2.so file that is included in the NativeBinaries package is built on the Travis CI servers, which run Ubuntu. Unfortunately, the version of OpenSSL that CentOS distributes is built with a non-standard soname, which is why The quickest way to get that working would to be to clone the NativeBinaries repo and run the build script on CentOS. That would give you a version of the .so file that would work on CentOS. |
In the interest of keeping things lined up and official, would you be open to expanding your build process to use something like https://github.com/packpack/packpack to create a libgit2sharp.nativebinaries.centOS and a libgit2sharp.centOS package? |
@JakeGinnivan PackPack looks interesting, but for the NativeBinaries package, it actually does more than we need! We don't need RPM/Debian packages. We need the actual More generally, the idea of using docker on Travis CI to build the CentOS binary does seem like a good way to actually get the artifact built, regardless of how it ends up being packaged/released. If there was a way to build a CentOS-specific NativeBinaries package without also needing a new LibGit2Sharp package, I'd be more inclined to go that route to solve the issue. It just seems kind of crazy to need a distro-specific package like that. With the current structure of the NativeBinaries package, if we started building a CentOS binary, we'd just add a Then, once LibGit2Sharp works properly in .NET Core (#1318), everything would just work correctly. With that in place, we'd be able to work on Desktop .NET Framework and .NET Core without issues. The one remaining problem in this case would be Mono, because it doesn't have a way to alter what native binary it would try to load based on runtime identifiers. We're currently relying on Mono's DllMap support (the LibGit2Sharp.dll.config file) to choose between linux and osx. Unfortunately, it doesn't support anything more granular like individual distros: http://www.mono-project.com/docs/advanced/pinvoke/dllmap/#usage 😢 Assuming cross-platform support is available via .NET Core, I wonder how important it is to still worry about Mono? There are a couple of ways I can think of to work around the Mono problem, but neither are really that desirable: First, we could build the libgit2 binary against a private copy of OpenSSL instead of relying on the system-installed one, and theoretically that would result in a binary that would work on both Ubuntu and CentOS, and likely others as well. However, that would result in a rather large maintenance burden given how often important security updates are released for OpenSSL. The other option would be to bypass the native library loading for both Mono and the .NET Framework altogether by directly calling This whole situation is incredibly frustrating because it's this close to working properly for all scenarios, but there's no real good way forward right now. |
We are just using Mono because that is how we could take GitVersion cross plat. If we could get it working via .net core I think that would be fine. Is annoying for sure. Appreciate the response. |
I am having trouble figuring out the packages I need to install for libgit2sharp on centos.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: