microsoft / vcpkg

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

[winpcap] Build error on x64-windows #35624

Closed zhiha closed 10 months ago

zhiha commented 11 months ago

Package: winpcap:x64-windows -> 4.1.3#12

Host Environment

To Reproduce

vcpkg install pcapplusplus Failure logs

-- Downloading https://www.winpcap.org/install/bin/WpcapSrc_4_1_3.zip -> WpcapSrc_4_1_3.zip...
-- Extracting source E:/vcpkg/downloads/WpcapSrc_4_1_3.zip
-- Applying patch E:/vcpkg/buildtrees/winpcap/src/packetNtx.patch
-- Applying patch E:/vcpkg/buildtrees/winpcap/src/wpcap.patch
-- Applying patch bison-flex.patch
-- Using source at E:/vcpkg/buildtrees/winpcap/src/4_1_3-12e43b82d9.clean
-- Downloading https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip -> win_flex_bison-2.5.25.zip...
-- Getting CMake variables for x64-windows
-- Building packetNtx/Dll/Project/Packet.sln for Release
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: msbuild E:/vcpkg/buildtrees/winpcap/x64-windows-rel/packetNtx/Dll/Project/Packet.sln /p:Configuration=Release /p:ForceImportAfterCppProps=E:/vcpkg/buildtrees/winpcap/x64-windows/vcpkg_msbuild.props /p:ForceImportAfterCppTargets=E:/vcpkg/buildtrees/winpcap/x64-windows/vcpkg_msbuild.targets /t:Rebuild /p:UseMultiToolTask=true /p:MultiProcMaxCount=13 /p:EnforceProcessCountAcrossBuilds=true /m:13 -maxCpuCount:13 /p:Platform=x64 /p:PlatformTarget=x64 /p:PlatformToolset=v143 /p:WindowsTargetPlatformVersion=10.0.22621.0 /p:VcpkgApplocalDeps=false /p:VcpkgManifestInstall=false /p:VcpkgManifestEnabled=false /p:VcpkgEnabled=false /p:VcpkgTriplet=x64-windows /p:VcpkgInstalledDir=E:/vcpkg/installed
    Working Directory: E:/vcpkg/buildtrees/winpcap/x64-windows-rel
    Error code: 1
    See logs for more information:
      E:\vcpkg\buildtrees\winpcap\build-x64-windows-rel-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-msbuild/vcpkg_msbuild_install.cmake:108 (vcpkg_execute_required_process)
  ports/winpcap/portfile.cmake:67 (vcpkg_msbuild_install)
  scripts/ports.cmake:170 (include)
E:\vcpkg\buildtrees\winpcap\build-x64-windows-rel-out.log ``` 适用于 .NET Framework MSBuild 版本 17.8.3+195e7f5a3 生成启动时间为 2023/12/12 19:38:48。 0>E:\vcpkg\buildtrees\winpcap\x64-windows-rel\packetNtx\Dll\Project\Packet.sln : error MSB4192: 项目文件“Packet.vcproj”为“.vcproj”文件格式,而 MSBuild 不再支持该格式。请通过在 Visual Studio IDE 中打开该项目或运行转换工具来转换该项目,或者使用 MSBuild 3.5 或早期版本来生成该项目。 生成失败。 E:\vcpkg\buildtrees\winpcap\x64-windows-rel\packetNtx\Dll\Project\Packet.sln : error MSB4192: 项目文件“Packet.vcproj”为“.vcproj”文件格式,而 MSBuild 不再支持该格式。请通过在 Visual Studio IDE 中打开该项目或运行转换工具来转换该项目,或者使用 MSBuild 3.5 或早期版本来生成该项目。 0 个警告 1 个错误 已用时间 00:00:00.03 ```
Cheney-W commented 11 months ago

I saw below contents in the winpcap\portfile.cmake which is meant to fix the issue you are encountering:

vcpkg_execute_required_process(
    COMMAND "devenv.exe"
            "Packet.sln"
            /Upgrade
    WORKING_DIRECTORY "${SOURCE_PATH}/packetNtx/Dll/Project"
    LOGNAME upgrade-Packet-${TARGET_TRIPLET}
)

Please check these two logs to determine if it failed and the reason for the failure:

upgrade-Packet-x64-windows-out.log
upgrade-Packet-x64-windows-err.log
JonLiu1993 commented 10 months ago

@zhiha, Does this issue still exist?