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

Unhandled exception on latest Ubuntu 18.04.1 because of upgrade to libcurl4 #13

Closed
adamskt opened this issue Oct 16, 2018 · 5 comments · Fixed by #28
Closed

Unhandled exception on latest Ubuntu 18.04.1 because of upgrade to libcurl4 #13

adamskt opened this issue Oct 16, 2018 · 5 comments · Fixed by #28

Comments

@adamskt
Copy link

adamskt commented Oct 16, 2018

Running dotnet CLI 2.1.5 on Ubuntu 18.04.1 LTS, git-istage throws this exception:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'git2-8e0b172' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-8e0b172: cannot open shared object file: No such file or directory
   at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
   at LibGit2Sharp.Core.NativeMethods.LoadNativeLibrary()
   at LibGit2Sharp.Core.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at LibGit2Sharp.Core.NativeMethods.git_repository_discover(GitBuf buf, FilePath start_path, Boolean across_fs, FilePath ceiling_dirs)
   at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever)
   at LibGit2Sharp.Repository.Discover(String startingPath)
   at GitIStage.Program.ResolveRepositoryPath() in /home/vsts/work/1/s/src/git-istage/Program.cs:line 36
   at GitIStage.Program.Main() in /home/vsts/work/1/s/src/git-istage/Program.cs:line 14
error: git-istage died of signal 6

Turning up LD_DEBUG yields this nugget:

7259:	/usr/lib/x86_64-linux-gnu/libcurl.so.4: error: version lookup error: version `CURL_OPENSSL_3' not found (required by /home/thor/.dotnet/tools/.store/git-istage/0.2.2/git-istage/0.2.2/tools/netcoreapp2.1/any/runtimes/linux-x64/native/libgit2-8e0b172.so) (fatal)

It looks like LibGit2Sharp depends on libcurl3 as referenced in this issue. So this will probably go away when LibGit2Sharp updates their native library.

For completion's sake, my dotnet config:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.403
 Commit:    04e15494b6

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.1.403/

Host (useful for support):
  Version: 2.1.5
  Commit:  290303f510

.NET Core SDKs installed:
  2.1.403 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
@terrajobst
Copy link
Owner

AWESOME. Now, these are great bug reports!

@ethomson, what's the best way to make LibGitSharp2 workable for me under Ubuntu 18.04.1? It should be pretty popular for our crowd due to WSL support.

@ethomson
Copy link

I’m working on reducing the native dependencies that libgit2sharp takes. In the meantime you can try the experimental builds of that (libgit2/libgit2sharp#1618) or continue to require users to install libcurl3.

@bording
Copy link

bording commented Nov 7, 2018

@terrajobst If you don't want to wait for the work @ethomson mentioned that will remove the curl and OpenSSL dependencies completely, the latest preview release, 0.26.0-preview-0062, now includes an ubuntu.18.04-x64 binary, so this should work with that release.

@ethomson
Copy link

ethomson commented Dec 1, 2018

In addition, I've released a prerelease LibGit2Sharp that should help a bit here. I've updated libgit2 to have built-in support for proxies, so we no longer rely upon libcurl. I think this should help the native dependency problems quite a bit.

This is available in LibGit2Sharp 0.26.0-preview-0070.

terrajobst added a commit that referenced this issue Dec 6, 2018
From ethomson:

> I've released a prerelease LibGit2Sharp that should help a bit here. I've
> updated libgit2 to have built-in support for proxies, so we no longer rely
> upon libcurl. I think this should help the native dependency problems quite
> a bit.

This should resolve the libcurl4 issue with have on Ubuntu 18.04.1 (#13).
@terrajobst
Copy link
Owner

terrajobst commented Dec 6, 2018

I've pushed an update to nuget.org (git-istage 0.2.61). Will take a few minutes before it's available.

To upgrade, run

dotnet tool update git-istage --global

To install on a fresh box run

dotnet tool install git-istage --global

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

Successfully merging a pull request may close this issue.

4 participants