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

Upgrade version of Git to work with SPM #258

Open
kneekey23 opened this issue Nov 17, 2021 · 6 comments
Open

Upgrade version of Git to work with SPM #258

kneekey23 opened this issue Nov 17, 2021 · 6 comments

Comments

@kneekey23
Copy link

The older version of git installed on CentOS does not work with the version SPM uses to checkout packages. Using this image results in the following error from Swift Package Manager:

> swift build -c release
Fetching https://github.com/apple/swift-collections
Fetched https://github.com/apple/swift-collections (0.99s)
Computing version for https://github.com/apple/swift-collections
/root/aws-crt-swift/.build/repositories/swift-collections-7977a4e0: error: Couldnt get the list of tags:
    Unknown option: -C
    usage: git [--version] [--help] [-c name=value]
               [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
               [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
               [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
               <command> [<args>]
Failed to run swift build -c release: Command exited with code 1:
Fetching https://github.com/apple/swift-collections
Fetched https://github.com/apple/swift-collections (0.99s)
Computing version for https://github.com/apple/swift-collections
/root/aws-crt-swift/.build/repositories/swift-collections-7977a4e0: error: Couldnt get the list of tags:
    Unknown option: -C
    usage: git [--version] [--help] [-c name=value]
               [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
               [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
               [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
               <command> [<args>]

If I update git version in my docker file that is coming from this one, it works.

@tomerd
Copy link
Contributor

tomerd commented Nov 18, 2021

cc @shahmishal @drexin

=> which version of CentOS is this?
=> how did you update git to make it work?

@kneekey23
Copy link
Author

Version 7 of CentOS
And this seems to work:

yum install -y make libcurl-devel
git clone https://github.com/git/git -bv2.33.1 --depth 1 && cd git
make prefix=/usr -j all install NO_OPENSSL=1 NO_EXPAT=1 NO_TCLTK=1 NO_GETTEXT=1 NO_PERL=1

@tomerd
Copy link
Contributor

tomerd commented Nov 18, 2021

@drexin wdyt?

@tomerd
Copy link
Contributor

tomerd commented Nov 18, 2021

@kneekey23 thanks do you need to use centos 7 or centos 8 is a option as well?

@kneekey23
Copy link
Author

Let me investigate that, good question @tomerd

@shahmishal
Copy link
Member

@kneekey23 Let us know if this is still an issue, otherwise we can close the issue. Thanks!

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

3 participants