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

vcpkg install quits immediately after printing Computing installation plan... #18718

Closed
wangqr opened this issue Jun 29, 2021 · 16 comments
Closed
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@wangqr
Copy link
Contributor

wangqr commented Jun 29, 2021

Describe the bug
vcpkg install quits immediately after printing Computing installation plan.... No package is actually built or installed.
It does create 2 empty folders, installed\vcpkg\info and installed\vcpkg\updates.

Environment

  • OS: Windows 10.0.19043.1081
  • Compiler: Visual Studio 2019

To Reproduce
Steps to reproduce the behavior:

  1. Run .\vcpkg.exe install <any package>
  2. vcpkg prints Computing installation plan... and quit
PS C:\> git clone https://github.com/microsoft/vcpkg.git
Cloning into 'vcpkg'...
remote: Enumerating objects: 113520, done.
remote: Counting objects: 100% (201/201), done.
remote: Compressing objects: 100% (117/117), done.
remote: Total 113520 (delta 105), reused 149 (delta 84), pack-reused 113319
Receiving objects: 100% (113520/113520), 34.94 MiB | 1.46 MiB/s, done.
Resolving deltas: 100% (71679/71679), done.
Updating files: 100% (7804/7804), done.
PS C:\> cd vcpkg
PS C:\vcpkg>.\bootstrap-vcpkg.bat -disableMetrics
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2021-06-19/vcpkg.exe -> C:\vcpkg\vcpkg.exe
Done.

PS C:\vcpkg> .\vcpkg.exe install icu --triplet=x64-windows
Computing installation plan...
PS C:\vcpkg> .\vcpkg.exe update
Using local portfile versions. To update the local portfiles, use `git pull`.
No packages need updating.
PS C:\vcpkg> .\vcpkg.exe install icu --triplet=x64-windows
Computing installation plan...
PS C:\vcpkg> .\vcpkg.exe install icu
Computing installation plan...
PS C:\vcpkg> .\vcpkg.exe install boost
Computing installation plan...
PS C:\vcpkg> .\vcpkg.exe install --dry-run icu
Computing installation plan...
PS C:\vcpkg>

Expected behavior
vcpkg actually installs the package

Failure logs
I'm not sure how to get failure log. There is no newly created file after running vcpkg install in vcpkg's directory.

@strega-nil-ms
Copy link
Contributor

@wangqr could you try running .\vcpkg install icu --debug?

@wangqr
Copy link
Contributor Author

wangqr commented Jun 29, 2021

PS C:\vcpkg> .\vcpkg install icu --debug
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] BuiltinRegistry initialized with: ""
[DEBUG] Using vcpkg-root: C:\vcpkg
[DEBUG] Using installed-root: C:\vcpkg\installed
[DEBUG] BuiltinRegistry initialized with: ""
[DEBUG] Using buildtrees-root: C:\vcpkg\buildtrees
[DEBUG] Using downloads-root: C:\vcpkg\downloads
[DEBUG] Using packages-root: C:\vcpkg\packages
[DEBUG] Using scripts-root: C:\vcpkg\scripts
[DEBUG] Using ports-root: C:\vcpkg\ports
[DEBUG] Using versions-root: C:\vcpkg\versions
[DEBUG] Default binary cache path is: C:\Users\wangqr\AppData\Local\vcpkg\archives
Computing installation plan...
[DEBUG] CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" --version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after    23367 us
[DEBUG] CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" -DVCPKG_ROOT_DIR=C:/vcpkg -DPACKAGES_DIR=C:/vcpkg/packages -DBUILDTREES_DIR=C:/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/vcpkg/installed -DDOWNLOADS=C:/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "C:\vcpkg\buildtrees\0.vcpkg_tags.cmake")
[DEBUG] cmd_execute_and_stream_data() returned 0 after    24837 us

@wangqr
Copy link
Contributor Author

wangqr commented Jun 29, 2021

Here's the output if I run the last 2 commands directly:

PS C:\vcpkg> & "C:\Program Files\CMake\bin\cmake.exe" --version
cmake version 3.21.0-rc1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
PS C:\vcpkg> & "C:\Program Files\CMake\bin\cmake.exe" -DVCPKG_ROOT_DIR=C:/vcpkg -DPACKAGES_DIR=C:/vcpkg/packages -DBUILDTREES_DIR=C:/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/vcpkg/installed -DDOWNLOADS=C:/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "C:\vcpkg\buildtrees\0.vcpkg_tags.cmake"
d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af
c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_TARGET_ARCHITECTURE=x64
VCPKG_CMAKE_SYSTEM_NAME=
VCPKG_CMAKE_SYSTEM_VERSION=
VCPKG_PLATFORM_TOOLSET=
VCPKG_VISUAL_STUDIO_PATH=
VCPKG_CHAINLOAD_TOOLCHAIN_FILE=
VCPKG_BUILD_TYPE=
VCPKG_LIBRARY_LINKAGE=dynamic
VCPKG_CRT_LINKAGE=dynamic
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f
c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_PUBLIC_ABI_OVERRIDE=
VCPKG_ENV_PASSTHROUGH=
VCPKG_ENV_PASSTHROUGH_UNTRACKED=
VCPKG_LOAD_VCVARS_ENV=
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f
8c504940-be29-4cba-9f8f-6cd83e9d87b7
d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af
c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_TARGET_ARCHITECTURE=x86
VCPKG_CMAKE_SYSTEM_NAME=
VCPKG_CMAKE_SYSTEM_VERSION=
VCPKG_PLATFORM_TOOLSET=
VCPKG_VISUAL_STUDIO_PATH=
VCPKG_CHAINLOAD_TOOLCHAIN_FILE=
VCPKG_BUILD_TYPE=
VCPKG_LIBRARY_LINKAGE=dynamic
VCPKG_CRT_LINKAGE=dynamic
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f
c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_PUBLIC_ABI_OVERRIDE=
VCPKG_ENV_PASSTHROUGH=
VCPKG_ENV_PASSTHROUGH_UNTRACKED=
VCPKG_LOAD_VCVARS_ENV=
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f
8c504940-be29-4cba-9f8f-6cd83e9d87b7

Uninstalling CMake can resolve this issue.

@dg0yt
Copy link
Contributor

dg0yt commented Jun 29, 2021

An issue with CMake 3.21.0-rc1, cf. #18636.

@sidd-kishan
Copy link

Same issues with libusb and libusb-win32 :-

`Microsoft Windows [Version 10.0.17134.1304]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\system32>vcpkg install libusb --debug
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] BuiltinRegistry initialized with: ""
[DEBUG] Using vcpkg-root: C:\Program Files (Arm)\vcpkg
[DEBUG] Using installed-root: C:\Program Files (Arm)\vcpkg\installed
[DEBUG] BuiltinRegistry initialized with: ""
[DEBUG] Using buildtrees-root: C:\Program Files (Arm)\vcpkg\buildtrees
[DEBUG] Using downloads-root: C:\Program Files (Arm)\vcpkg\downloads
[DEBUG] Using packages-root: C:\Program Files (Arm)\vcpkg\packages
[DEBUG] Using scripts-root: C:\Program Files (Arm)\vcpkg\scripts
[DEBUG] Using ports-root: C:\Program Files (Arm)\vcpkg\ports
[DEBUG] Using versions-root: C:\Program Files (Arm)\vcpkg\versions
[DEBUG] Default binary cache path is: C:\Users\Marcin\AppData\Local\vcpkg\archives
Computing installation plan...
[DEBUG] Found path: C:\Program Files (x86)\CMake\bin\cmake.exe
[DEBUG] CreateProcessW("C:\Program Files (x86)\CMake\bin\cmake.exe" --version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 2346723 us
[DEBUG] CreateProcessW("C:\Program Files (x86)\CMake\bin\cmake.exe" "-DVCPKG_ROOT_DIR=C:/Program Files (Arm)/vcpkg" "-DPACKAGES_DIR=C:/Program Files (Arm)/vcpkg/packages" "-DBUILDTREES_DIR=C:/Program Files (Arm)/vcpkg/buildtrees" "-D_VCPKG_INSTALLED_DIR=C:/Program Files (Arm)/vcpkg/installed" "-DDOWNLOADS=C:/Program Files (Arm)/vcpkg/downloads" -DVCPKG_MANIFEST_INSTALL=OFF -P "C:\Program Files (Arm)\vcpkg\buildtrees\0.vcpkg_tags.cmake")
[DEBUG] cmd_execute_and_stream_data() returned 0 after 1919234 us

C:\Windows\system32>cmake --version
cmake version 3.21.0-rc1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

C:\Windows\system32>
C:\Windows\system32>"C:\Program Files (x86)\CMake\bin\cmake.exe" "-DVCPKG_ROOT_DIR=C:/Program Files (Arm)/vcpkg" "-DPACKAGES_DIR=C:/Program Files (Arm)/vcpkg/packages" "-DBUILDTREES_DIR=C:/Program Files (Arm)/vcpkg/buildtrees" "-D_VCPKG_INSTALLED_DIR=C:/Program Files (Arm)/vcpkg/installed" "-DDOWNLOADS=C:/Program Files (Arm)/vcpkg/downloads" -DVCPKG_MANIFEST_INSTALL=OFF -P "C:\Program Files (Arm)\vcpkg\buildtrees\0.vcpkg_tags.cmake"
d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af
c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_TARGET_ARCHITECTURE=x86
VCPKG_CMAKE_SYSTEM_NAME=
VCPKG_CMAKE_SYSTEM_VERSION=
VCPKG_PLATFORM_TOOLSET=
VCPKG_VISUAL_STUDIO_PATH=
VCPKG_CHAINLOAD_TOOLCHAIN_FILE=
VCPKG_BUILD_TYPE=
VCPKG_LIBRARY_LINKAGE=dynamic
VCPKG_CRT_LINKAGE=dynamic
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f
c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_PUBLIC_ABI_OVERRIDE=
VCPKG_ENV_PASSTHROUGH=
VCPKG_ENV_PASSTHROUGH_UNTRACKED=
VCPKG_LOAD_VCVARS_ENV=
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f
8c504940-be29-4cba-9f8f-6cd83e9d87b7

C:\Windows\system32>`

@dg0yt
Copy link
Contributor

dg0yt commented Jun 30, 2021

Same issues with libusb and libusb-win32 :-

And still the same version of cmake, which is only a release candidate.

C:\Windows\system32>cmake --version
cmake version 3.21.0-rc1

@sidd-kishan
Copy link

Raised an issue at https://gitlab.kitware.com/cmake/cmake/-/issues/22367 if Kitware may take notice we will have CMAKE Windows on ARM64 binaries. 🤞

@dg0yt
Copy link
Contributor

dg0yt commented Jun 30, 2021

The original post here is for x64-windows.

@JonLiu1993 JonLiu1993 added the requires:repro The issue is not currently repro-able label Jun 30, 2021
@JonLiu1993
Copy link
Member

An issue with CMake 3.21.0-rc1, cf. #18636.

@wangqr , @sidd-kishan .Duplicate of #18636

@tommyvct
Copy link

tommyvct commented Jul 1, 2021

Same issue here. I was trying the ARM64EC toolchain and I need vcpkg to work.

It's tedious that I need to reinstall an older version of cmake every time I need to use vcpkg.

I created an issue on Kitware's CMake repo: https://gitlab.kitware.com/cmake/cmake/-/issues/22371

@MatthewPowley
Copy link
Contributor

I have also seen this issue and traced it to a regression in CMake 3.21.0-rc1.
When running the command line similar to that show below:
"C:\Program Files\CMake\bin\cmake.exe" -DVCPKG_ROOT_DIR=C:/Git/vcpkg -DPACKAGES_DIR=C:/Git/vcpkg/packages -DBUILDTREES_DIR=C:/Git/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/Git/vcpkg/installed -DDOWNLOADS=C:/Git/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "C:\Git\vcpkg\buildtrees\0.vcpkg_dep_info.cmake"

You get what appears to be the same output from CMake 3.20.5 but in reality some of the lines are delimited with '\r\n' and others '\n'. This causes an issue when the returned lines are split on each '\n' and then the searching function fails to find the inserted UUIDs delimiting the output for parsing.

I will create a pull request with a fix and let the powers that be decide whether to try and ask Kitware to fix their regression or make VcPkg tolerant of line endings.

@wangqr
Copy link
Contributor Author

wangqr commented Jul 7, 2021

You get [...] some of the lines are delimited with '\r\n' and others '\n'.

Git bisect shows Kitware/CMake@0a0a0f8 introduced this the behavior, changing line breaks within a message from '\n' (old) to '\r\n' (new), and the auto-appended '\n' is not changed.

@MatthewPowley
Copy link
Contributor

I have created a pull request for the VcPkg tool here:
microsoft/vcpkg-tool#107

@tan-wei
Copy link

tan-wei commented Jul 17, 2021

Met the same issue when update CMake to 3.21.0

@strega-nil-ms
Copy link
Contributor

This should be fixed by #18983 ; can you try updating your git repository and re-bootstrap?

@orgads
Copy link

orgads commented Jul 21, 2021

Do you plan to publish a new release with this fix soon?

orgads added a commit to orgads/scummvm that referenced this issue Jul 21, 2021
Cache is improved, so vcpkg itself is not built every time.

Upgrade of vcpkg itself is required due to
microsoft/vcpkg#18718.
ccawley2011 pushed a commit to scummvm/scummvm that referenced this issue Jul 21, 2021
Cache is improved, so vcpkg itself is not built every time.

Upgrade of vcpkg itself is required due to
microsoft/vcpkg#18718.
mgerhardy added a commit to vengi-voxel/vengi that referenced this issue Jul 22, 2021
jerinphilip pushed a commit to jerinphilip/bergamot-translator that referenced this issue Jul 29, 2021
This could be the issue in bergamot-translator:

* microsoft/vcpkg#18718
jerinphilip pushed a commit to jerinphilip/bergamot-translator that referenced this issue Jul 29, 2021
A cmake change has caused vcpkg to fail without much error message,
which is causing windows workflow runs to fail. Details in the following
link:

* microsoft/vcpkg#18718

To fix, we're going with a version bump in vcpkg. Seeing that run-vcpkg
also seems to have gotten an update, updating run-vcpkg from 7.3 to 7.4
Playing with fire: vcpkg master commit
jerinphilip added a commit to browsermt/bergamot-translator that referenced this issue Jul 29, 2021
A cmake change has caused vcpkg to fail without much error message,
which is causing windows workflow runs to fail. Details in the following
link:

* microsoft/vcpkg#18718

To fix, we're going with a version bump in vcpkg. Seeing that run-vcpkg
also seems to have gotten an update, updating run-vcpkg from 7.3 to 7.4
Playing with fire: vcpkg master commit
taylorzhancher pushed a commit to taylorzhancher/scummvm that referenced this issue Aug 9, 2021
Cache is improved, so vcpkg itself is not built every time.

Upgrade of vcpkg itself is required due to
microsoft/vcpkg#18718.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

9 participants