You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\slee\Repos\PowerShell> Start-PSBuild
WARNING: Could not find 'dotnet', appending C:\Users\slee\AppData\Local\Microsoft\dotnet to PATH.
Get-ChildItem : Cannot find path 'C:\Program Files (x86)\Windows Kits\1' because it does not exist.
At C:\Users\slee\Repos\PowerShell\build.psm1:133 char:18
CategoryInfo : OperationStopped: (mc.exe not foun.../windows-10-sdk:String) [], RuntimeException
FullyQualifiedErrorId : mc.exe not found. Run Start-PSBootstrap or install Microsoft Windows 10 SDK from https:/
/developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
Start-PSBootStrap reports that everything needed is installed including Win10 SDK
This doesn't look like Start-PSBuild is broken; it's accurately reporting that it couldn't find the required build tool mc.exe. I followed the link it provided, ran the installer, and then found mc.exe in my path.
Start-PSBootrap installs it through chocolately, perhaps the package is broken.
Manually installing the SDK via choco got mc.exe installed, but now it's not finding a VS file:
Could not find Visual Studio vcvarsall.bat atC:\Program Files (x86)\Microsoft Visual Studio 14.0\vc
At C:\Users\slee\Repos\PowerShell\build.psm1:140 char:13
throw "Could not find Visual Studio vcvarsall.bat at" + $ ...
Repros on clean Windows machine with start-psbootstrap successfully completing. Nana says Karol Kaczmarek (@KarolKaczmarek) is already investigating related issue
I had the same issues on my Win10 preview build 14901 (Win10 Post AU).
I also have VS15 Preview 3 installed.
I went in psbuild.psm1 and updated the Env:VS140COMNTOOLS check to Env:VS150COMNTOOLS. I also had to install Common Tools for Visual C++ 2015 (modify VS install) to make vcvarsall.bat available on my system. Now I'm left with the final issue where CMake doesn't recognize the C++ compiler. Will update when I fix this.
On another note:
The Start-PSBootstrap function install CMake portable if CMake is not already on the system. When it does this, it adds C:\Program Files(x86)\CMake to the Path but this path does not exist with CMake portable. Instead Cmake will be located in C:\ProgramData\chocolatey\bin
Steve Lee (@SteveL-MSFT)
For vcvarsall to be present you must have Visual Studio with "Common Tools for Visual C++ 2015" feature installed.
We should also install it in Start-PSBootstrap or at least document it's needed.
Ben Gelens (@bgelens)
By "Cmake doesn't recognize the C++ compiler" do you mean error like CMAKE_CXX_COMPILER not set?
If so, you may need to add parent of cl.exe (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin) to the path.
Also, good point regarding the cmake.portable. Will send PR for that.
I was stung by this as well trying to run Start-PSBuild on a fresh Win10 machine
And it to me this also brings the question of if we are not suggesting to people to have to use the VisualStudio build process then should we remove it being a seemingly hidden requirement (not noted in the building docs) and move to a complete VS free (if possible - not sure as I'm still new to development like this) build process
If not then we should update the docs to have a simple list of requirements so that anyone could follow along.
Also the Start-PSBuild requires git installed so I think we should also add a check for this in Start-PSBootstrap too.
Regarding cmake, the build process start-psbuild adds the incorrect path (c:\program files (x86)\cmake) to path variable. On my Windows 10 1511, Cmake gets installed in c:\program files\cmake (not the x86 pf). Maybe its chocolatey which changed the install path?
Build fails though with:
`Execution of { dotnet restore $RestoreArguments } failed with exit code 1
At D:\Source\Repos\PowerShell\build.psm1:1712 char:13
throw "Execution of {$sb} failed with exit code $LASTEXIT ...
Keith Hill (@rkeithhill) no cmake_cxx_compiler could not be found
suggests you need to add path to cl.exe added to your PATH.
The previous error you were getting with nuget paths was just temporary and is fixed now, as you've noticed.
and while VC++ tools take 3GB, it's still significant improvement comparing with the size of full VS installation.
Ravindran Keshavan (@ravindrank) I wish there was an easy way to detect what exact path choco installs given component to... that would help get rid of such problems.
That being said, I believe cmake gets added to the PATH automatically during the installation so we could remove that code - I need to double check it though.
This is the error I find buried in the CMakeError.log for powershell-native:
The Windows SDK version 8.1 was not found. Install the required version of Windows SDK ...
So it looks like the VC++ build tools don't install everything you need. Although I though Start-PSBootstrap installed the required SDK on Windows? Hmm, looks like it installed the Windows 10 SDK on my Win7 VM. So why building the CompilerIdC.vxproj think it needs the Windows 8.1 SDK?
Activity
andyleejordan commentedon Aug 11, 2016
This doesn't look like Start-PSBuild is broken; it's accurately reporting that it couldn't find the required build tool
mc.exe. I followed the link it provided, ran the installer, and then foundmc.exein my path.Start-PSBootrapinstalls it through chocolately, perhaps the package is broken.SteveL-MSFT commentedon Aug 12, 2016
Manually installing the SDK via choco got mc.exe installed, but now it's not finding a VS file:
Could not find Visual Studio vcvarsall.bat atC:\Program Files (x86)\Microsoft Visual Studio 14.0\vc
At C:\Users\slee\Repos\PowerShell\build.psm1:140 char:13
dio 14.0\vc
I'll continue investigating
SteveL-MSFT commentedon Aug 12, 2016
Repros on clean Windows machine with start-psbootstrap successfully completing. Nana says Karol Kaczmarek (@KarolKaczmarek) is already investigating related issue
andyleejordan commentedon Aug 12, 2016
Can we narrow this down to particular OS versions? As it does not repro on AppVeyor.
SteveL-MSFT commentedon Aug 12, 2016
I'm using Win10 Anniversary Update
SteveL-MSFT commentedon Aug 13, 2016
Neema Saeedi (@neemas) Francisco Gamino (@Francisco-Gamino) will follow-up on this while I'm OOF
bgelens commentedon Aug 14, 2016
I had the same issues on my Win10 preview build 14901 (Win10 Post AU).
I also have VS15 Preview 3 installed.
I went in psbuild.psm1 and updated the Env:VS140COMNTOOLS check to Env:VS150COMNTOOLS. I also had to install Common Tools for Visual C++ 2015 (modify VS install) to make vcvarsall.bat available on my system. Now I'm left with the final issue where CMake doesn't recognize the C++ compiler. Will update when I fix this.
Update: VS 15 support for CMake is due October with 3.7.0 release. So will be reverting to Visual Studio 2015. https://gitlab.kitware.com/cmake/cmake/milestones/2
On another note:
The Start-PSBootstrap function install CMake portable if CMake is not already on the system. When it does this, it adds C:\Program Files(x86)\CMake to the Path but this path does not exist with CMake portable. Instead Cmake will be located in C:\ProgramData\chocolatey\bin
KarolKaczmarek commentedon Aug 16, 2016
Steve Lee (@SteveL-MSFT)
For vcvarsall to be present you must have Visual Studio with "Common Tools for Visual C++ 2015" feature installed.
We should also install it in Start-PSBootstrap or at least document it's needed.
Ben Gelens (@bgelens)
By "Cmake doesn't recognize the C++ compiler" do you mean error like
CMAKE_CXX_COMPILER not set?If so, you may need to add parent of cl.exe (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin) to the path.
Also, good point regarding the cmake.portable. Will send PR for that.
kilasuit commentedon Aug 17, 2016
I was stung by this as well trying to run Start-PSBuild on a fresh Win10 machine
And it to me this also brings the question of if we are not suggesting to people to have to use the VisualStudio build process then should we remove it being a seemingly hidden requirement (not noted in the building docs) and move to a complete VS free (if possible - not sure as I'm still new to development like this) build process
If not then we should update the docs to have a simple list of requirements so that anyone could follow along.
Also the Start-PSBuild requires git installed so I think we should also add a check for this in Start-PSBootstrap too.
kilasuit commentedon Aug 17, 2016
Should have mentioned I'd be happy to work on that documentation once I know what's the minimum requirements as noted above
8 remaining items
ravindrank commentedon Aug 18, 2016
Regarding cmake, the build process start-psbuild adds the incorrect path (c:\program files (x86)\cmake) to path variable. On my Windows 10 1511, Cmake gets installed in c:\program files\cmake (not the x86 pf). Maybe its chocolatey which changed the install path?
Build fails though with:
`Execution of { dotnet restore $RestoreArguments } failed with exit code 1
At D:\Source\Repos\PowerShell\build.psm1:1712 char:13
KarolKaczmarek commentedon Aug 18, 2016
Keith Hill (@rkeithhill)
no cmake_cxx_compiler could not be foundsuggests you need to add path to cl.exe added to your PATH.
The previous error you were getting with nuget paths was just temporary and is fixed now, as you've noticed.
and while VC++ tools take 3GB, it's still significant improvement comparing with the size of full VS installation.
Ravindran Keshavan (@ravindrank) I wish there was an easy way to detect what exact path choco installs given component to... that would help get rid of such problems.
That being said, I believe cmake gets added to the PATH automatically during the installation so we could remove that code - I need to double check it though.
rkeithhill commentedon Aug 19, 2016
This is the error I find buried in the CMakeError.log for powershell-native:
So it looks like the VC++ build tools don't install everything you need. Although I though Start-PSBootstrap installed the required SDK on Windows? Hmm, looks like it installed the Windows 10 SDK on my Win7 VM. So why building the CompilerIdC.vxproj think it needs the Windows 8.1 SDK?
rkeithhill commentedon Aug 20, 2016
OK installed the Windows 8.1 SDK on my Windows 7 VM and I get further. Now it fails here:
Sorry for the images. Hyper-V is not letting me copy to the host OS clipboard.
The VC++ build tools do allow you to install the 8.1/10 SDK and the ATL/MFC tools. I'm installing the ATL/MFC tooling and will try again.
mirichmo commentedon Nov 3, 2016
Fixed by #2568