-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[vcpkg_from_git] fetching explicit ref using old gits fails #14424
Comments
The correct sha1 should be: 6a8690fc8d26c815e798c588f796eabe9d684cf0 vcpkg/ports/bzip2/portfile.cmake Line 4 in 7fbbc59
|
Hi @abique Thanks for posting this issue. I can build bzip2 successfully on my machine.
So it should be not related with |
Why would I can't find the ref? |
@abique cc: @NancyLi1013
|
I did clone bzip2 and had a different sha1 for this commit. |
Here on my computer it works (I was on a build machine yesterday):
I don't understand why both sha1 works, yet I think 6a8690fc8d26c815e798c588f796eabe9d684cf0 is the correct one to use and older git client might not be able to checkout 75a94bea3918e612b879d6a11ca64b8689526147. |
I have git version 2.29.2 on my local machine. |
Also git log -p -n1 gives:
So I'd say that the sha1 used in vcpkg is definitely not the one given by git. |
@abique I also checked this here https://sourceware.org/git/?p=bzip2.git;a=commit;h=6a8690fc8d26c815e798c588f796eabe9d684cf0 @StarGate-One @Sibras I tried to search this commit in https://sourceware.org/git/bzip2.git. But I found nothing about this. |
You're welcome. |
It looks like the tag for bzip2 v1.0.8 https://sourceware.org/git/?p=bzip2.git;a=tag;h=75a94bea3918e612b879d6a11ca64b8689526147 pointing to commit https://sourceware.org/git/?p=bzip2.git;a=commit;h=6a8690fc8d26c815e798c588f796eabe9d684cf0 |
So that would be the hash of the tag, and older git client would not be able to resolve it? |
|
@StarGate-One Now we can confirm that the
It seems that this is related with git version. @abique |
The buildbot used: git version 2.7.4 |
The build server is using Ubuntu 16.04.3 LTS, and there is no newer git available from the package manager. |
This is strange I did the clone of the git repository manually and I could checkout the tag reference. |
This command fails and is repoduceable: |
This one also fails: |
@abique cc: @NancyLi1013
|
I can see a few solutions to this issue:
What do you think? |
@abique cc: @NancyLi1013 @JackBoosY @BillyONeal @strega-nil @Neumann-A @voskrese @vicroms @ras0219-msft
|
I think that the solution to this is to stop using the ref of the tag, and just use the commit ref (which should work...) |
See #14424 (comment) using the commit ref does not always work. |
Hmm does vcpkg not automatically get portable git from somewhere? I thought it would do that. Maybe just insert a version check and see if the system version is higher than the one within vcpkg? If not just use the version within vcpkg. (Just like Ninja/Meson etc.) |
At this time git is one of our prerequisites; we assume the user's git works because that's how they got our repo in the first place, and I don't think we've had issues of this kind before. |
@abique we should not be fetching one commit (do we?); git servers hate that. |
To summarize:
|
I succeeded!!! sudo add-apt-repository ppa:git-core/ppa ubuntu16.04: vcpkg-2020.11 |
what's your git version? |
change vcpkg_from_git =>vcpkg_from_github May useful
|
I'm using Ubuntu 16.04 |
We haven't been able to repro this; if more information comes up, or this issue appears again, please reopen. |
Host Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install bzip2
Failure logs
error: no such remote ref 75a94bea3918e612b879d6a11ca64b8689526147
The text was updated successfully, but these errors were encountered: