microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.88k stars 6.31k forks source link

[fmt] Build error - vcpkg hosed #26776

Closed gvanem closed 2 years ago

gvanem commented 2 years ago

Host Environment:

To Reproduce:

vcpkg install fmt:x64-windows --debug

Console Output:

...
-- Configuring x64-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
    Command failed: ninja -v
    Working Directory: F:/gv/VC_project/VCPKG/buildtrees/fmt/x64-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      F:\gv\VC_project\VCPKG\buildtrees\fmt\config-x64-windows-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:411 (vcpkg_execute_required_process)
  ports/fmt/portfile.cmake:12 (vcpkg_cmake_configure)
  scripts/ports.cmake:147 (include)

[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 11716: cmd_execute_and_stream_data() returned 1 after  1475768 us
error: building fmt:x64-windows failed with: BUILD_FAILED
[DEBUG] CreateProcessW("f:\ProgramFiler\Git-2\cmd\git.exe" "--git-dir=F:\gv\VC_project\VCPKG\.git" "--work-tree=F:\gv\VC_project\VCPKG\.git"
 -c core.autocrlf=false show "--pretty=format:%h %cd (%cr)" -s --date=short HEAD)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 11716: cmd_execute_and_stream_data() returned 128 after    22481 us
[DEBUG] CreateProcessW("f:\ProgramFiler\Git-2\cmd\git.exe" "--git-dir=F:\gv\VC_project\VCPKG\.git" "--work-tree=F:\gv\VC_project\VCPKG\.git"
 -c core.autocrlf=false show "--pretty=format:%h %cd (%cr)" -s --date=short HEAD)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 11716: cmd_execute_and_stream_data() returned 128 after    22605 us
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.

Error 109 means ERROR_BROKEN_PIPE. No idea why.

And %VCPKG_ROOT%\buildtrees\fmt\config-x64-windows-out.log contains this:

  The C++ compiler

    "F:/gv/VC_2022/VC/Tools/MSVC/14.34.31721/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: F:/gv/VC_project/VCPKG/buildtrees/fmt/x64-windows-dbg/CMakeFiles/CMakeTmp

    Run Build Command(s):F:/gv/VC_2022/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_59b19 && [1/2] Building CXX object
 CMakeFiles\cmTC_59b19.dir\testCXXCompiler.cxx.obj
    [2/2] Linking CXX executable cmTC_59b19.exe
    FAILED: cmTC_59b19.exe
    cmd.exe /C "cd . && F:\MinGW32\bin\CMake3-24\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_59b19.dir --rc=rc --mt=CMAKE_MT-NOTF
OUND --manifests  -- F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_59b19.dir\testCXXCompiler.cxx
.obj  /out:cmTC_59b19.exe /implib:cmTC_59b19.lib /pdb:cmTC_59b19.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  ker
nel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    RC Pass 1: command "rc /fo CMakeFiles\cmTC_59b19.dir/manifest.res CMakeFiles\cmTC_59b19.dir/manifest.rc" failed (exit code 0) with the
following output:
    Systemet finner ikke angitt fil
    ninja: build stopped: subcommand failed.

Looks like rc is not found (or failing) here. But it's on my PATH. But I just installed Visual Studio 2022 Preview. Related?

Additional context

Buildin the fmt package was just an example; vcpkg fails on all packages except header-only packages. Both x64 and x86. What should I do?

FrankXie05 commented 2 years ago

@gvanem Thanks for posting this issue. Does your VS have the necessary components installed? image image And please provide the following complete log file config-x64-windows-out.log. :)

gvanem commented 2 years ago

@FrankXie05 Your screen-shot looks different than mine. From latest vs_installer.exe:

But what good is C# and Visual Basic Roslyn for VCPKG? No, I don't need it. And why 2 Windows 10 SDK?

And please provide the following complete log file config-x64-windows-out.log. :)

I now tried with vcpkg install fmt:x64-windows --debug --keep-going. But same error. The log-file: config-x64-windows-out.log

FrankXie05 commented 2 years ago

@gvanem

  1. You don't need C#, that's my problem.
  2. About SDK: support for C11 and C17 is provided after the vs2019 version, but must have Windows SDK 10.0.20348.0 or higher. see https://docs.microsoft.com/en-us/cpp/overview/install-c17-support?view=msvc-170 :)
  3. After you run ./vcpkg install fmt:x64-windows --debug, can you provide the console output? I want to make sure that the sdk required by your local VS is the same as the one you downloaded
gvanem commented 2 years ago

The above .log-files says:

RC Pass 1: command "rc /fo CMakeFiles\cmTC_ecef9.dir/manifest.res CMakeFiles\cmTC_ecef9.dir/manifest.rc" failed (exit code 0) with the following output:
    The system failed to find given file (translated from Norwegian)
    ninja: build stopped: subcommand failed.

I'm amazed if is this is true; a simple invocation of rc.exe fails. As if CMake sets up a special PATH or something. I have rc.exe as part of the latest (?) Win-SDK (f:\gv\WinKit\bin\10.0.22621.0\x64\rc.exe) which is on PATH.

So just as an experiment, I copied f:\gv\WinKit\bin\10.0.22621.0\x64\rc* to CMake's bin directory. Now there's another error:

RC Pass 1: command "F:\MinGW32\bin\CMake3-24\bin\rc.exe /fo CMakeFiles\cmTC_37f76.dir/manifest.res CMakeFiles\cmTC_37f76.dir/manifest.rc" failed (exit code 0) with the following output:
    Exit code 0xc0000135
    ninja: build stopped: subcommand failed.

Yikes! Code 0xc0000135 should be STATUS_DLL_NOT_FOUND. If only I could tell CMake not to delete this temporary cmTC_37f76.dir/manifest.rc file. How?

FrankXie05 commented 2 years ago

For error Exit code 0xc0000135, it only occurs if you don't have the Proper Version of the .NET Framework installed.

0xc0000135 error can happens when you run a program that requires the .NET framework, but your computer doesn’t have the .NET framework or doesn’t install the .NET framework properly.

You can check if there is the .NET framework on your PC. Type “control panel” in the search bar to open the Control Panel. Click Programs in the Control Panel, then find Programs and Features and click it. All the programs installed on your computer are listed. Check if there is any form of the .NET framework.

If there is the .NET framework, just uninstall it and then have it reinstalled. If not, you can download the proper version of .NET framework from Microsoft official website and install it. After the .NET framework installed, remember to reboot your computer

Remember to keep only one sdk. :)

Or maybe you can try your method, I'm not sure if it works. 😑

gvanem commented 2 years ago

, but must have Windows SDK 10.0.20348.0 or higher.

I have WinKit 10.0.22621.0. See below.

After you run ./vcpkg install fmt:x64-windows --debug, can you provide the console output? I

Here is all of it:

[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Failed to open: F:\gv\VC_project\VCPKG\vcpkg-bundle.json
[DEBUG] Using scripts-root: F:\gv\VC_project\VCPKG\scripts
[DEBUG] Bundle config: readonly=0, usegitregistry=0, embeddedsha=nullopt
[DEBUG] Using builtin-ports: F:\gv\VC_project\VCPKG\ports
[DEBUG] Using installed-root: F:\gv\VC_project\VCPKG\installed
[DEBUG] Using buildtrees-root: F:\gv\VC_project\VCPKG\buildtrees
[DEBUG] Using packages-root: F:\gv\VC_project\VCPKG\packages
[DEBUG] Using vcpkg-root: F:\gv\VC_project\VCPKG
[DEBUG] Using scripts-root: F:\gv\VC_project\VCPKG\scripts
[DEBUG] Using builtin-registry: F:\gv\VC_project\VCPKG\versions
[DEBUG] Using downloads-root: F:\gv\VC_project\VCPKG\downloads
[DEBUG] Default binary cache path is: c:\Users\gvane\AppData\Local\vcpkg\archives
Computing installation plan...
[DEBUG] Found path: f:\MinGW32\bin\CMake3-24\bin\cmake.exe
[DEBUG] CreateProcessW("f:\MinGW32\bin\CMake3-24\bin\cmake.exe" --version)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after    19000 us
[DEBUG] CreateProcessW("f:\MinGW32\bin\CMake3-24\bin\cmake.exe" -DVCPKG_ROOT_DIR=F:/gv/VC_project/VCPKG -DPACKAGES_DIR=F:/gv/VC_project/VCPKG/packages -DBUILDTREES_DIR=F:/gv/VC_project/VCPKG/buildtrees -D_VCPKG_INSTALLED_DIR=F:/gv/VC_project/VCPKG/installed -DDOWNLOADS=F:/gv/VC_project/VCPKG/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "F:\gv\VC_project\VCPKG\buildtrees\0.vcpkg_tags.cmake")
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after    15041 us
The following packages will be built and installed:
    fmt[core]:x64-windows -> 9.0.0
[DEBUG] CreateProcessW("f:\ProgramFiler-x86\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -products * -format xml)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after    17091 us
Detecting compiler hash for triplet x64-windows...
[DEBUG] Found path: f:\ProgramFiler\Git-2\cmd\git.exe
[DEBUG] CreateProcessW("f:\ProgramFiler\Git-2\cmd\git.exe" --version)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after    16944 us
[DEBUG] CreateProcessW("F:\gv\VC_project\VCPKG\downloads\tools\powershell-core-7.2.5-windows\pwsh.exe" --version)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after   119148 us
[DEBUG] command line: cmd /c "F:\gv\VC_2022\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.34.31721 amd64   2>&1 <NUL  & echo cdARN4xjKueKScMy9C6H & set
[DEBUG] CreateProcessW(cmd /c "F:\gv\VC_2022\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.34.31721 amd64   2>&1 <NUL  & echo cdARN4xjKueKScMy9C6H & set)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after   977768 us
[DEBUG] **********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.4.0-pre.1.0
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
cdARN4xjKueKScMy9C6H
ALLUSERSPROFILE=c:\ProgramData
APPDATA=c:\Users\gvane\AppData\Roaming
CommandPromptType=Native
CommonProgramFiles=c:\Program Files\Common Files
CommonProgramFiles(x86)=c:\Program Files\Common Files(x86)
CommonProgramW6432=c:\Program Files\Common Files
COMPUTERNAME=INTEL-I7
ComSpec=C:\Windows\System32\cmd.exe
DevEnvDir=F:\gv\VC_2022\Common7\IDE\
EXTERNAL_INCLUDE=F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\include;F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\ATLMFC\include;F:\gv\VC_2022\VC\Auxiliary\VS\include;F:\gv\WinKit\include\10.0.22621.0\ucrt
Framework40Version=v4.0
FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
FrameworkVersion=v4.0.30319
FrameworkVersion64=v4.0.30319
HOMEDRIVE=C:
HOMEPATH=\Users\gvane
INCLUDE=F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\include;F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\ATLMFC\include;F:\gv\VC_2022\VC\Auxiliary\VS\include;F:\gv\WinKit\include\10.0.22621.0\ucrt
is_x64_arch=true
LIB=F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\ATLMFC\lib\x64;F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\lib\x64;F:\gv\WinKit\lib\10.0.22621.0\ucrt\x64
LIBPATH=F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\ATLMFC\lib\x64;F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\lib\x64;F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\lib\x86\store\references;C:\Windows\Microsoft.NET\Framework64\v4.0.30319
LOCALAPPDATA=c:\Users\gvane\AppData\Local
NUMBER_OF_PROCESSORS=24
OS=Windows_NT
PATHEXT=.BAT;.COM;.EXE;.BTM;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.tcl;.PSC1;.py;.pyw;.pl;.htm;.html
Platform=x64
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3c03
ProgramData=c:\ProgramData
ProgramFiles=c:\Program Files
ProgramFiles(x86)=f:\ProgramFiler-x86
ProgramW6432=c:\Program Files
PROMPT=$P$G
PSModulePath=c:\Program Files\WindowsPowerShell\Modules;c:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;c:\Program Files\Microsoft Message Analyzer\PowerShell
PUBLIC=c:\Users\Public
SystemDrive=c:
SystemRoot=c:\Windows
TEMP=c:\TEMP
TMP=c:\TEMP
UCRTVersion=10.0.22621.0
UniversalCRTSdkDir=F:\gv\WinKit\
USERDOMAIN=MSHOME
USERDOMAIN_ROAMINGPROFILE=INTEL-I7
USERNAME=Gisle
USERPROFILE=c:\Users\gvane
VCIDEInstallDir=F:\gv\VC_2022\Common7\IDE\VC\
VCINSTALLDIR=F:\gv\VC_2022\VC\
VCToolsInstallDir=F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\
VCToolsRedistDir=F:\gv\VC_2022\VC\Redist\MSVC\14.32.31326\
VCToolsVersion=14.34.31721
VisualStudioVersion=17.0
VS170COMNTOOLS=F:\gv\VC_2022\Common7\Tools\
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x64
VSCMD_ARG_TGT_ARCH=x64
VSCMD_ARG_VCVARS_VER=14.34.31721
VSCMD_VER=17.4.0-pre.1.0
VSINSTALLDIR=F:\gv\VC_2022\
windir=c:\Windows
VULKAN_SDK=f:\MinGW32\src\Graphics\Vulkan
ONEAPI_ROOT=f:\ProgramFiler\Intel\oneAPI
PATH=F:\gv\VC_2022\VC\Tools\MSVC\14.34.31721\bin\HostX64\x64;F:\gv\VC_2022\Common7\IDE\VC\VCPackages;F:\gv\VC_2022\Common7\IDE\CommonExtensions\Microsoft\TestWindow;F:\gv\VC_2022\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;F:\gv\VC_2022\MSBuild\Current\bin\Roslyn;F:\gv\VC_2022\Team Tools\Performance Tools\x64;F:\gv\VC_2022\Team Tools\Performance Tools;F:\gv\VC_2022\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;F:\gv\VC_2022\Common7\IDE\;F:\gv\VC_2022\Common7\Tools\;F:\gv\VC_project\VCPKG\downloads\tools\powershell-core-7.2.5-windows;c:\Windows\system32;c:\Windows;c:\Windows\system32\Wbem;c:\Windows\system32\WindowsPowerShell\v1.0\;F:\gv\VC_2022\VC\Tools\Llvm\x64\bin;F:\gv\VC_2022\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;F:\gv\VC_2022\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;F:\gv\VC_2022\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
VSLANG=1033
VSCMD_SKIP_SENDTELEMETRY=1
VCPKG_COMMAND=f:/gv/VC_2022/bin/vcpkg.exe
WindowsLibPath=References\CommonConfiguration\Neutral
WindowsSDKLibVersion=winv6.3\
WindowsSDKVersion=\
X_VCPKG_RECURSIVE_DATA={
"VCPKG_ROOT": "f:\\gv\\VC_project\\VCPKG"
}

__DOTNET_ADD_64BIT=1
__DOTNET_PREFERRED_BITNESS=64
__VSCMD_PREINIT_PATH=F:\gv\VC_project\VCPKG\downloads\tools\powershell-core-7.2.5-windows;c:\Windows\system32;c:\Windows;c:\Windows\system32\Wbem;c:\Windows\system32\WindowsPowerShell\v1.0\

[DEBUG] CreateProcessW("f:\MinGW32\bin\CMake3-24\bin\cmake.exe" -DCURRENT_PORT_DIR=F:/gv/VC_project/VCPKG/scripts/detect_compiler -DCURRENT_BUILDTREES_DIR=F:/gv/VC_project/VCPKG/buildtrees/detect_compiler -DCURRENT_PACKAGES_DIR=F:/gv/VC_project/VCPKG/packages/detect_compiler_x64-windows -D_HOST_TRIPLET=x64-windows -DCMD=BUILD -DDOWNLOADS=F:/gv/VC_project/VCPKG/downloads -DTARGET_TRIPLET=x64-windows -DTARGET_TRIPLET_FILE=F:/gv/VC_project/VCPKG/triplets/x64-windows.cmake -DVCPKG_BASE_VERSION=2022-09-13 -DVCPKG_CONCURRENCY=25 -DVCPKG_PLATFORM_TOOLSET=v143 -DGIT=f:/ProgramFiler/Git-2/cmd/git.exe -DVCPKG_ROOT_DIR=F:/gv/VC_project/VCPKG -DPACKAGES_DIR=F:/gv/VC_project/VCPKG/packages -DBUILDTREES_DIR=F:/gv/VC_project/VCPKG/buildtrees -D_VCPKG_INSTALLED_DIR=F:/gv/VC_project/VCPKG/installed -DDOWNLOADS=F:/gv/VC_project/VCPKG/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "F:\gv\VC_project\VCPKG\scripts\ports.cmake")
[DEBUG] -- Found external ninja('1.11.0').
[DEBUG] -- Configuring x64-windows
[DEBUG] [1/1] "F:/MinGW32/bin/CMake3-24/bin/cmake.exe" -E chdir ".." "F:/MinGW32/bin/CMake3-24/bin/cmake.exe" "F:/gv/VC_project/VCPKG/scripts/detect_compiler" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=F:/gv/VC_project/VCPKG/packages/detect_compiler_x64-windows" "-DCMAKE_MAKE_PROGRAM=F:/gv/VC_2022/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=F:/gv/VC_project/VCPKG/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=F:/gv/VC_project/VCPKG/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=F:/gv/VC_project/VCPKG" "-DZ_VCPKG_ROOT_DIR=F:/gv/VC_project/VCPKG" "-D_VCPKG_INSTALLED_DIR=F:/gv/VC_project/VCPKG/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
[DEBUG] -- The C compiler identification is MSVC 19.34.31721.0
[DEBUG] -- The CXX compiler identification is MSVC 19.34.31721.0
[DEBUG] #COMPILER_HASH#938e739ce5fbb18c85e07a8f6112d4776188e895
[DEBUG] #COMPILER_C_HASH#5a3d4a0f966b121a1334c024bf3852d0731a0927
[DEBUG] #COMPILER_C_VERSION#19.34.31721.0
[DEBUG] #COMPILER_C_ID#MSVC
[DEBUG] #COMPILER_CXX_HASH#5a3d4a0f966b121a1334c024bf3852d0731a0927
[DEBUG] #COMPILER_CXX_VERSION#19.34.31721.0
[DEBUG] #COMPILER_CXX_ID#MSVC
[DEBUG] -- Configuring done
[DEBUG] -- Generating done
[DEBUG] CMake Warning:
[DEBUG]   Manually-specified variables were not used by the project:
[DEBUG]
[DEBUG]     BUILD_SHARED_LIBS
[DEBUG]     CMAKE_INSTALL_BINDIR
[DEBUG]     CMAKE_INSTALL_LIBDIR
[DEBUG]     _VCPKG_ROOT_DIR
[DEBUG]
[DEBUG]
[DEBUG] -- Build files have been written to: F:/gv/VC_project/VCPKG/buildtrees/detect_compiler/x64-windows-rel
[DEBUG]
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after   976909 us
[DEBUG]
[DEBUG] Detected compiler hash for triplet x64-windows: 938e739ce5fbb18c85e07a8f6112d4776188e895
[DEBUG] <abientries for fmt:x64-windows>
[DEBUG]   cmake|3.24.0
[DEBUG]   features|core
[DEBUG]   fix-format-conflict.patch|2f994832581a94b22493dfc56a2ec11cc99abaaec368d1543a66e96e33bca626
[DEBUG]   fix-write-batch.patch|d71ed7679da338ca7cc25fb1f7e8af51f15c43dfde26dde2a5904927fe9e7994
[DEBUG]   portfile.cmake|c0389cfc29764e97992d62007733215dca7852f8d941fa61f15a117b2c5b05c6
[DEBUG]   ports.cmake|b4accc7941cb5ff993e1a0434cea6df3e99331137294958437b2b86b7216e2e2
[DEBUG]   post_build_checks|2
[DEBUG]   powershell|7.2.5
[DEBUG]   triplet|x64-windows
[DEBUG]   triplet_abi|4556164a2cd3dd6f4742101eabb46def7e71b6e5856faa88e5d005aac12a803c-c0600b35e024ce0485ed253ef5419f3686f7257cfb58cb6a24febcb600fc4b4c-938e739ce5fbb18c85e07a8f6112d4776188e895
[DEBUG]   usage|ece096518c58df58cfc60f5ad8120d248a86383482455f539d91b8ca6eac14a7
[DEBUG]   vcpkg-cmake|988196de5e90a249e1745964e595893af3fff2fa5ba34c6ed6e69061364ae2d7
[DEBUG]   vcpkg-cmake-config|cffe21ed6ec216c47cd5ca0479c55f279bde588413d421588b65f4b63e4d82e6
[DEBUG]   vcpkg.json|e9af5652f077b7e8f5272e39fdbc3040518f93e3632702579c49278130feac6d
[DEBUG]   vcpkg_copy_pdbs|d57e4f196c82dc562a9968c6155073094513c31e2de475694143d3aa47954b1c
[DEBUG]   vcpkg_fixup_pkgconfig|433d0d235b4e9f6c7bb8744a2f06a9f534b355da67d0d85b7c2daf15c8c77671
[DEBUG]   vcpkg_from_git|0aab20e34e84d52ba4763f009e539bfa8f418c41c918c8cf700156f1a8551a10
[DEBUG]   vcpkg_from_github|b743742296a114ea1b18ae99672e02f142c4eb2bef7f57d36c038bedbfb0502f
[DEBUG]   vcpkg_replace_string|d43c8699ce27e25d47367c970d1c546f6bc36b6df8fb0be0c3986eb5830bd4f1
[DEBUG] </abientries>
Restored 0 package(s) from c:\Users\gvane\AppData\Local\vcpkg\archives in 1.071 ms. Use --debug to see more details.
Installing 1/1 fmt:x64-windows...
Building fmt[core]:x64-windows...
[DEBUG] CreateProcessW("f:\MinGW32\bin\CMake3-24\bin\cmake.exe" -DALL_FEATURES= -DCURRENT_PORT_DIR=F:/gv/VC_project/VCPKG/ports/fmt -D_HOST_TRIPLET=x64-windows -DFEATURES=core -DPORT=fmt -DVCPKG_USE_HEAD_VERSION=0 -D_VCPKG_DOWNLOAD_TOOL=BUILT_IN -D_VCPKG_EDITABLE=0 -D_VCPKG_NO_DOWNLOADS=0 -DZ_VCPKG_CHAINLOAD_TOOLCHAIN_FILE=F:/gv/VC_project/VCPKG/scripts/toolchains/windows.cmake -DCMD=BUILD -DDOWNLOADS=F:/gv/VC_project/VCPKG/downloads -DTARGET_TRIPLET=x64-windows -DTARGET_TRIPLET_FILE=F:/gv/VC_project/VCPKG/triplets/x64-windows.cmake -DVCPKG_BASE_VERSION=2022-09-13 -DVCPKG_CONCURRENCY=25 -DVCPKG_PLATFORM_TOOLSET=v143 -DGIT=f:/ProgramFiler/Git-2/cmd/git.exe "-DVCPKG_PORT_CONFIGS=F:\gv\VC_project\VCPKG\installed\x64-windows\share\vcpkg-cmake\vcpkg-port-config.cmake;F:\gv\VC_project\VCPKG\installed\x64-windows\share\vcpkg-cmake-config\vcpkg-port-config.cmake" -DVCPKG_ROOT_DIR=F:/gv/VC_project/VCPKG -DPACKAGES_DIR=F:/gv/VC_project/VCPKG/packages -DBUILDTREES_DIR=F:/gv/VC_project/VCPKG/buildtrees -D_VCPKG_INSTALLED_DIR=F:/gv/VC_project/VCPKG/installed -DDOWNLOADS=F:/gv/VC_project/VCPKG/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P "F:\gv\VC_project\VCPKG\scripts\ports.cmake")
-- Using cached fmtlib-fmt-9.0.0.tar.gz.
-- Extracting source F:/gv/VC_project/VCPKG/downloads/fmtlib-fmt-9.0.0.tar.gz
-- Applying patch fix-write-batch.patch
-- Applying patch fix-format-conflict.patch
-- Using source at F:/gv/VC_project/VCPKG/buildtrees/fmt/src/9.0.0-4a62265d24.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
    Command failed: ninja -v
    Working Directory: F:/gv/VC_project/VCPKG/buildtrees/fmt/x64-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      F:\gv\VC_project\VCPKG\buildtrees\fmt\config-x64-windows-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:411 (vcpkg_execute_required_process)
  ports/fmt/portfile.cmake:12 (vcpkg_cmake_configure)
  scripts/ports.cmake:147 (include)

[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 1 after  1285925 us
error: building fmt:x64-windows failed with: BUILD_FAILED
[DEBUG] CreateProcessW("f:\ProgramFiler\Git-2\cmd\git.exe" "--git-dir=F:\gv\VC_project\VCPKG\.git" "--work-tree=F:\gv\VC_project\VCPKG\.git" -c core.autocrlf=false show "--pretty=format:%h %cd (%cr)" -s --date=short HEAD)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after    31391 us
[DEBUG] CreateProcessW("f:\ProgramFiler\Git-2\cmd\git.exe" "--git-dir=F:\gv\VC_project\VCPKG\.git" "--work-tree=F:\gv\VC_project\VCPKG\.git" -c core.autocrlf=false show "--pretty=format:%h %cd (%cr)" -s --date=short HEAD)
[DEBUG] ReadFile() finished with GetLastError(): 109
[DEBUG] 10016: cmd_execute_and_stream_data() returned 0 after    31796 us
error: Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+fmt
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[fmt]+Build+error
Include '[fmt] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: 2022-09-13-master
    vcpkg-scripts version: 23905f6f8 2022-09-12 (34 hours ago)

Please use the prefilled template from F:\gv\VC_project\VCPKG\installed\vcpkg\issue_body.md when reporting your issue.
[DEBUG] vcpkg/install.cpp(531):
[DEBUG] Time in subprocesses: 3491013 us
[DEBUG] Time in parsing JSON: 25945 us
[DEBUG] Time in JSON reader: 16450 us
[DEBUG] Time in filesystem: 16776 us
[DEBUG] Time in loading ports: 57401 us
[DEBUG] Exiting after 3.636 s (3631887 us)

Note, I sets up it's own PATH where the WinKit's bin is missing! How nice. Where is the source of this mess?

After the .NET framework installed, remember to reboot your computer

I have it; dotnet --info:

.NET SDK (reflecting any global.json):
 Version:   6.0.400
 Commit:    7771abd614

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19044
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.400\
...

It's just some issue with CMake (?) not using what's on the PATH.

FrankXie05 commented 2 years ago

I noticed that your system is win10-x64 but the sdk you downloaded is windows 11.

WinKit\include\10.0.22621.0

image

gvanem commented 2 years ago

Yes. That has worked for a long time. But you hinted me on the Control Panel. I simply selected Repair on this item:

winkit-repair

And after that, presto, vcpkg install .. worked! Gotta love this mess.

gvanem commented 2 years ago

I'm closing this issue. But oh man, what a confusing mess with the various installers in Microsoft product. E.g. there where no choice in the WinSDK-setup program to select the destination directory. Instead it blindly installed into a path (f:\Windows Kits) with spaces which I absolutely hate (causing problems for e.g. GNU-make).

I miss the old days (in e.g. Visual-C 2010) where all compiler and SDK files were nicely put under the same directory.

FrankXie05 commented 2 years ago

@gvanem We are improving this feature. You can submit a feedback to vs. I'm sure they'll take care of this. :)

gvanem commented 2 years ago

@FrankXie05 What do you mean with this feature exactly?

I'm sure they'll take care of this. :)

Yeah, right.

FrankXie05 commented 2 years ago

What I mean is about detecting whether the installation directory has spaces or specifying the installation directory when VS installs Windows-SDK. Obviously, it is not reflected in the installer. If there is this function, maybe we can avoid a lot of problems. :( Maybe there is this feature, I need to check with them