-
Notifications
You must be signed in to change notification settings - Fork 899
Cannot find native library. #786
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
Comments
The binaries included in the NuGet package are Windows only ones. In order to make this work on Linux/MacOSX, you'll have to build libgit2 by yourself and include the path to the compiled binary in See the build.libgit2sharp.sh script that's being used by Travis to build and run tests on Linux/MacOSX for more gory details. |
Maybe this will be helpful... https://github.com/mono/libgit-binary which is used here: https://github.com/mono/monodevelop/tree/libgit2ftw to make quick test |
I was able to build libgit2 then when attempting to build libgit2sharp I am given: Is there a directory I need to create before compilation? @DavidKarlas, thanks I'll look into that! Edit: So I found out that the invalid path expands (via some csproj magic) to: |
@phrohdoh Every required directory should be automatically created.
The error seems to occur while copying those native dependencies (
|
Sorry for the late response, and thank you for the help so far. A fresh clone would not have libgit2 to work with. This is a fresh libgit2sharp with a built libgit2. |
Actually the full request was "What's the output when performing a fresh clone, then launching Could you perform the whole task (fresh clone + launch the shell script) and share with us the result? |
Oh, right, sorry about that misunderstanding! |
Thanks for that. In the log we can see "/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/Microsoft.Common.targets" @Therzok pointed this out in #733. Two options :
|
TL;DR this output, git2-091165c.dll cannot be found (but it does exist). |
I'm meeting the same prob |
@phrohdoh it's not looking for the .dll, but the actual compiled library through the shell script. |
Still no resolution after fresh cloning and updating libgit2sharp + mono. |
/cc @carlosmn |
The DYLD_LIBRARY_PATH isn't set for finding the native binaries. That means it will never resolve them. It doesn't matter if they're in the same directory or in a different directory. DYLD_LIBRARY_PATH must specify the location of the native libraries. Also, it's not requesting the .dlls. It's requesting libraries which it can map. |
Building libgit2sharp does not result in anything other than new .dlls; there is nothing to map. Is there an obvious step I am overthinking? |
Building libgit2sharp does result in files /libgit2/build. |
Wow, thank you so much! I don't know how I never saw those dylibs. It is partially working now, though I am getting some conflicting reports; in general libgit2sharp is working now. Sorry for the trouble and again thank you for the help! |
It's not your fault. It's all hidden in the testing script for LibGit2Sharp. We need to make the Unix experience slightly more delightful. |
Agreed. Logged in #837 |
No matter where I put the native library libgit2sharp refuses to fine it.
The tiny project can be found here.
$ mono --debug GitSharp.exe out https://github.com/Phrohdoh/libdrs
crashes with
I've included binaries in that repo in hopes of resolving this easier.
Sorry if this is too long / unhelpful issue.
The text was updated successfully, but these errors were encountered: