vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

bootstrap not working on win10 x64

Open yamcenutzer opened this issue 9 years ago • 8 comments

this whole thing is so volatile it stops working every other day/hour. After just having had success on a win7 system, it didn't work on another pc (win10 x64):

Download nuget No suitable version of nuget was found (requires 3.3.0 or higher). Download portable version? [Y] Yes [N] No [A] Always Allow Downloads [?] Help (default is "Y"): Feeds used: C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ Attempting to gather dependency information for package 'Microsoft.VisualStudio.Setup.Configuration.Native.1.5.125-rc' with respect to project 'C:\robinmi\vcpkg\downloads\nuget-packages', targeting 'Any,Version=v0.0' Package 'Microsoft.VisualStudio.Setup.Configuration.Native 1.5.125-rc' is not found in the following primary source(s): 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'. Please verify all your online package sources are available (OR) package id, version are specified correctly. At C:\robinmi\vcpkg\scripts\findVisualStudioInstallationInstances.ps1:23 char:5

  • throw $nugetOutput
    
  • ~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (System.Object[]:Object[]) [], RuntimeException
    • FullyQualifiedErrorId : Feeds used: C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ Attempting to gath er dependency information for package 'Microsoft.VisualStudio.Setup.Configuration.Native.1.5.125-rc' with respect to project 'C:\robinmi\vcpkg\downloads\nuget-packages', targeting 'Any,Version=v0.0' Package 'Microsoft.VisualStud io.Setup.Configuration.Native 1.5.125-rc' is not found in the following primary source(s): 'C:\Program Files (x86) \Microsoft SDKs\NuGetPackages'. Please verify all your online package sources are available (OR) package id, vers ion are specified correctly.

yamcenutzer avatar Feb 11 '17 14:02 yamcenutzer

Oh dear.

Feeds used:
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

Attempting to...

Looking at this, I suspect you may have some user-wide NuGet settings that removed the main NuGet gallery. For context, we download a small tool (that's hosted in NuGet) to enable finding VS2017 instances. Previously, this was done as a direct download, but we very recently switched to using the actual NuGet.exe for it. I think this is what caused the regression for you.

If my suspicion is correct, then the true fix is that we should be telling NuGet to ignore your user settings because we know exactly where and what package to fetch. I've made this change in 4cef21b; could you please try running bootstrap against that version?

Repro of the error message you're seeing:

PS D:\src\vcpkg\downloads> .\nuget.exe install -source "C:\Program Files (x86)\Microsoft SDKs\NuGetPackages" -outputdirectory .\nuget-packages -version 1.5.125-rc Microsoft.VisualStudio.Setup.Configuration.Native -nocache
Feeds used:
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages

Attempting to gather dependency information for package 'Microsoft.VisualStudio.Setup.Configuration.Native.1.5.125-rc' with respect to project '.\nuget-packages', targeting 'Any,Version=v0.0'
Package 'Microsoft.VisualStudio.Setup.Configuration.Native,1.5.125-rc' is not found in the following primary source(s): 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'. Please verify all your online package sources are available (OR) package id, version are specified correctly.

ras0219-msft avatar Feb 11 '17 17:02 ras0219-msft

That fixed boostrat, but everythng else is now broken. tried everything from scartch.. cannot install a single package. below is asample for zlib ( tried various others too). C:\robinmi\vcpkg>vcpkg update Using local portfile versions. To update the local portfiles, use git pull. No packages need updating.

C:\robinmi\vcpkg>vcpkg install zlib -- CURRENT_INSTALLED_DIR=C:/robinmi/vcpkg/installed/x64-windows -- DOWNLOADS=C:/robinmi/vcpkg/downloads -- CURRENT_PACKAGES_DIR=C:/robinmi/vcpkg/packages/zlib_x64-windows -- CURRENT_BUILDTREES_DIR=C:/robinmi/vcpkg/buildtrees/zlib -- CURRENT_PORT_DIR=C:/robinmi/vcpkg/ports/zlib/. -- Downloading http://www.zlib.net/zlib-1.2.11.tar.gz... -- Downloading http://www.zlib.net/zlib-1.2.11.tar.gz... OK -- Testing integrity of downloaded file... -- Testing integrity of downloaded file... OK -- Extracting source C:/robinmi/vcpkg/downloads/zlib1211.tar.gz -- Extracting done -- Configuring x64-windows-rel CMake Error at C:/robinmi/vcpkg/scripts/cmake/vcpkg_execute_required_process.cmake:14 (message): Command failed: C:/Program Files/CMake/bin/cmake.exe;C:/robinmi/vcpkg/buildtrees/zlib/src/zlib-1.2.11;-DSKIP_INSTALL_FILES=ON;-DBUILD_SHARED_LIBS=ON;-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP;-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP;-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON;-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON;-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON;-DBoost_COMPILER=-vc140;-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi;-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi;-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF;-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF;-G;Visual Studio 15 2017 Win64;-DCMAKE_VERBOSE_MAKEFILE=ON;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_TOOLCHAIN_FILE=C:/robinmi/vcpkg/triplets/x64-windows.cmake;-DCMAKE_PREFIX_PATH=C:/robinmi/vcpkg/installed/x64-windows;-DCMAKE_INSTALL_PREFIX=C:/robinmi/vcpkg/packages/zlib_x64-windows Working Directory: C:/robinmi/vcpkg/buildtrees/zlib/x64-windows-rel See logs for more information: C:\robinmi\vcpkg\buildtrees\zlib\config-x64-windows-rel-out.log C:\robinmi\vcpkg\buildtrees\zlib\config-x64-windows-rel-err.log

Call Stack (most recent call first): C:/robinmi/vcpkg/scripts/cmake/vcpkg_configure_cmake.cmake:95 (vcpkg_execute_required_process) C:/robinmi/vcpkg/ports/zlib/portfile.cmake:10 (vcpkg_configure_cmake) C:/robinmi/vcpkg/scripts/ports.cmake:73 (include)

Error: building package zlib:x64-windows failed Please ensure sure you're using the latest portfiles with vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: zlib:x64-windows Vcpkg version: 0.0.71-

Additionally, attach any relevant sections from the log files above.

C:\robinmi\vcpkg>

yamcenutzer avatar Feb 12 '17 12:02 yamcenutzer

Ok, from the section you posted (thanks!) I see a few pieces of information that may be relevant:

  • We detected VS2017 and are using the "Visual Studio 15 2017 Win64" generator
  • We detected and are using your installed copy of CMake at C:/Program Files/CMake/bin/cmake.exe

Have you ever used your system-installed CMake to configure a "hello, world!" application against VS 2017? If you haven't attempted it before, could you try that to help determine whether we aren't calling your system-installed tools correctly or if there is some underlying issue?

Here's a short powershell script that will do that in your current working directory (assuming your system-wide cmake is on your path):

echo "project(hello)`nadd_executable(main main.cpp)" | out-file -enc ascii CMakeLists.txt
echo "int main(){}" | out-file -enc ascii main.cpp
cmake . -G "Visual Studio 15 2017 Win64"
cmake --build .

Additionally, could you post the contents of buildtrees\zlib\config-x64-windows-rel-out.log and err? I suspect they will be extremely short; a few lines saying something along the lines of Unknown Compiler.

ras0219-msft avatar Feb 13 '17 05:02 ras0219-msft

OK just tried again. On a win7 Machine (also with vs2015 and 2017 and aslo cmake 3.7.2) it (kinda) works C:\robinmi\tool-GSRTools\src\build>cmake .. -G "Visual Studio 15 2017 Win64" -- The C compiler identification is MSVC 19.10.24911.0 -- The CXX compiler identification is MSVC 19.10.24911.0 .....

But on a win 10 Machine with the same cmake and vs2015/2017 it doesn't: Cmake 3.7.2 finds vs2015, but NOT vs2017 :

cmake .. -G "Visual Studio 15 2017 Win64" -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error in CMakeLists.txt: No CMAKE_C_COMPILER could be found.

CMake Error in CMakeLists.txt: No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred! See also "C:/robinmi/tool-GSRTools/src/CMakeFiles/CMakeOutput.log". See also "C:/robinmi/tool-GSRTools/src/CMakeFiles/CMakeError.log".

C:\robinmi\tool-GSRTools\src>cd build2017

C:\robinmi\tool-GSRTools\src\build2017>cmake .. -G "Visual Studio 15 2017 Win64" -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred! See also "C:/robinmi/tool-GSRTools/src/build2017/CMakeFiles/CMakeOutput.log". See also "C:/robinmi/tool-GSRTools/src/build2017/CMakeFiles/CMakeError.log".

CMakeError.log:

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler:
Build flags: Id flags:

The output was: 1 Microsoft (R) Build Engine version 15.0.25123.0 Copyright (C) Microsoft Corporation. All rights reserved.

Build started 13.02.2017 21:41:18. Project "C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets). C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdC\CompilerIdC.vcxproj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. Done Building Project "C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) -> C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdC\CompilerIdC.vcxproj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.01

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler:
Build flags: Id flags:

The output was: 1 Microsoft (R) Build Engine version 15.0.25123.0 Copyright (C) Microsoft Corporation. All rights reserved.

Build started 13.02.2017 21:41:18. Project "C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets). C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdCXX\CompilerIdCXX.vcxproj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. Done Building Project "C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) -> C:\robinmi\tool-GSRTools\src\build2017\CMakeFiles\3.7.2\CompilerIdCXX\CompilerIdCXX.vcxproj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.01

yamcenutzer avatar Feb 13 '17 20:02 yamcenutzer

This is also an issue when using bootstrap.ps1 on appveyor

adam4813 avatar Feb 15 '17 02:02 adam4813

Alright, we also discovered that there's an issue in the latest VS2017 which removed the legacy registry keys that CMake was using to find it (prior to 3.8). We've updated the required CMake version to 3.8.0-rc to fix the issue in commit 66cc4ee, which is now available in release v0.0.74. You'll need to re-run bootstrap for this to take affect!

Please let us know if this fixes the issue.

ras0219-msft avatar Feb 17 '17 06:02 ras0219-msft

with both vs2017 and cmake 3.8 being not yet (nearly) released, I wonder why that has to be the default choice of toolchain, when a VS2015/Cmake3.7 is actually available

yamcenutzer avatar Feb 20 '17 18:02 yamcenutzer

Now that VS2017 is released, please open a new issue for any new problems you encounter.

ras0219-msft avatar Mar 22 '17 01:03 ras0219-msft