microsoft / vcpkg

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

[crashrpt] Build failure #33470

Open autoantwort opened 1 year ago

autoantwort commented 1 year ago

Package: crashrpt:x64-windows -> 1.4.3#3

Host Environment

To Reproduce

vcpkg x-set-installed crashrpt[core] Failure logs

-- Using cached C:/v/downloads/crashrpt-4616504670be5a425a525376648d912a72ce18f2.tar.gz
-- Extracting source C:/v/downloads/crashrpt-4616504670be5a425a525376648d912a72ce18f2.tar.gz
-- Applying patch 001-add-install-target-and-find-deps.patch
-- Applying patch 002-fix-wtl-includepath.patch
-- Applying patch 003-add-definition-UNICODE.patch
-- Using source at C:/v/vcpkg1/buildtrees/crashrpt/src/2a72ce18f2-209c457b5f.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: C:/v/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j21
    Working Directory: C:/v/vcpkg1/buildtrees/crashrpt/x64-windows-dbg
    See logs for more information:
      C:\v\vcpkg1\buildtrees\crashrpt\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  vcpkg_installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  vcpkg_installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/crashrpt/portfile.cmake:45 (vcpkg_cmake_install)
  scripts/ports.cmake:147 (include)
C:\v\vcpkg1\buildtrees\crashrpt\install-x64-windows-dbg-out.log ``` Change Dir: 'C:/v/vcpkg1/buildtrees/crashrpt/x64-windows-dbg' Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v -v -j21 install [1/36] C:/v/DOWNLO~1/tools/CMAKE-~1.1-W/CMAKE-~1.1-W/bin/cmcldeps.exe RC C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\CrashRpt.rc reporting\crashrpt\CMakeFiles\CrashRpt.dir\CrashRpt.rc.res.d reporting\crashrpt\CMakeFiles\CrashRpt.dir\CrashRpt.rc.res "Note: including file: " "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe -DCrashRpt_EXPORTS -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -I C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -I C:\v\vcpkg1\vcpkg_installed\x64-windows\include -c65001 /DWIN32 -D_DEBUG /fo reporting\crashrpt\CMakeFiles\CrashRpt.dir\CrashRpt.rc.res C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\CrashRpt.rc [2/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /wd4127 /wd4131 /wd4100 /wd4189 /wd4244 /showIncludes /Fothirdparty\minizip\CMakeFiles\minizip.dir\ioapi.c.obj /Fdthirdparty\minizip\CMakeFiles\minizip.dir\minizip.pdb /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\ioapi.c [3/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /wd4127 /wd4131 /wd4100 /wd4189 /wd4244 /showIncludes /Fothirdparty\minizip\CMakeFiles\minizip.dir\zip.c.obj /Fdthirdparty\minizip\CMakeFiles\minizip.dir\minizip.pdb /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\zip.c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\zip.c(1248): warning C4057: '=': 'const unsigned long *' differs in indirection to slightly different base types from 'const z_crc_t *' [4/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /wd4127 /wd4131 /wd4100 /wd4189 /wd4244 /showIncludes /Fothirdparty\minizip\CMakeFiles\minizip.dir\unzip.c.obj /Fdthirdparty\minizip\CMakeFiles\minizip.dir\minizip.pdb /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\unzip.c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\unzip.c(1041): warning C4456: declaration of 'uL' hides previous local declaration C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\unzip.c(896): note: see declaration of 'uL' [5/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /wd4127 /wd4131 /wd4100 /wd4189 /wd4244 /showIncludes /Fothirdparty\minizip\CMakeFiles\minizip.dir\mztools.c.obj /Fdthirdparty\minizip\CMakeFiles\minizip.dir\minizip.pdb /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\mztools.c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\mztools.c(139): warning C4456: declaration of 'header' hides previous local declaration C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\mztools.c(44): note: see declaration of 'header' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\mztools.c(214): warning C4456: declaration of 'header' hides previous local declaration C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\mztools.c(44): note: see declaration of 'header' [6/36] C:/v/DOWNLO~1/tools/CMAKE-~1.1-W/CMAKE-~1.1-W/bin/cmcldeps.exe RC C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\CrashSender.rc reporting\crashsender\CMakeFiles\CrashSender.dir\CrashSender.rc.res.d reporting\crashsender\CMakeFiles\CrashSender.dir\CrashSender.rc.res "Note: including file: " "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe -DUNICODE -D_UNICODE -I C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -I C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -I C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -I C:\v\vcpkg1\vcpkg_installed\x64-windows\include -c65001 /DWIN32 -D_DEBUG /fo reporting\crashsender\CMakeFiles\CrashSender.dir\CrashSender.rc.res C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\CrashSender.rc [7/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\md5.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\md5.cpp C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\md5.cpp(1): warning C4828: The file contains a character starting at offset 0x2e2 that is illegal in the current source character set (codepage 65001). C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\md5.h(1): warning C4828: The file contains a character starting at offset 0x2e2 that is illegal in the current source character set (codepage 65001). [8/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /wd4127 /wd4131 /wd4100 /wd4189 /wd4244 /showIncludes /Fothirdparty\minizip\CMakeFiles\minizip.dir\iowin32.c.obj /Fdthirdparty\minizip\CMakeFiles\minizip.dir\minizip.pdb /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip\iowin32.c [9/36] cmd.exe /C "cd . && C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\lib.exe /machine:x64 /nologo /out:thirdparty\lib\x64\minizipd.lib thirdparty\minizip\CMakeFiles\minizip.dir\ioapi.c.obj thirdparty\minizip\CMakeFiles\minizip.dir\iowin32.c.obj thirdparty\minizip\CMakeFiles\minizip.dir\mztools.c.obj thirdparty\minizip\CMakeFiles\minizip.dir\unzip.c.obj thirdparty\minizip\CMakeFiles\minizip.dir\zip.c.obj && cd ." [10/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\base64.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\base64.cpp [11/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DCrashRpt_EXPORTS -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\vcpkg_installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /Os /Yc"stdafx.h" /Fp"C:/v/vcpkg1/buildtrees/crashrpt/x64-windows-dbg/reporting/crashrpt/./stdafx.pch" /showIncludes /Foreporting\crashrpt\CMakeFiles\CrashRpt.dir\StdAfx.cpp.obj /Fdreporting\crashrpt\CMakeFiles\CrashRpt.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\StdAfx.cpp FAILED: reporting/crashrpt/CMakeFiles/CrashRpt.dir/StdAfx.cpp.obj C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DCrashRpt_EXPORTS -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\vcpkg_installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /Os /Yc"stdafx.h" /Fp"C:/v/vcpkg1/buildtrees/crashrpt/x64-windows-dbg/reporting/crashrpt/./stdafx.pch" /showIncludes /Foreporting\crashrpt\CMakeFiles\CrashRpt.dir\StdAfx.cpp.obj /Fdreporting\crashrpt\CMakeFiles\CrashRpt.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\StdAfx.cpp C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\StdAfx.cpp(5): error C2850: 'PCH header file': only allowed at file scope; may not be in a nested construct C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h(48): note: this line contains a '{' which has not yet been matched C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h(48): fatal error C1075: '{': no matching token found [12/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\__\crashrpt\Utility.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp FAILED: reporting/crashsender/CMakeFiles/CrashSender.dir/__/crashrpt/Utility.cpp.obj C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\__\crashrpt\Utility.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(24): warning C4190: 'getAppName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(27): warning C4190: 'getTempFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(33): warning C4190: 'GetModulePath' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(36): warning C4190: 'GetModuleName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(60): warning C4190: 'ReplaceInvalidCharsInFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(66): warning C4190: 'GetINIString' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(75): warning C4190: 'FormatErrorMsg' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(78): warning C4190: 'GetFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(81): warning C4190: 'GetBaseFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(84): warning C4190: 'GetFileExtension' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(90): warning C4190: 'GetProductVersion' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(100): warning C4190: 'FileSizeToStr' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(103): warning C4190: 'AddEllipsis' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(106): error C2526: 'ExplodeStr': C linkage function cannot return C++ class 'std::vector>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(106): note: see declaration of 'std::vector>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(22): warning C4190: 'getAppName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(35): warning C4190: 'GetModuleName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(44): warning C4190: 'GetModulePath' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(78): warning C4190: 'getTempFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(295): warning C4190: 'ReplaceInvalidCharsInFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(335): warning C4190: 'GetINIString' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(379): warning C4190: 'FormatErrorMsg' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(393): warning C4190: 'GetFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(405): warning C4190: 'GetBaseFileName' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(422): warning C4190: 'GetFileExtension' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(433): warning C4190: 'GetProductVersion' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(511): warning C4190: 'FileSizeToStr' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(549): warning C4190: 'AddEllipsis' has C-linkage specified, but returns UDT 'ATL::CStringT>>' which is incompatible with C C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include\atlstr.h(1285): note: see declaration of 'ATL::CStringT>>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.cpp(563): error C2526: 'Utility::ExplodeStr': C linkage function cannot return C++ class 'std::vector>' C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\Utility.h(106): note: see declaration of 'std::vector>' C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h(48): fatal error C1075: '{': no matching token found [13/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\__\crashrpt\SharedMem.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\SharedMem.cpp FAILED: reporting/crashsender/CMakeFiles/CrashSender.dir/__/crashrpt/SharedMem.cpp.obj C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\__\crashrpt\SharedMem.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashrpt\SharedMem.cpp C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h(48): fatal error C1075: '{': no matching token found [14/36] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /Yc"stdafx.h" /Fp"C:/v/vcpkg1/buildtrees/crashrpt/x64-windows-dbg/reporting/crashsender/./stdafx.pch" /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\stdafx.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\stdafx.cpp FAILED: reporting/crashsender/CMakeFiles/CrashSender.dir/stdafx.cpp.obj C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_UNICODE -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\include -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\CrashRpt -IC:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\thirdparty\minizip -external:IC:\v\vcpkg1\vcpkg_installed\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS -W4 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /Yc"stdafx.h" /Fp"C:/v/vcpkg1/buildtrees/crashrpt/x64-windows-dbg/reporting/crashsender/./stdafx.pch" /showIncludes /Foreporting\crashsender\CMakeFiles\CrashSender.dir\stdafx.cpp.obj /Fdreporting\crashsender\CMakeFiles\CrashSender.dir\ /FS -c C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\stdafx.cpp C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\Wspiapi.h(53): error C2894: templates cannot be declared to have 'C' linkage C:\v\vcpkg1\buildtrees\crashrpt\src\2a72ce18f2-209c457b5f.clean\reporting\crashsender\stdafx.cpp(14): error C2850: 'PCH header file': only allowed at file scope; may not be in a nested construct C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h(48): note: this line contains a '{' which has not yet been matched C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h(48): fatal error C1075: '{': no matching token found ninja: build stopped: subcommand failed. ```
**Additional context**
vcpkg.json ``` { "name": "e", "version": "1.0.0", "dependencies": [ { "name": "shiftmedia-libgnutls", "features": [] } ] } ```
Cheney-W commented 1 year ago

I can't reproduce this issue in my side with the latest vcpkg 2023-08-09-9990a4c9026811a312cb2af78bf77f3d9d288416, crashrpt:x64-windows could be installed successfully. I used Visual Studio 2022 17.6.6 and Windows SDK 10.0.22621.0.

autoantwort commented 1 year ago

I use Visual Studio 2022 17.7.3. that seems to be the only difference

Cheney-W commented 1 year ago

I've upgraded my VS to 17.7.3, but I still can't reproduce your issue. From the error log, it seems the problem occurs in StdAfx.cpp and dbghelp.h. Could you send me these two files?

autoantwort commented 1 year ago

dbghelp.h stdafx.h

Cheney-W commented 1 year ago

I compared my file with yours, and it turns out that both files have differences. For dbghelp.h, I installed it through the change button shown in the picture below. I'm not sure which version you installed. image

For stdafx.h, I think you can delete the old records locally and then reinstall port.

autoantwort commented 1 year ago

dbghelp.h is from C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h and stdafx.h from the upstream project

image
Cheney-W commented 1 year ago

I apologize, I thought you sent the files from reporting\crashrpt, but it turns out they're from reporting\crashsender. I've compared it with my local reporting\crashsender\stdafx.h and it appears that we are using the same version, which rules out the possibility of differing sources. Now, the only thing left is the dbghelp.h file. Based on the following code:

vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_get_windows_sdk(WINDOWS_SDK)

if (WINDOWS_SDK VERSION_GREATER "10")
    set(LIBFILEPATH "$ENV{WindowsSdkDir}Debuggers\\lib\\${TRIPLET_SYSTEM_ARCH}\\dbghelp.lib")
    message("LIBFILEPATH: ${LIBFILEPATH}")
    set(DLLFILEPATH "$ENV{WindowsSdkDir}Debuggers\\${TRIPLET_SYSTEM_ARCH}\\dbghelp.dll")
    message("DLLFILEPATH: ${DLLFILEPATH}")
    set(HEADERPATH "$ENV{WindowsSdkDir}Debuggers\\inc\\dbghelp.h")
    message("HEADERPATH: ${HEADERPATH}")
else()
    message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
endif()

if (NOT EXISTS "${LIBFILEPATH}" OR NOT EXISTS "${DLLFILEPATH}" OR NOT EXISTS "${HEADERPATH}")
    message(FATAL_ERROR "Cannot find debugging tools in Windows SDK ${WINDOWS_SDK}. Please reinstall the Windows SDK and select \"Debugging Tools\".")
endif()

file(INSTALL ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${DLLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${DLLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
file(INSTALL ${HEADERPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/include)

file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license")

C:\v\vcpkg1\vcpkg_installed\x64-windows\include\dbghelp.h is from "$ENV{WindowsSdkDir}Debuggers\\inc\\dbghelp.h". Could you please check which Windows SDK your file comes from?

autoantwort commented 1 year ago
image

Should be the only windows sdk that I have installed

Cheney-W commented 1 year ago

You've installed this version of the Windows SDK through the VS installer, but it doesn't necessarily mean that your debugging tool is of the same version. The debugging tool doesn't get installed by default along with the SDK; it requires manual installation. This is illustrated in the screenshot I provided earlier. You need to click the "change" button corresponding to the Windows SDK, and then install the debugging tool from the component list within. image

If you haven't performed this action for the current Windows SDK, it indicates that your debugging tool isn't corresponding to the current SDK version. This is also the reason why our dbghelp.h file contents differ.

autoantwort commented 1 year ago

I have verified that the dbghelp.h file is from the mentioned windows sdk

github-actions[bot] commented 11 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] commented 10 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

asantoni commented 10 months ago

I have this issue as well, with the same compiler error as in the original bug report.

From Add/Remove programs, I can see I have the "X64 Debuggers And Tools" version 10.1.17763.132 installed (2022-09-19). I think this is the origin of the dbghelp.h header, which ends up in the vcpkg include directory. I think that because I can see this in the log from the dbghelp package at ${my_build_dir}\vcpkg\buildtrees\dbghelp\stdout-x64-windows.log:

LIBFILEPATH: C:\Program Files (x86)\Windows Kits\10\Debuggers\lib\x64\dbghelp.lib
DLLFILEPATH: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll
HEADERPATH: C:\Program Files (x86)\Windows Kits\10\Debuggers\inc\dbghelp.h
-- Installing: D:/build-win/vcpkg/packages/dbghelp_x64-windows/lib/dbghelp.lib
-- Installing: D:/build-win/vcpkg/packages/dbghelp_x64-windows/debug/lib/dbghelp.lib
-- Installing: D:/build-win/vcpkg/packages/dbghelp_x64-windows/bin/dbghelp.dll
-- Installing: D:/build-win/vcpkg/packages/dbghelp_x64-windows/debug/bin/dbghelp.dll
-- Installing: D:/build-win/vcpkg/packages/dbghelp_x64-windows/include/dbghelp.h
-- Performing post-build validation

So it looks like the "dbghelp" vcpkg port just copies those files from your system-wide installation.

If I look at the actual compile error (same as OP) and check dbghelp.h line 48, I see:

#ifdef __cplusplus
extern "C" {
#endif

The problem is there's no matching #ifdef to close this, so the compiler is right.

... and using that info to google, I came across this bug, which means this has been a recurring issue: https://github.com/microsoft/vcpkg/issues/28205

I worked around this problem by hacking ${my_build_dir}\vcpkg_installed\x64-windows\include\dbghelp.h and inserting this near the end at line 3915:

//Hack to fix compile error for crashrpt 
#ifdef __cplusplus
}
#endif