microsoft / vcpkg

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

[directxtk] build failure #32081

Closed Raildex closed 1 year ago

Raildex commented 1 year ago

Operating system

Windows 11 x64

Compiler

No specific compiler

Steps to reproduce the behavior

vcpkg install directxtk

Failure logs

PS C:\Users\rdx> vcpkg install directxtk
warning: Starting with the September 2023 release, the default triplet for vcpkg libraries will change from x86-windows to the detected host triplet (x64-windows). To resolve this message, add --triplet x86-windows to keep the same behavior.
Computing installation plan...
The following packages will be built and installed:
  * directxmath[core]:x86-windows -> 2022-12-12
    directxtk[core]:x86-windows -> 2023-04-28
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
Restored 0 package(s) from C:\Users\rdx\AppData\Local\vcpkg\archives in 123 us. Use --debug to see more details.
Installing 1/2 directxmath:x86-windows...
Building directxmath[core]:x86-windows...
-- Using cached Microsoft-DirectXMath-dec2022.tar.gz.
-- Cleaning sources at F:/vcpkg/buildtrees/directxmath/src/dec2022-15ed166403.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source F:/vcpkg/downloads/Microsoft-DirectXMath-dec2022.tar.gz
-- Using source at F:/vcpkg/buildtrees/directxmath/src/dec2022-15ed166403.clean
-- Found external ninja('1.11.0').
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: F:/vcpkg/packages/directxmath_x86-windows/share/directxmath/copyright
-- Performing post-build validation
Stored binary cache: "C:\Users\rdx\AppData\Local\vcpkg\archives\47\47703d898acd10bbe9164d95d7454003a687beef6b65794ebdcee5cc62e059b4.zip"
Elapsed time to handle directxmath:x86-windows: 1.7 s
Installing 2/2 directxtk:x86-windows...
Building directxtk[core]:x86-windows...
-- Note: directxtk only supports static library linkage. Building static library.
-- Using cached Microsoft-DirectXTK-apr2023.tar.gz.
-- Cleaning sources at F:/vcpkg/buildtrees/directxtk/src/apr2023-6ee4461477.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source F:/vcpkg/downloads/Microsoft-DirectXTK-apr2023.tar.gz
-- Using source at F:/vcpkg/buildtrees/directxtk/src/apr2023-6ee4461477.clean
-- Found external ninja('1.11.0').
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: D:/Programme/CMake/bin/cmake.exe --build . --config Debug --target install -- -v -j25
    Working Directory: F:/vcpkg/buildtrees/directxtk/x86-windows-dbg
    See logs for more information:
      F:\vcpkg\buildtrees\directxtk\install-x86-windows-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/directxtk/portfile.cmake:32 (vcpkg_cmake_install)
  scripts/ports.cmake:147 (include)

error: building directxtk:x86-windows failed with: BUILD_FAILED
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+directxtk
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?title=[directxtk]+Build+error&body=Copy+issue+body+from+F%3A%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
[0/42] cmd.exe /C "cd /D F:\vcpkg\buildtrees\directxtk\src\apr2023-6ee4461477.clean\Src\Shaders && D:\Programme\CMake\bin\cmake.exe -E env CompileShadersOutput="F:/vcpkg/buildtrees/directxtk/x86-windows-dbg/Shaders/Compiled" CompileShaders.cmd > F:/vcpkg/buildtrees/directxtk/x86-windows-dbg/Shaders/Compiled/compileshaders.log"
[2/42] "D:\Programme\Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x86\cl.exe"   /TP -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0601 -D_WIN7_PLATFORM_UPDATE -IF:\vcpkg\buildtrees\directxtk\x86-windows-dbg\Shaders\Compiled -IF:\vcpkg\buildtrees\directxtk\src\apr2023-6ee4461477.clean\Src -IF:\vcpkg\buildtrees\directxtk\src\apr2023-6ee4461477.clean\Inc -external:IF:\RaidEngine\vcpkg_installed\x86-windows\include\directxmath -external:W0 /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c++17 -MDd /Wall /GR /fp:fast /arch:SSE2 /sdl /permissive- /JMC- /Zc:__cplusplus /Zc:inline /ZH:SHA_256 /Zc:preprocessor /wd5105 /Zc:lambda /Zc:templateScope /Zc:checkGwOdr /wd5262 /YcF:/vcpkg/buildtrees/directxtk/x86-windows-dbg/CMakeFiles/DirectXTK.dir/cmake_pch.hxx /FpF:/vcpkg/buildtrees/directxtk/x86-windows-dbg/CMakeFiles/DirectXTK.dir/./cmake_pch.cxx.pch /FIF:/vcpkg/buildtrees/directxtk/x86-windows-dbg/CMakeFiles/DirectXTK.dir/cmake_pch.hxx /showIncludes /FoCMakeFiles\DirectXTK.dir\cmake_pch.cxx.obj /FdCMakeFiles\DirectXTK.dir\DirectXTK.pdb /FS -c F:\vcpkg\buildtrees\directxtk\x86-windows-dbg\CMakeFiles\DirectXTK.dir\cmake_pch.cxx
FAILED: CMakeFiles/DirectXTK.dir/cmake_pch.cxx.obj 
"D:\Programme\Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x86\cl.exe"   /TP -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0601 -D_WIN7_PLATFORM_UPDATE -IF:\vcpkg\buildtrees\directxtk\x86-windows-dbg\Shaders\Compiled -IF:\vcpkg\buildtrees\directxtk\src\apr2023-6ee4461477.clean\Src -IF:\vcpkg\buildtrees\directxtk\src\apr2023-6ee4461477.clean\Inc -external:IF:\RaidEngine\vcpkg_installed\x86-windows\include\directxmath -external:W0 /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -std:c++17 -MDd /Wall /GR /fp:fast /arch:SSE2 /sdl /permissive- /JMC- /Zc:__cplusplus /Zc:inline /ZH:SHA_256 /Zc:preprocessor /wd5105 /Zc:lambda /Zc:templateScope /Zc:checkGwOdr /wd5262 /YcF:/vcpkg/buildtrees/directxtk/x86-windows-dbg/CMakeFiles/DirectXTK.dir/cmake_pch.hxx /FpF:/vcpkg/buildtrees/directxtk/x86-windows-dbg/CMakeFiles/DirectXTK.dir/./cmake_pch.cxx.pch /FIF:/vcpkg/buildtrees/directxtk/x86-windows-dbg/CMakeFiles/DirectXTK.dir/cmake_pch.hxx /showIncludes /FoCMakeFiles\DirectXTK.dir\cmake_pch.cxx.obj /FdCMakeFiles\DirectXTK.dir\DirectXTK.pdb /FS -c F:\vcpkg\buildtrees\directxtk\x86-windows-dbg\CMakeFiles\DirectXTK.dir\cmake_pch.cxx
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(347): error C7527: 'TDelegateInterface': a template parameter name cannot be reused within its scope
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(345): note: see previous definition of 'TDelegateInterface'
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(347): error C7527: 'TArgs': a template parameter name cannot be reused within its scope
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(345): note: see previous definition of 'TArgs'
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(360): error C7527: 'TDelegateInterface': a template parameter name cannot be reused within its scope
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(345): note: see previous definition of 'TDelegateInterface'
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(375): error C7527: 'TDelegateInterface': a template parameter name cannot be reused within its scope
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(373): note: see previous definition of 'TDelegateInterface'
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(375): error C7527: 'TArgs': a template parameter name cannot be reused within its scope
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(373): note: see previous definition of 'TArgs'
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(388): error C7527: 'TDelegateInterface': a template parameter name cannot be reused within its scope
C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt\wrl\event.h(373): note: see previous definition of 'TDelegateInterface'
ninja: build stopped: subcommand failed.

Additional context

worked before I used git pull

MonicaLiu0311 commented 1 year ago

Sorry I didn't repro your issue.

PS F:\Monica\vcpkg> ./vcpkg install directxtk --binarysource=clear
Building directxtk:x86-windows...
-- Note: directxtk only supports static library linkage. Building static library.
-- Downloading https://github.com/Microsoft/DirectXTK/archive/apr2023.tar.gz -> Microsoft-DirectXTK-apr2023.tar.gz...
-- Extracting source F:/Monica/vcpkg/downloads/Microsoft-DirectXTK-apr2023.tar.gz
-- Using source at F:/Monica/vcpkg/buildtrees/directxtk/src/apr2023-6ee4461477.clean
-- Found external ninja('1.11.0').
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: F:/Monica/vcpkg/packages/directxtk_x86-windows/share/directxtk/copyright
-- Performing post-build validation
Elapsed time to handle directxtk:x86-windows: 59 s
Total install time: 1.2 min
directxtk provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(directxtk CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Microsoft::DirectXTK)

Execute the following command to update:

git pull https://github.com/microsoft/vcpkg.git master 
./bootstrap-vcpkg.bat

If there is a issue after updating, it is recommended that you reinstall Windows Kits 10.

MonicaLiu0311 commented 1 year ago

We haven't been able to repro this; if more information comes up, or this issue appears again, please reopen.