Closed atraczyk closed 2 years ago
What's the result when you execute the following command in a new cmd window?
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.2 amd64
cl /Bv
If you still get the same error, please add set VSCMD_DEBUG=3
and run the below command:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.2 amd64 > log.log
Then send the log.log to me. Thank you!
@Cheney-W Here's the output of cl /Bv
after having run "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.2 amd64
:
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30143 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
Compiler Passes:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe: Version 19.29.30143.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\c1.dll: Version 19.29.30143.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\c1xx.dll: Version 19.29.30143.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\c2.dll: Version 19.29.30143.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\c1xx.dll: Version 19.29.30143.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe: Version 14.29.30143.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\mspdb140.dll: Version 14.29.30143.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\1033\clui.dll: Version 19.29.30143.0
cl : Command line error D8003 : missing source filename
And here's the log from the vcvarsall line using VSCMD_DEBUG=3
:
log.log
Thanks
It looks like this issue cannot be reproduced with the command alone. Does this issue still occur when you clone a new vcpkg?
Yes. I've attempted a thorough clean of vcpkg references on my system. I get the same results. Perhaps there is some subtle breakage in my Visual Studio installation?
Generally speaking, if vcvarsall.bat can run successfully on the ordinary cmd, it will not be a problem with the installation. But to be on the safe side, I think you can reinstall your Visual Studio. Also, I looked up the error return value online and it says it's a memory issue, is it possible that other software, like antivirus software or something, is causing this problem?
I'm not sure, but it is new and definitely related to some element present on the specific machine in question. I tried a reinstall but that didn't work. I bet there's a cache that's not cleared when uninstalling also. I'm gonna install VS 2022 and see what happens.
I searched for tickets related to:
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\system.process.cpp(702):
and found https://github.com/microsoft/vcpkg/issues/13890, so I checked HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
and I found "C:\Program Files (x86)\clink\0.4.9\clink.bat" inject --autorun --profile ~\clink
. After removing that, everything works as expected.
Thanks for your reply! I'm glad to know this issue has been solved.
@Cheney-W Thanks for your help and time!
I am unable to build x64 packages with:
Packages build correctly on 2 other machines with Visual Studio 2019 16.11.11(with the same toolsets + SDKs, and additional components).
Environment
To Reproduce Steps to reproduce the behavior:
Run vcvarsall.bat to get Visual Studio env failed with exit code -1073740791
Expected behavior The package should build successfully.
Failure logs
Is there a way to increase the verbosity of the logs?