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

SourceLink does not work on Debian 10 (buster) #192

Closed
24mu13 opened this issue Oct 17, 2018 · 4 comments
Closed

SourceLink does not work on Debian 10 (buster) #192

24mu13 opened this issue Oct 17, 2018 · 4 comments

Comments

@24mu13
Copy link

24mu13 commented Oct 17, 2018

Same error described here: #66

More exactly this is the error:

0>/home/samuel/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/Microsoft.Build.Tasks.Git.targets(20,5): Error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly.
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library '/home/samuel/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/../tools/netcoreapp2.0/runtimes/linux-x64/native/libgit2-b0d9952.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libssl.so.1.0.0: cannot open shared object file: No such file or directory
   at System.Runtime.Loader.AssemblyLoadContext.InternalLoadUnmanagedDllFromPath(String unmanagedDllPath)
   at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath)
   at Microsoft.Build.Tasks.Git.GitLoaderContext.LoadUnmanagedDll(String unmanagedDllName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 48
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext)
   at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
   at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
   at LibGit2Sharp.Core.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at LibGit2Sharp.Core.NativeMethods.git_buf_free(GitBuf buf)
   at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever)
   at LibGit2Sharp.Repository.Discover(String startingPath)
   at Microsoft.Build.Tasks.Git.RepositoryTasks.LocateRepository(LocateRepository task) in /_/src/Microsoft.Build.Tasks.Git.Operations/RepositoryTasks.cs:line 50
   at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 22
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
@24mu13 24mu13 changed the title Source does not work on Debian 10 (buster) SourceLink does not work on Debian 10 (buster) Oct 17, 2018
@24mu13
Copy link
Author

24mu13 commented Oct 17, 2018

So, I manually installed libssl1.0.0 from another Debian suite (jessie i.e.), but now the issue is with the missing libcurl3 installed (Debian 10 has libcurl4 instead), I suppose:

0>/home/samuel/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/Microsoft.Build.Tasks.Git.targets(20,5): Error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly.
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library '/home/samuel/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/../tools/netcoreapp2.0/runtimes/linux-x64/native/libgit2-b0d9952.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /home/samuel/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/../tools/netcoreapp2.0/runtimes/linux-x64/native/libgit2-b0d9952.so)
   at System.Runtime.Loader.AssemblyLoadContext.InternalLoadUnmanagedDllFromPath(String unmanagedDllPath)
   at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath)
   at Microsoft.Build.Tasks.Git.GitLoaderContext.LoadUnmanagedDll(String unmanagedDllName) in /_/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 48
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext)
   at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
   at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
   at LibGit2Sharp.Core.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at LibGit2Sharp.Core.NativeMethods.git_buf_free(GitBuf buf)
   at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever)
   at LibGit2Sharp.Repository.Discover(String startingPath)
   at Microsoft.Build.Tasks.Git.RepositoryTasks.LocateRepository(LocateRepository task) in /_/src/Microsoft.Build.Tasks.Git.Operations/RepositoryTasks.cs:line 50
   at Microsoft.Build.Tasks.Git.LocateRepository.Execute() in /_/src/Microsoft.Build.Tasks.Git/LocateRepository.cs:line 22
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@tmat
Copy link
Member

tmat commented Oct 18, 2018

OpenSSL issues are known. See e.g. dotnet/roslyn#29289.
libgit2 maintainers are working on a solution.

@tmat
Copy link
Member

tmat commented Dec 22, 2018

Should be fixed in version 1.0.0-beta2-18618-05. Please, reopen if you still see issues.

@tmat tmat closed this as completed Dec 22, 2018
@rvdginste
Copy link

rvdginste commented Feb 2, 2019

For me, version 1.0.0-beta2-18618-05 is not fixing anything. I am running Debian buster with some packages from sid.
In the end, I compiled my own binaries of https://github.com/libgit2/libgit2sharp.nativebinaries, and replaced the binary included in the nuget package in the linux-x64 folder with this new one, and then it's working.

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