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

"A suitable version of git was not found..." (after merge of: [vcpkg] add env var VCPKG_OVERLAY_TRIPLETS) #13790

Closed
sschnug opened this issue Sep 28, 2020 · 8 comments
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@sschnug
Copy link

sschnug commented Sep 28, 2020

A suitable version of git was not found (required v2.7.4) and unable to automatically download a portable one. Please install a newer version of git.

Originally posted by @JackBoosY in #12790 (comment)

This is happening in my CI/CD pipeline now (which was brave enough to track vcpkg/master) and vanishes if i go one commit back towards 8776756 (before the mentioned merge).

(Somehow i wasn't even able to circumvent this by using RUN export VCPKG_FORCE_SYSTEM_BINARIES=1)

For me, this is triggered by a Dockerfile looking like:

FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt-get install -y \
    build-essential autoconf git libtool pkg-config cmake doxygen ninja-build curl zip unzip tar \
    python3 python3-dev python3-pip python3-numpy \
    && apt-get clean

RUN pip3 install sphinx sphinx_rtd_theme breathe pytest grpcio protobuf psutil

WORKDIR /WORKING

RUN export VCPKG_BUILD_TYPE=release

RUN git clone https://github.com/microsoft/vcpkg \
    && ./vcpkg/bootstrap-vcpkg.sh \
    && ./vcpkg/vcpkg integrate install \
    && ./vcpkg/vcpkg install abseil \
    && ./vcpkg/vcpkg install protobuf \
    && ./vcpkg/vcpkg install grpc \
    && ./vcpkg/vcpkg install glog \
    && ./vcpkg/vcpkg install gtest \
    && ./vcpkg/vcpkg install benchmark \
    && ./vcpkg/vcpkg install liblemon
    ....
@coryan
Copy link
Contributor

coryan commented Sep 28, 2020

Seems like removing this line:

https://github.com/microsoft/vcpkg/pull/12790/files#diff-6881438d3612c1d09d825d25d2d08f33L1181

changed vcpkg to always search for tools using extensions (.exe, .cmd, .bat) which is not the right thing on Unices.

@yay
Copy link

yay commented Sep 28, 2020

Can confirm:

$ vcpkg x-history glm   
A suitable version of git was not found (required v2.7.4) and unable to automatically download a portable one. Please install a newer version of git.
$ git version
git version 2.28.0

@paspro
Copy link

paspro commented Sep 28, 2020

I confirm this problem when trying to install any package on Ubuntu 20.04

Detecting compiler hash for triplet x64-linux... A suitable version of git was not found (required v2.7.4) and unable to automatically download a portable one. Please install a newer version of git.

Neumann-A added a commit to Neumann-A/vcpkg that referenced this issue Sep 28, 2020
strega-nil pushed a commit that referenced this issue Sep 28, 2020
* [vcpkg] fix ci #13790

* add extra space

* needs ""
@Neumann-A
Copy link
Contributor

Thx for finding the oversight. Somehow nobody saw it before although it was so trivial.

@JackBoosY
Copy link
Contributor

Closed this issue via #13790 merged.

@JackBoosY JackBoosY added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Sep 29, 2020
@Beafantles
Copy link
Contributor

I still have this problem, even after using git pull.

$ git pull && git --version && ./vcpkg install tiff
Already up to date.
git version 2.28.0
Computing installation plan...
The following packages will be built and installed:
    tiff[core]:x64-linux
Detecting compiler hash for triplet x64-linux...
A suitable version of git was not found (required v2.7.4) and unable to automatically download a portable one. Please install a newer version of git.

@Neumann-A
Copy link
Contributor

you need to rebootstrap vcpkg after git pull.

@Beafantles
Copy link
Contributor

Oh indeed, it worked! Thank you, I didn't know about that :)

strega-nil pushed a commit to strega-nil/vcpkg that referenced this issue May 5, 2021
* [vcpkg] fix ci microsoft#13790

* add extra space

* needs ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

No branches or pull requests

7 participants