Host Environment -
To reproduce
Follow the steps provided in https://github.com/Microsoft/vcpkg to install and integrate vcpkg in my system. Specifically I did the following on PowerShell (Admin mode)-
PS>git clone https://github.com/Microsoft/vcpkg.git
PS>cd vcpkg
PS> .\bootstrap-vcpkg.bat
PS> .\vcpkg integrate install
All this went without a hitch. However, when I try and install a library, it goes to the first build step and simply quits without any error.
Failure -
PS C:\Users\
Computing installation plan...
The following packages will be built and installed:
curl[core,non-http,ssl,sspi,winssl]:x86-windows
sdl2[core]:x86-windows
* zlib[core]:x86-windows
Additional packages () will be modified to complete this operation.
Starting package 1/3: zlib:x86-windows
Building package zlib[core]:x86-windows...
PS C:\Users\
Build quits, with no error message.
I tried doing the same build with --debug and I get this consistently, with any package I try and install (such as curl in the example, or boost etc.) -
Failure Logs
[DEBUG] CreateProcessW(cmd /c ""C:\VS2017\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 amd64_x86 2>&1
[DEBUG] cmd_execute_and_stream_data() returned 255 after 1623769 us
[DEBUG] c:\users\
[DEBUG] Exiting after 2050901 us (2040825 us)
Hi @AngmarLord
Thanks for posting this issue.
I noticed that there were no any downloading messages about the port on your console windows.
Could you please check your local environment?
The following info is my local:
PS F:\issueTest\vcpkg> .\vcpkg.exe install curl
Computing installation plan...
The following packages will be built and installed:
curl[core,non-http,ssl,sspi,winssl]:x86-windows
* zlib[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Starting package 1/2: zlib:x86-windows
Building package zlib[core]:x86-windows...
-- Downloading http://www.zlib.net/zlib-1.2.11.tar.gz...
-- Extracting source F:/issueTest/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Using source at F:/issueTest/vcpkg/buildtrees/zlib/src/1.2.11-deec42f53b
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: F:/issueTest/vcpkg/packages/zlib_x86-windows/share/zlib/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package zlib[core]:x86-windows... done
Installing package zlib[core]:x86-windows...
Installing package zlib[core]:x86-windows... done
Elapsed time for package zlib:x86-windows: 18.74 s
Starting package 2/2: curl:x86-windows
Building package curl[core,non-http,ssl,sspi,winssl]:x86-windows...
-- Downloading https://github.com/curl/curl/archive/curl-7_68_0.tar.gz...
-- Extracting source F:/issueTest/vcpkg/downloads/curl-curl-curl-7_68_0.tar.gz
-- Applying patch 0001_cmake.patch
-- Applying patch 0002_fix_uwp.patch
-- Applying patch 0003_fix_libraries.patch
-- Applying patch 0004_nghttp2_staticlib.patch
-- Applying patch 0005_remove_imp_suffix.patch
-- Applying patch 0006_fix_tool_depends.patch
-- Applying patch 0007_disable_tool_export_curl_target.patch
-- Applying patch 0008_fix_tools_path.patch
-- Applying patch 0009_fix_openssl_config.patch
-- Applying patch 0010_fix_othertests_cmake.patch
-- Using source at F:/issueTest/vcpkg/buildtrees/curl/src/url-7_68_0-cd669cc759
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: F:/issueTest/vcpkg/packages/curl_x86-windows/share/curl/curl-config
-- Installing: F:/issueTest/vcpkg/packages/curl_x86-windows/share/curl/vcpkg-cmake-wrapper.cmake
-- Installing: F:/issueTest/vcpkg/packages/curl_x86-windows/share/curl/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package curl[core,non-http,ssl,sspi,winssl]:x86-windows... done
Installing package curl[core,non-http,ssl,sspi,winssl]:x86-windows...
Installing package curl[core,non-http,ssl,sspi,winssl]:x86-windows... done
Elapsed time for package curl:x86-windows: 2.261 min
Total elapsed time: 2.576 min
The package curl:x86-windows provides CMake targets:
find_package(CURL CONFIG REQUIRED)
target_link_libraries(main PRIVATE CURL::libcurl)
Thank you for your reply.
Here is the full debug logs from the operation. It is the same for any library, always exits after the 255 status for vcvarsall.bat.
[DEBUG] Using vcpkg-root: C:\Users\<some_user>\source\repos\vcpkg
Computing installation plan...
[DEBUG] CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" --version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 98196 us
[DEBUG] CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" -P "C:/Users/320055060/source/repos/vcpkg/buildtrees/0.vcpkg_dep_info.cmake")
[DEBUG] cmd_execute_and_stream_data() returned 0 after 50459 us
[DEBUG] CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" -P "C:/Users/320055060/source/repos/vcpkg/buildtrees/0.vcpkg_tags.cmake")
[DEBUG] cmd_execute_and_stream_data() returned 0 after 59842 us
The following packages will be built and installed:
curl[core,non-http,ssl,sspi,winssl]:x86-windows
sdl2[core]:x86-windows
* zlib[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
[DEBUG] <abientries>
[DEBUG] portfile.cmake|3480e8cb8c1df66c455820588cf637841a2004a2
[DEBUG] cmake_dont_build_more_than_needed.patch|380b131349bf645f05637612e4a9a04ed8ba6349
[DEBUG] CONTROL|5a745a5fdf7009f92bfadac3b5cfe9685c7e11f7
[DEBUG] usage|b446f7466dead962527355c13bbb617213098938
[DEBUG] LICENSE|e23c6e5f40647ee2f817439d3858531fb0753c9d
[DEBUG] cmake|3.17.1
[DEBUG] powershell|ab1effc926b000a6adc12198a1886514ec203621a53b0cd7ec1cd9a8225dccda7e857feaabcfba4004bea73129b986abaad777c4573f44e0af70411226ce08b0
[DEBUG] vcpkg_fixup_cmake_targets|dac334f3bf50b8262be92623168023aa565aa729
[DEBUG] post_build_checks|2
[DEBUG] triplet|e8dc96fd479b53bb0e6748625827c8268017e35a
[DEBUG] features|core
[DEBUG] </abientries>
[DEBUG] <abientries>
[DEBUG] zlib|c24241110c1b4948bf725b1bb03ab5cb04b27385
[DEBUG] vcpkg-cmake-wrapper.cmake|02b9027fe16333fd92f1e2424cf92f4b6de720ab
[DEBUG] 0008_fix_tools_path.patch|13a5edc12c612860f802ac258463450fe43635ee
[DEBUG] portfile.cmake|1d2ecbe264e91d26ebbbb790f1051937a10d5157
[DEBUG] 0005_remove_imp_suffix.patch|2713a098ce6fa0257bd7676dea665ce61f215bdd
[DEBUG] 0001_cmake.patch|41a72cc0844e763bf89d5341e88ec3f20a22fc3a
[DEBUG] CONTROL|43d7eb0b311d972c343c703916073a817ebcea25
[DEBUG] 0007_disable_tool_export_curl_target.patch|6833e16fc870491a3606271c4e4bed590ac32c3e
[DEBUG] 0006_fix_tool_depends.patch|6c4bad90c194f210dfebe52b0e05bf3a6e3d0396
[DEBUG] 0010_fix_othertests_cmake.patch|90d852bb9fb49bad6968e6fe61e048f8efda908d
[DEBUG] 0009_fix_openssl_config.patch|b4524fdf0405bb0dd09513a0a5226cd67640e61a
[DEBUG] 0002_fix_uwp.patch|b57e03826b75299a923fec8aded43edc969a3232
[DEBUG] 0004_nghttp2_staticlib.patch|efa66e698ce46deff5496eb9a8b59ec633a99916
[DEBUG] cmake|3.17.1
[DEBUG] powershell|ab1effc926b000a6adc12198a1886514ec203621a53b0cd7ec1cd9a8225dccda7e857feaabcfba4004bea73129b986abaad77
7c4573f44e0af70411226ce08b0
[DEBUG] vcpkg_fixup_cmake_targets|dac334f3bf50b8262be92623168023aa565aa729
[DEBUG] post_build_checks|2
[DEBUG] features|core;non-http;ssl;sspi;winssl
[DEBUG] </abientries>
[DEBUG] <abientries>
[DEBUG] CONTROL|27345e806bd465fa4adbed856c93076784a950ee
[DEBUG] disable-hidapi-for-uwp.patch|45cb21df78fad1c5f663256c0f02eedfed71b864
[DEBUG] disable-wcslcpy-and-wcslcat-for-windows.patch|4963b8af4aca70fd58a467a67e4be0b6d431c060
[DEBUG] fix-space-in-path.patch|75c5082a8431917fafb40c906c1ae214af32c228
[DEBUG] export-symbols-only-in-shared-build.patch|9eb7c558bf8bb3df52be2f8ed7d75654f5806e6c
[DEBUG] enable-winrt-cmake.patch|b8782ed6012e2f5d8a121623b8d5c7a25dc09d5f
[DEBUG] vcpkg-cmake-wrapper.cmake|c83f8cc683a1c5af100fc0debe531be2f09e0766
[DEBUG] portfile.cmake|d6307055886b6f6940b27f8d6b67fc3de685d48e
[DEBUG] cmake|3.17.1
7c4573f44e0af70411226ce08b0
[DEBUG] vcpkg_fixup_cmake_targets|dac334f3bf50b8262be92623168023aa565aa729
[DEBUG] post_build_checks|2
[DEBUG] triplet|e8dc96fd479b53bb0e6748625827c8268017e35a
[DEBUG] features|core
[DEBUG] </abientries>
Starting package 1/3: zlib:x86-windows
Building package zlib[core]:x86-windows...
[DEBUG] CreateProcessW("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -
products * -format xml)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 60810 us
[DEBUG] Found path: C:\Program Files\Git\cmd\git.exe
[DEBUG] CreateProcessW("C:\Users\320055060\source\repos\vcpkg\downloads\tools\git-2.25.1-1-windows\mingw32\bin\git.exe"
--version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 52117 us
[DEBUG] CreateProcessW(cmd /c ""C:\VS2017\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 amd64_x86 2>&1 <NUL" & ec
ho cdARN4xjKueKScMy9C6H& set)
[DEBUG] cmd_execute_and_stream_data() returned 255 after 1623769 us
[DEBUG] c:\users\<some_user>\source\repos\vcpkg\toolsrc\src\vcpkg\base\system.process.cpp(487)
[DEBUG] Exiting after 2050901 us (2040825 us)
Required packages do get downloaded. I checked the vcpkg folder, and they're there. It's just that the 255 error for vcvarsall.bat causes the operation to terminate.
Additional information - I tried the same even with VS 2017 developer command prompt. Same result.
& echo cdARN4xjKueKScMy9C6H& set)
lang pack eng in msvc installed?
@Voskrese
My OS language is English (EN-US). There are no other language packs installed. Visual Studio default language was chosen during installation. It shows English as the only option in language settings (apart from "Same as Windows" which is anyway Eng-US).
Are you referring to these settings, or is there something specific which I ought to have installed, please?
c:\users\<some_user>\ ? real name?
@Voskrese No, there is an actual user name, in English, without any special characters.
Describe your computer configuration
[DEBUG] cmd_execute_and_stream_data() returned 0 after 52117 us
[DEBUG] CreateProcessW(cmd /c ""C:\VS2017\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 amd64_x86 2>&1ho cdARN4xjKueKScMy9C6H& set)
[DEBUG] cmd_execute_and_stream_data() returned 255 after 1623769 us
[DEBUG] c:\users\source\repos\vcpkg\toolsrc\src\vcpkg\base\system.process.cpp(487)
[DEBUG] Exiting after 2050901 us (2040825 us)
52117 -->> 2040825 us \wait_and_close_handles\
open cmd.exe
call "C:\VS2017\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 amd64_x86 ?
I'm sorry, I didn't quite get it.
By my computer configuration do you mean hardware? If so,
The last step failure, is identified almost immediately, maybe a delay of a few ms.
In CMD, I should call this whole command?
call "C:\VS2017\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 amd64_x86
If I do so, I get the following output -
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
\Coverage\bin was unexpected at this time.
open CMD.exe
set VSCMD_DEBUG=2
call "C:\VS2017\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 amd64_x86
(A bit off-topic, sorry)
BTW, I'm very curious about this English Pack requirement. It's awkward. What exactly fails in non-english VS? Program names (cmake, cl, msbuild, link...), parameters, etc. are not language dependent, AFAIK. Will this requirement be lifted some day?
I have the same problem.
Same problem
Hi all,
Sorry for the late reply.
@AngmarLord , @christopherwoo , @rvdweerd
Could you please help confirm if you have installed any antivirus softwares?
@aslze , English pack is required in Visual Studio, please see here. If there is no English pack, it will post the message like this:
Please install the English language pack.
Thanks @NancyLi1013
I've got Norton360.
In my case, package installation aborts with:
[DEBUG] CreateProcessW(cmd /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.2 amd64_x86 2>&1
[DEBUG] C:\vcpkg\toolsrc\src\vcpkg\base\system.process.cpp(567)
May it have something to do with incorrect paths? Or wrong default triplet (although SET confirms I'm on a x86/AMD64)? Or different/incompatible versions of build tools?
If I open developer Command Prompt for VS2019, it gives my 5 warnings "System cannot find specified path" (not sure if that's relevant at all)
@rvdweerd
Sorry for the long delay.
Could you please disable Norton360 and try to build again? Since Antivirus software will affect the usage of vcpkg.
Hi,
I have the same problem.
I don't have any antivirus and system is in english. This is the error that I get:
[DEBUG] CreateProcessW(cmd /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.2 amd64 2>&1
[DEBUG] C:\dev\vcpkg\toolsrc\src\vcpkg\base\system.process.cpp(569)
[DEBUG] Exiting after 1320549 us (1310268 us)
Hello, I've just created new issue #13890 but I guess my error is same as everyone in this thread : /
From my side, I solved the issue:
I had to clear the HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun registry entry which was trying to launch an old Anaconda batch file...
Most helpful comment
Hi,
I have the same problem.
I don't have any antivirus and system is in english. This is the error that I get:
[DEBUG] CreateProcessW(cmd /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.2 amd64 2>&1
[DEBUG] cmd_execute_and_stream_data() returned 1 after 1177181 us
[DEBUG] C:\dev\vcpkg\toolsrc\src\vcpkg\base\system.process.cpp(569)
[DEBUG] Exiting after 1320549 us (1310268 us)