CMake Error while installing
epogenesis opened this issue · 18 comments
Error Message:
-- Building for: Visual Studio 16 2019
CMake Error at CMakeLists.txt:4 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 16.3.2+e481bbf88 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
That is concerning: it looks like issue #6
I will later today install Visual Studio 2019 and test on that.
Could you check if your windows 10 is 32 or 64 bits? https://support.microsoft.com/en-us/help/13443/windows-which-version-am-i-running
Okay thanks for the fast response: Firstly its 64x. Also I installed both crossplatform and normal .NET and now there is a new error:
CMake Error at CMakeLists.txt:4 (project):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
I will try to also see if I can find a solution 👍
I have tried here with Visual Studio 2019. I noticed that the my MSBuild is more up-to-date:
-- Build files have been written to: C:/Users/horta/zlib-1.2.11/build
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
I guess you can try to update it via "Windows Update" and then try again?
I updated VS, and now have version 16.6, yet it nevertheless throws at me with the same error...
Just to make sure: Admin PS -> paste command, right?
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Exit code: 1
Is that all the output? Because my script should save a log file with additional information.
Sorry for the inactivity, the output log says the following:
The system is: Windows - 10.0.18362 - AMD64
Hi @epogenesis and @horta - has this issue been resolved? I'm seeing the same error of:
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
I'd be keen to find out if you found a solution!
FYI - I'm using Visual Studio 2019 16.8.4 and have MSBuild version 16.8.3+39993bd9d on a 64-bit Windows machine.
Hey @uriel-tannen, I'm sorry but at this point I don't even remember what I planned on doing with zlib, so I doubt I ever got it to work successfully :/
Is there any progress on this? I receive a similar error:
CMake Error at CMakeLists.txt:4 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Any advise on how to address this would be appreciated. :)
Sorry for the delay. How did you install cmake?
Through the default .msi
installer found at https://cmake.org/download/
OK, I'm doing the same procedure on a fresh windows install. I will be back here soon =P
Could you test the new one line installer? It should give the same error with additional information, so you can paste here for me if possible.
I've updated the README.md as well: https://github.com/horta/zlib.install
It should be easier now for me to debug once you can test it again and show me the LOG output.
I'm still received an error. Now its:
---------------------------------------- log begin ----------------------------------------
-- Environment variables
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\jpd.ext\AppData\Roaming
BUILD_DIR=C:\Windows\system32/zlib-1.2.11/build
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=132575292212058719
CMAKE_VS_PLATFORM_NAME=x64
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=AUTO-PF2J8JKZ
ComSpec=C:\Windows\system32\cmd.exe
DIR=zlib-1.2.11
DriverData=C:\Windows\System32\Drivers\DriverData
FILE=zlib-1.2.11.zip
HOMEDRIVE=C:
HOMEPATH=\Users\jpd.ext
LOCALAPPDATA=C:\Users\jpd.ext\AppData\Local
LOGFILE=C:\Windows\system32\zlib_install.log
LOGONSERVER=\\AUTO-PF2J8JKZ
NEXTHINK=C:\Program Files\Nexthink\Collector
NUMBER_OF_PROCESSORS=16
ORIGIN=C:\Windows\system32
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\1E\Client\Extensibility\NomadBranch;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\jpd.ext\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\jpd.ext\AppData\Local\Microsoft\WindowsApps;C:\Users\jpd.ext\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\jpd.ext\AppData\Local\Programs\Git\cmd;C:\Users\jpd.ext\AppData\Local\JetBrains\PyCharm Community Edition 2020.3.3\bin;C:\Program Files\CMake\bin;C:\Users\jpd.ext\.poetry\bin;C:\Users\jpd.ext\AppData\Roaming\npm;C:\Python39
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=a502
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Users\jpd.ext\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\PowerShell\Modules\
PUBLIC=C:\Users\Public
PyCharm Community Edition=C:\Users\jpd.ext\AppData\Local\JetBrains\PyCharm Community Edition 2020.3.3\bin;
RTOOLS40_HOME=C:\rtools40
snow_agent=C:\Program Files\Snow Software\Inventory\Agent
SRC_DIR=C:\Windows\system32/zlib-1.2.11
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\jpd.ext\AppData\Local\Temp
TMP=C:\Users\jpd.ext\AppData\Local\Temp
UATDATA=C:\Windows\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
URL=https://zlib.net/zlib1211.zip
USERNAME=jpd.ext
USERPROFILE=C:\Users\jpd.ext
VERSION=1.2.11
windir=C:\Windows
-- System info
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19042 N/A Build 19042
cmake.exe is accessible by default.
Fetching https://zlib.net/zlib1211.zip
Downloading https://zlib.net/zlib1211.zip... done.
-- Building for: Visual Studio 15 2017
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19042.
CMake Error at CMakeLists.txt:4 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/zlib-1.2.11/build/CMakeFiles/CMakeOutput.log".
-- C:\Windows\system32/zlib-1.2.11/build/CMakeFiles/CMakeOutput.log
The syntax of the command is incorrect.
---------------------------------------- log end ----------------------------------------
Please note that I removed some identifying information from the log, namely OneDrive
, OneDriveCommercial
, USERDNSDOMAIN
, USERDOMAIN
, and USERDOMAIN_ROAMINGPROFILE
. However, these should not affect the install anyways. Please let me know, if there is more I can do.
Thanks a lot, @JenspederM ! It looks like I also made a programming mistake: The syntax of the command is incorrect.
Could you also provide the content of the files?
C:/Windows/System32/zlib-1.2.11/build/CMakeFiles/CMakeOutput.log
C:\Windows\system32/zlib-1.2.11/build/CMakeFiles/CMakeOutput.log
Also, how did you install Visual Studio with C++?
Can you also show the output of where cmake.exe
?