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

GitVersion is not working on CentOS 7 #1125

Closed
omallo opened this issue Jan 1, 2017 · 7 comments
Closed

GitVersion is not working on CentOS 7 #1125

omallo opened this issue Jan 1, 2017 · 7 comments

Comments

@omallo
Copy link

omallo commented Jan 1, 2017

I would like to use GitVersion inside the OpenShift Jenkins 2 Docker image which is based on CentOS 7. Unfortunately, I'm getting the following error:

System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: lib/linux/x86_64/libgit2-baa87df.so
  at (wrapper managed-to-native) LibGit2Sharp.Core.NativeMethods:git_libgit2_init ()
  at LibGit2Sharp.Core.NativeMethods+LibraryLifetimeObject..ctor () [0x00006] in <1a5aafd5a5444cd6a1420741ccbb6f8a>:0 
  at LibGit2Sharp.Core.NativeMethods..cctor () [0x00058] in <1a5aafd5a5444cd6a1420741ccbb6f8a>:0 
   --- End of inner exception stack trace ---
  at LibGit2Sharp.Core.NativeMethods+LibraryLifetimeObject.Finalize () [0x00000] in <1a5aafd5a5444cd6a1420741ccbb6f8a>:0

I do have libcurl installed but I guess the problem is that CentOS uses libcurl 4 and not 3.

I have created a standalone Docker image to reproduce the problem which you can execute as follows:

docker run omallo/git-version-centos7

The contents of the Dockerfile are the following:

FROM centos:centos7

RUN yum install -y yum-utils && \
    rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
    yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ && \
    yum -y install libcurl && \
    yum -y install mono-complete && \
    yum clean all && \
    curl -L -o /tmp/GitVersion_3.6.5.zip https://github.com/GitTools/GitVersion/releases/download/v3.6.5/GitVersion_3.6.5.zip && \
    unzip /tmp/GitVersion_3.6.5.zip -d /usr/local/GitVersion_3.6.5 && \
    rm -f /tmp/GitVersion_3.6.5.zip

ENTRYPOINT ["mono", "/usr/local/GitVersion_3.6.5/GitVersion.exe"]

Can you say whether the problem indeed is that CentOS uses version 4 of libcurl and, if so, is there any possibility to get GitVersion running with that version?

@JakeGinnivan
Copy link
Contributor

It is indeed CentOS and is a downstream issue..

See libgit2/libgit2sharp#1391

@omallo
Copy link
Author

omallo commented Jan 2, 2017

Thanks a lot for the quick reply and for the reference to the downstream issue.

For now, I've created an OpenShift Jenkins image based on Ubuntu on which GitVersion is working fine but I will give it another try with the original CentOS image once the downstream issue is fixed.

@JakeGinnivan
Copy link
Contributor

Unsure if anyone is working on the downstream issue is the only problem. If you are interested you could try and progress the issue (maybe get a CI build going for the native binaries or something?)

@ristaloff
Copy link

I just had a simililar issue using a docker image based on mono:latest which in turn is based on debian:wheezy.
I got the same System.TypeInitializationException as above, because I was missing GLIBC_2.14 and GLIBC_2.15. The the version of debian in the debian:wheezy image is Debian 7.11. Debian 7.11 only has GLIBC_2.13. I followed the instructions here to update glibc and fix the problem: http://stackoverflow.com/questions/10863613/how-to-upgrade-glibc-from-version-2-13-to-2-15-on-debian

@asbjornu
Copy link
Member

@omallo: Can you please attempt to do what @ristaloff's describes and see if it fixes your problem?

@mr-exz
Copy link
Contributor

mr-exz commented Jan 19, 2019

Solution for CentOS you can see here in #1571

@asbjornu
Copy link
Member

Closing as this due to inactivity and because it should be proven to work in #1571.

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