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

[Bug] Unable to run on Centos 7 missing git2-106a5f2 #2204

Closed
N0K0 opened this issue Mar 25, 2020 · 14 comments
Closed

[Bug] Unable to run on Centos 7 missing git2-106a5f2 #2204

N0K0 opened this issue Mar 25, 2020 · 14 comments
Labels
Milestone

Comments

@N0K0
Copy link

N0K0 commented Mar 25, 2020

Describe the bug
When running gitversion on my centos 7 server i get the following trace:

[root@osl-bamboo1 ~]# /home/nikolas/gitversion_test_1 git/ INFO [03/25/20 19:25:24:25] Working directory: git/INFO [03/25/20 19:25:24:26] IsDynamicGitRepository: FalseERROR [03/25/20 19:25:24:27] An unexpected error occurred: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'git2-106a5f2' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-106a5f2: cannot open shared object file: No such file or directory 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_dispose(GitBuf buf) at LibGit2Sharp.Core.Proxy.git_buf_dispose(GitBuf buf) at LibGit2Sharp.Core.Handles.GitBuf.Dispose() at LibGit2Sharp.Core.Proxy.ConvertPath(Func2 pathRetriever)
at LibGit2Sharp.Core.Proxy.git_repository_discover(FilePath start_path)
at LibGit2Sharp.Repository.Discover(String startingPath)
at GitVersion.GitPreparer.GetProjectRootDirectoryInternal()
at GitVersion.GitPreparer.GetProjectRootDirectory()
at GitVersion.Configuration.ConfigFileLocator.Verify(IGitPreparer gitPreparer)
at GitVersion.GitVersionExecutor.VerifyConfiguration()
at GitVersion.GitVersionExecutor.VerifyArgumentsAndRun(Arguments arguments)INFO [03/25/20 19:25:24:27] INFO [03/25/20 19:25:24:27] Attempting to show the current git graph (please include in issue): INFO [03/25/20 19:25:24:27] Showing max of 100 commits
`

Steps to Reproduce

Create an repo with only one commit and run the rool

Context

Unable to use this tool to generate SemVer on my build server.

Your Environment

CentOS Linux release 7.7.1908
3.10.0-1062.4.3.el7.x86_64 #1 SMP Wed Nov 13 23:58:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

git version 2.9.3
git version 2.18.2

Issue reproduced in the following versions:
linux-5.1.1
linux-5.1.3
linux-5.2.4

Works like a charm on macOS 👍

@N0K0 N0K0 added the bug label Mar 25, 2020
@arturcic
Copy link
Member

What package are you using on centos? The global tool? Tar.gz?

@N0K0
Copy link
Author

N0K0 commented Mar 25, 2020

Thanks for quick feedback,
Been using the Tar.gz files from the release page.

If there is any other packages i would happily try them :)

@arturcic
Copy link
Member

arturcic commented Mar 25, 2020

I noticed that as well, I'll have to check. For now if you are ok you can use the global tool https://www.nuget.org/packages/GitVersion.Tool/ but you will need the dotnet core version 3.1 installed

@N0K0
Copy link
Author

N0K0 commented Mar 26, 2020

Will give it an try! Just have to setup some infrastructure to deal with MS RPMs and make dotnet tool work behind my security controls.

(Its currenclty hanging at "Restoring packages for .NETCoreApp,Version=v3.1... (TaskId:33)" )

@kopeckyales
Copy link

I have same problem on debian 9 in docker. I have to downgrade to version 5.0.1 to make it work.

@atrauzzi
Copy link

atrauzzi commented Apr 8, 2020

Hmm, running on Ubuntu 19.10 and .net Core 3.1. Used dotnet tool install --global GitVersion.Tool but can't seem to find a version that works.

@arturcic
Copy link
Member

arturcic commented Apr 8, 2020

Ubuntu 19.10 is not supported by LibGit2Sharp, the one we use, so sorry, it's an issue for LibGit2Sharp

@atrauzzi
Copy link

atrauzzi commented Apr 8, 2020

Gotcha, thank you. Would you happen to know of or be able to suggest any path forward?

@arturcic
Copy link
Member

arturcic commented Apr 8, 2020

Ubuntu 18.04 is supported, that one option, second option is to use the docker image that has gitversion embedded https://hub.docker.com/r/gittools/gitversion

@atrauzzi
Copy link

atrauzzi commented Apr 8, 2020

kk, thanks!

Do you know if they're planning on resolving this for 20.04? Anywhere I can pick up the thread with them?

@arturcic
Copy link
Member

arturcic commented Apr 8, 2020

Check this one libgit2/libgit2sharp#1725

@arturcic
Copy link
Member

We're publishing distribution specific tar.gz starting 12278d0. Will be published with version 5.3.0

@github-actions
Copy link

github-actions bot commented May 4, 2020

🎉 This issue has been resolved in version 5.3.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

@atrauzzi
Copy link

atrauzzi commented May 4, 2020

Hooray!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants