Skip to content

Update LibGit2Sharp.NativeBinaries to 1.0.192+, to fix Linux/OpenSSL 1.1 #1408

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

Closed
directhex opened this issue May 11, 2018 · 6 comments
Closed

Comments

@directhex
Copy link

libgit is built against libcurl, for HTTP support

libcurl has a pluggable back-end for which SSL library to use, but the choice is made at compile-time and can't be swapped out

For old, esoteric, stupid reasons, libcurl.so.3 can be built against OpenSSL 1.1 or OpenSSL 1.0, but not both at once - and on systems where one is installed, the other breaks.

e.g.:

MSBUILD : warning : WARN [05/11/18 16:26:23:16] Could not determine assembly version: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: lib/linux/x86_64/libgit2-baa87df.so [x.csproj]
MSBUILD : warning :   at (wrapper managed-to-native) LibGit2Sharp.Core.NativeMethods.git_libgit2_init() [x.csproj]

This was fixed in LibGit2Sharp.NativeBinaries 1.0.192, which switched to using GNUTLS as its SSL library (which is less prone to breakage than OpenSSL).

As-is, this breaks on Ubuntu 18.04

@directhex
Copy link
Author

This is actually worse than I thought - The bundled libgit2 links against OpenSSL directly as well as transitively through libcurl. And it links against the exact ABI version 1.0.0 - which was obsoleted when SSLv3 support was removed, affecting not only distributions with OpenSSL 1.1, but even ones with 1.0.x where x isn't 0 (e.g. Debian 9)

@cuevaskoch
Copy link

cuevaskoch commented May 16, 2018

i'm not sure if this is the right place to post this, but I'm using Cake and GitVersion on Ubuntu. Upgrading to 18.04 broke it. If I install libcurl3 per GitVersion's README, apt will uninstall libcurl4 which will uninstall curl.. my temporary workaround is to add an Artful mirror back to sources.list and install version 7.55.1-1ubuntu2.5 of both curl and libcurl3.

@directhex
Copy link
Author

directhex commented May 16, 2018 via email

@dazinator
Copy link
Member

dazinator commented May 27, 2018

I am curious if #1269 might help you.. It enables gitversion to run on .netstandard platforms - so it can run under mono on linux just as before - but it can also run under .netcore on linux. It uses a different version of libgitsharp and the native binaries to do that. If you read the description at the top of the PR it should explain where you can get that version of gitversion from - there is an appveyor CI nuget feed.

@bravecobra
Copy link

I just ran into the same issue. Any progress on this?

@asbjornu
Copy link
Member

After upgrading to LibGit2Sharp 0.26 in #1713, I hope this problem is fixed. Please try the latest build of GitVersion and report back whether it fixes this problem or not. Reopen this issue if the problem persists.

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

5 participants