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

"How to build your own native binaries" instructions are not working as it is #78

Closed
pmunshi007 opened this issue Nov 1, 2018 · 7 comments

Comments

@pmunshi007
Copy link

I am trying to build binaries in my CentOS docker container after cloning the repository as I am facing multiple errors as below and not able to build my container.

/root/.nuget/packages/nerdbank.gitversioning/2.2.13/build/Nerdbank.GitVersioning.targets(63,5): error MSB4018: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL '/root/.nuget/packages/nerdbank.gitversioning/2.2.13/build/lib/linux/x86_64/libgit2-6311e88.so':

I realize this library is not compatible with CentOS from libgit2/libgit2sharp#1391 issue and to solve the issue I need to build .so file from the source code which I am trying to do and currently I am following the instruction provided in the README.md file and it is throwing errors. for some dependencies I am solving the dependencies one after another but document should help to resolve the issues with pre-requisite section for software needs to be installed and environmental variables needs to be set.
While running the build script I am receiving below errors currently.

CMake Error: The source directory "/tmp/libgit2sharp.nativebinaries/libgit2" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Error: could not load cache
/tmp/libgit2sharp.nativebinaries
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
RID not defined. Falling back to 'unix-x64'.
cp: cannot stat 'libgit2/build/libgit2-8e0b172.so': No such file or directory
@pmunshi007 pmunshi007 changed the title "How to build your own native binaries" instructions are not working as it should "How to build your own native binaries" instructions are not working as it is Nov 1, 2018
@ethomson
Copy link
Member

ethomson commented Nov 1, 2018 via email

@bording
Copy link
Member

bording commented Nov 1, 2018

@pmunshi007 That issue does not reflect the current state of things. If you use the 0.26.0 preview versions of LibGit2Sharp, it should work with CentOS.

@pmunshi007
Copy link
Author

pmunshi007 commented Nov 1, 2018

@ethomson I did not do git submodule init and update. I though I am cloning the repo so I may not need to do those steps. Those steps need to perform in case of repo already exist in the system. Let me add these 2 steps. The above error is removed but I am still getting multiple errors with CMake file
@bording I am using Nerdbank.GitVersioning version 2.2.13 and while building image on CentOS with this package reference I am receiving this LibGit2Sharp error. I will still try to specify this version of LibGit2Sharp but I think the Nerdbank.GitVersioning version 2.2.13 is using this library internally I cannot change the version.
Correct me if I am going in wrong directions. This issue is going on since last 2 days and I am not able to find any suitable solution yet.

@bording
Copy link
Member

bording commented Nov 1, 2018

@pmunshi007 If you're not using LibGit2Sharp directly, then building your own copy of libgit2 using this repo isn't going to help you.

You'll need to file an issue with Nerdbank.GitVersioning to get the version of LibGit2Sharp used by it updated.

@pmunshi007
Copy link
Author

@bording Thank you so much for your prompt reply. I really appreciate it. You saved my efforts processing and trying for solution in wrong direction.

@ekwus
Copy link

ekwus commented Nov 9, 2018

Hey

I have an issue on the microsoft/dotnet:2.1 docker container where LibGit2Sharp is using libssl.so.1.0.0 but it is missing due to it being deprecated and unsafe. Once I add the file from an old .deb file the error goes away.

In the past I tried to soft link it to the installed version but the only thing that works is adding the actual file.

My use case is via GitVersioning and I'm now testing with their fix228 pulled in which uses 0.26.0-preview-0054.

Cheers

Dave

@bording
Copy link
Member

bording commented Nov 9, 2018

@ekwus See my comment on your other post about this: dotnet/Nerdbank.GitVersioning#228 (comment)

@bording bording closed this as completed Aug 12, 2021
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

4 participants