Skip to content

[Bug]: UefiPayloadPkg cannot be built with VS2022 #11792

@parfant

Description

@parfant

Is there an existing issue for this?

  • I have searched existing issues

Bug Type

  • Firmware
  • Tool
  • Unit Test

What packages are impacted?

UefiPayloadPkg

Which targets are impacted by this bug?

RELEASE

Current Behavior

UefiPayloadPkg cannot be built with VS2022:
SECTION - Building UefiPayloadPkg Package PROGRESS - --Running UefiPayloadPkg: Compiler Plugin RELEASE -- PROGRESS - Start time: 2025-11-24 09:33:10.880282 PROGRESS - Setting up the Environment PROGRESS - Running Pre Build PROGRESS - Checking DEBUG Macros PROGRESS - Running Build RELEASE ERROR - Compiler #2220 from C:\edk2\CryptoPkg\Library\OpensslLib\openssl\crypto\bn\bn_gcd.c(659): the following warning is treated as an error WARNING - Compiler #4319 from C:\edk2\CryptoPkg\Library\OpensslLib\openssl\crypto\bn\bn_gcd.c(659): '~': zero extending 'unsigned int' to 'unsigned __int64' of greater size WARNING - Compiler #4319 from C:\edk2\CryptoPkg\Library\OpensslLib\openssl\crypto\bn\bn_gcd.c(671): '~': zero extending 'unsigned int' to 'unsigned __int64' of greater size ERROR - Compiler #1077 from NMAKE : fatal '"C:\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx86\x64\cl.exe" /FoC:\edk2\Build\UefiPayloadPkg\RELEASE_VS2022\X64\CryptoPkg\Library\OpensslLib\OpensslLib\OUTPUT\openssl\crypto\bn\ /showIncludes @C:\edk2\Build\UefiPayloadPkg\RELEASE_VS2022\X64\CryptoPkg\Library\OpensslLib\OpensslLib\OUTPUT\cc_resp.txt @C:\edk2\Build\UefiPayloadPkg\RELEASE_VS2022\X64\CryptoPkg\Library\OpensslLib\OpensslLib\OUTPUT\cc_resp_675.txt' : return code '0x2' ERROR - Compiler #7000 from : Failed to execute command ERROR - EDK2 #002 from : Failed to build module CRITICAL - Build failed PROGRESS - End time: 2025-11-24 09:34:06.402612 Total time Elapsed: 0:00:55 ERROR - --->Test Failed: Compiler Plugin RELEASE returned "1" ERROR - Overall Build Status: Error PROGRESS - There were 1 failures out of 1 attempts SECTION - Summary ERROR - Error

Complete build log:
BUILDLOG_UefiPayloadPkg.txt

Expected Behavior

UefiPayloadPkg should be buildable with VS2022.

Steps To Reproduce

Edk2 is built with Stuart.

Build command:
stuart_ci_build -c .pytool/CISettings.py TOOL_CHAIN_TAG=VS2022 -a X64 -t RELEASE

Build Environment

- OS(s): Windows 11
- Tool Chain(s): VS2022

Version Information

current edk2/master:
783a92f1eabbe8d30595bb713f70e841c52c6fab

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions