Closed rhuijben closed 2 years ago
A suitable version of 7zip was not found (required v21.7.0).
Downloading portable 7zip v21.7.0...
Downloading 7zip...
https://www.7-zip.org/a/7z2107-extra.7z -> D:\a\SharpProj\SharpProj\vcpkg\downloads\7z2107-extra.7z
Extracting 7zip...
A suitable version of 7zip was not found (required v21.7.0). Downloading portable 7zip v21.7.0...
Extracting 7zip...
Error: vcpkg has crashed; no additional details are available.
The source line is D:\a\_work\1\s\src\vcpkg\archives.cpp(101)
- name: Setup VCPKG
uses: lukka/run-vcpkg@v10
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: 5a8a1dfff8e2dffd4c8cc2d1fc0da379ffd18b25
- name: Ensure Proj packages are available
run: vcpkg.exe install "tiff[core]:x64-windows-static-md" "proj[core,tiff]:x64-windows-static-md" "tiff[core]:x86-windows-static-md" "proj[core,tiff]:x86-windows-static-md"
@rhuijben this is a vcpkg issue, that you need to work around. Remember that run-vcpkg
caches vcpkg.exe
and all its built packages, so if you are continuously hitting that "broken" cached vcpkg.exe, this problem will not go away. What you need to do is to force to use a new cache key, so that the cached vcpkg.exe
is not going to be used anymore.
To invalidate the cache you can:
run-vcpkg@v10
, and the newest released version on v10
branch (i.e. tag v10.2
) is using a different key computation algo.vcpkg.json
content, or change the vcpkg Git commit id you use.appendedCacheKey
input.I already invalidated the cache a few times, but I first need a new vcpkg :-(
@lukka It appears that an older version of VCPKG.exe is earlier on the path than the one installed by run-vcpkg after running this task on the windows-latest
/ windows-2022
buildbots.
This breaks my invocations after this job
@rhuijben right, just prefix the path to the exe with the VCPKG_ROOT environment variable which has been set by the previous instance of run-vcpkg.
I already did this on my job now... I'm still trying to find where I get the other version from. Looking at the output it downloads a new version as part of the bootstrap, but then doesn't use it.. But 'where vcpkg` doesn't provide a path that is used.
@rhuijben it is already installed on the runner environment: https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md#package-management
@rhuijben note that the documentation states that vcpkg
is preinstalled in c:\vcpkg
on the GitHub runners.
If you look to the PATH
environment variable during a workflow run, you'll see that c:\vcpkg
is included indeed.
You may have used where vcpkg
, but when using powershell
or pwsh
you need to run where.exe vpkg
to get what you want.
@rhuijben if this is still an outstanding problem let me know, we can reopen the issue. If you could also report what was the fix or the workaround, let us know!
@lukka This was a very bad $PATH issue on GitHub... Sorry I should have closed this issue earlier.
This script properly downloaded the new vcpkg+scripts, but then executed the old .exe with the new scripts... which broke things badly.
@lukka This was a very bad $PATH issue on GitHub... Sorry I should have closed this issue earlier.
This script properly downloaded the new vcpkg+scripts, but then executed the old .exe with the new scripts... which broke things badly.
Workaround for me:
env:
vcpkgExe: '${{ github.workspace }}/vcpkg/vcpkg.exe'
jobs:
build:
- name: Ensure Proj packages are available
run: ${{env.vcpkgExe}} install "tiff[core]:x64-windows-static-md" "proj[core,tiff]:x64-windows-static-md" "tiff[core]:x86-windows-static-md" "proj[core,tiff]:x86-windows-static-md" "tiff[core]:arm64-windows-static-md" "proj[core,tiff]:arm64-windows-static-md"
Also opening an issue here, as it appears this action is now broken against current vcpkg master on
windows-latest
andwindows-2019
.vcpkg tries to extract 7zip, using 7zip as it somehow can't find
tar.exe
inwindows\system32
.I'm looking for some temporary workaround, and some help escallating this issue with the Microsoft vcpkg project as it is slowing development on projects relying on vcpkg builds that need updates of their dependencies.
See https://github.com/microsoft/vcpkg/issues/23448