Skip to content

dotcore issue #1484

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
Jimmy062006 opened this issue Aug 15, 2017 · 17 comments
Closed

dotcore issue #1484

Jimmy062006 opened this issue Aug 15, 2017 · 17 comments

Comments

@Jimmy062006
Copy link

Things work fine in Windows but the moment I use linux it fail with this stack trace.

15/08/2017 22:46:21 [   Error] [Modules]: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
   at LibGit2Sharp.Core.NativeMethods.git_repository_open(git_repository*& repository, FilePath path)
   at LibGit2Sharp.Core.Proxy.git_repository_open(String path)
   at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter)
   at Opux.Functions.<About>d__11.MoveNext() in /home/opux/opuxpub/src/Opux/Functions.cs:line 274
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Opux.Info.<About>d__7.MoveNext() in /home/opux/opuxpub/src/Opux/Modules.cs:line 141

This was the same error I got in windows when the path was incorrect but it is actually correct now on both systems. Thanks

Jimmy062006 added a commit to Jimmy062006/Opux that referenced this issue Aug 15, 2017
@ethomson
Copy link
Member

Are you sure you're loading the native library correctly? What does strace show?

@Jimmy062006
Copy link
Author

Yeah it works on windows the exact same code on Linux fails.

@ethomson
Copy link
Member

This error occurs when the native library cannot be loaded.

strace will show you where it's looking and whether or not it succeeds in finding it.

@Jimmy062006
Copy link
Author

Yeah I'm just setting up a test environment for the strace

@Jimmy062006
Copy link
Author

I assume I just start my app threw strace. If that's so then that is the only thing returned when stracing it.

@bording
Copy link
Member

bording commented Aug 29, 2017

@Jimmy062006 Which linux distro are you using?

@Jimmy062006
Copy link
Author

CentOS 7

@bording
Copy link
Member

bording commented Aug 29, 2017

@Jimmy062006 That's the problem then. The native linux binary that is included in the latest native binaries package is built on unbuntu, so it won't work on CentOS 7.

The work being done in libgit2/libgit2sharp.nativebinaries#51 is set to address that, but it's not been finished yet.

@cmendible
Copy link

cmendible commented Jan 28, 2018

Hi @bording, does the same occur with Debian distros such as the microsoft/dotnet docker image?

@bording
Copy link
Member

bording commented Jan 29, 2018

@cmendible The primary dependency that matters is the version of libssl available. The binary we currently ship is built against libssl.so.1.0.0, so that version needs to be available.

I haven't tried the microsoft/dotnet images, so I'm not sure if a version is installed, or what version might be available to include.

I'll try them and out see what I can learn.

@cmendible
Copy link

@bording ok so I checked with a quick: find -name "libssl*" which returns:

./usr/lib/x86_64-linux-gnu/libssl.so.1.0.2
./usr/lib/x86_64-linux-gnu/libssl.so.1.1

So the required version is not available in the microsoft/dotnet docker image.

@bording
Copy link
Member

bording commented Jan 29, 2018

@cmendible It would be worth checking to see if a 1.0.0 package is available to be installed. If it is, you could add a line in your dockerfile to install it.

Which version of the image did you try? Based on the versions you're seeing, I suspect it is the 9.0/stretch image.

It would also be worth checking the 8.0/jessie versions of the image to see what versions are in it by default.

@cmendible
Copy link

@bording image tag 2.0.5-runtime-jessie did the trick! Thanks!!!

@llehn
Copy link

llehn commented Apr 1, 2018

Thats quite unfortunate that libgit2sharp is not compatible with the latest tag of microsoft/dotnet images. It took me hours to diagnose why my builds were crashing. IMHO it would be better to make it work for microsoft/dotnet:latest

@bording
Copy link
Member

bording commented Apr 1, 2018

Thats quite unfortunate that libgit2sharp is not compatible with the latest tag of microsoft/dotnet images. It took me hours to diagnose why my builds were crashing. IMHO it would be better to make it work for microsoft/dotnet:latest

That's the plan. At this point I'm just waiting for a 2.0.x patch release of .NET Core to be able to support every distro that .NET Core runs on. Once the changes I made ship, then I can finish up libgit2/libgit2sharp.nativebinaries#51

@DanielVukelich
Copy link

Has there been any progress on this issue? .NET Core is now at 2.2

@bording
Copy link
Member

bording commented Jun 13, 2019

Yes, the latest versions of the package support a lot more distros now, so I'm going to close this as done.

@bording bording closed this as completed Jun 13, 2019
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

6 participants