public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"xzavierpower@gmail.com" <xzavierpower@gmail.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] Windows 10 build failing
Date: Thu, 16 Jun 2022 20:17:30 +0000	[thread overview]
Message-ID: <CO1PR11MB49292B029D2DF782178EC6DDD2AC9@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAEsd5RufG2mh1wRkjRVTcY6VJPbO_-qbQCBvmC=ZH1NJSYkYww@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 14763 bytes --]

A couple things to get a clean log


  1.  Try removing your Build dir so we know it is a clean build
  2.  Use -n 1 option to disable mp build so the log is easier to follow
  3.  Use -j logfile.txt option to generate a complete log file

Mike

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of M.T.
Sent: Thursday, June 16, 2022 12:07 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>
Cc: devel@edk2.groups.io
Subject: Re: [edk2-devel] Windows 10 build failing

I get NASM version 2.15 compiled on Jun 27 2020

I bumped it up to the same version you have just in case, several attempts in build and recompiling results in the original error where BrotliCustomDecompressLib fails, but I also now see these two:

Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\SmmReportStatusCodeLib\SmmReportStatusCodeLib.inf [X64]
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_malloc.h(103): error C2220: warning treated as error - no 'object' file generated
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_malloc.h(103): warning C4559: 'BrDummyMalloc': redefinition; the function gains __declspec(restrict)
Building ... c:\users\maciej\uefi\edk2\StandaloneMmPkg\Library\StandaloneMmMemLib\StandaloneMmMemLib.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\UefiSortLib\UefiSortLib.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\PiSmmCoreMemoryAllocationLib\PiSmmCoreMemoryAllocationProfileLib.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\LockBoxNullLib\LockBoxNullLib.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\DxeDebugPrintErrorLevelLib\DxeDebugPrintErrorLevelLib.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\ResetUtilityLib\ResetUtilityLib.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\RuntimeDxeReportStatusCodeLib\RuntimeDxeReportStatusCodeLib.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\BaseResetSystemLibNull\BaseResetSystemLibNull.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\PlatformBootManagerLibNull\PlatformBootManagerLibNull.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\DisplayUpdateProgressLibText\DisplayUpdateProgressLibText.inf [X64]
transform.c
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\PeiDebugLibDebugPpi\PeiDebugLibDebugPpi.inf [X64]
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\DxePrintLibPrint2Protocol\DxePrintLibPrint2Protocol.inf [X64]
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe"' : return code '0x2'
Stop.
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\DxePerformanceLib\DxePerformanceLib.inf [X64]


build.py...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe /nologo tbuild [c:\users\maciej\uefi\edk2\Build\MdeM
odule\DEBUG_VS2017\X64\MdeModulePkg\Library\BrotliCustomDecompressLib\BrotliCustomDecompressLib]


build.py...
 : error F002: Failed to build module
        c:\users\maciej\uefi\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\BrotliCustomDecompressLib.inf [X64, VS2017, DEBUG]

- Failed -

And

CpuBreakpoint.c
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe" /Foc:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS
2017\X64\MdePkg\Library\BasePeCoffExtraActionLibNull\BasePeCoffExtraActionLibNull\OUTPUT\.\ /showIncludes /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen
.h /EHs-c- /GR- /GF /Z7 /Gw /Ic:\users\maciej\uefi\edk2\MdePkg\Library\BasePeCoffExtraActionLibNull  /Ic:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Librar
y\BasePeCoffExtraActionLibNull\BasePeCoffExtraActionLibNull\DEBUG  /Ic:\users\maciej\uefi\edk2\MdePkg  /Ic:\users\maciej\uefi\edk2\MdePkg\Include  /Ic:\users\maciej\uefi\edk2\
MdePkg\Test\UnitTest\Include  /Ic:\users\maciej\uefi\edk2\MdePkg\Include\X64 c:\users\maciej\uefi\edk2\MdePkg\Library\BasePeCoffExtraActionLibNull\PeCoffExtraActionLib.c
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe"' : return code '0x2'
Stop.
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\lib.exe" /NOLOGO /LTCG /OUT:c:\users\maciej\uefi\edk2\Build\M
deModule\DEBUG_VS2017\X64\MdePkg\Library\BaseCacheMaintenanceLib\BaseCacheMaintenanceLib\OUTPUT\BaseCacheMaintenanceLib.lib @c:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS
2017\X64\MdePkg\Library\BaseCacheMaintenanceLib\BaseCacheMaintenanceLib\OUTPUT\object_files.lst


build.py...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe /nologo tbuild [c:\users\maciej\uefi\edk2\Build\MdeM
odule\DEBUG_VS2017\X64\MdeModulePkg\Library\BrotliCustomDecompressLib\BrotliCustomDecompressLib]


build.py...
 : error F002: Failed to build module
        c:\users\maciej\uefi\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\BrotliCustomDecompressLib.inf [X64, VS2017, DEBUG]


It seems to be bouncing between these errors, any idea what is going on here?

Thank you
xp

On Thu, Jun 16, 2022 at 2:53 PM Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>> wrote:
Which version of NASM do you have installed?  When I run nasm -v, I get the following:

NASM version 2.15.05 compiled on Aug 28 2020

Mike

From: M.T. <xzavierpower@gmail.com<mailto:xzavierpower@gmail.com>>
Sent: Thursday, June 16, 2022 11:44 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: Re: [edk2-devel] Windows 10 build failing

Thanks Michael

I did run git submodule update --init when I checked out the repo.
I ran it again, and now I'm bouncing between two errors, the original I posted, and when I run build again, I get this, which I thought was addressed with nasm 2.15, what am I missing here?

Appreciate the help
xp

Building ... c:\users\maciej\uefi\edk2\MdePkg\Library\SmmMemLib\SmmMemLib.inf [X64]
dictionary.c
        "C:\nasm\nasm" -Ic:\users\maciej\uefi\edk2\MdePkg\Library\BaseLib\X64\ -Ic:\users\maciej\uefi\edk2\MdePkg\Library\BaseLib\X64\  -Ic:\users\maciej\uefi\edk2\MdePkg\Libr
ary\BaseLib\  -Ic:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib\DEBUG\  -Ic:\users\maciej\uefi\edk2\MdePkg\  -Ic:\users\maciej\uefi\e
dk2\MdePkg\Include\  -Ic:\users\maciej\uefi\edk2\MdePkg\Test\UnitTest\Include\  -Ic:\users\maciej\uefi\edk2\MdePkg\Include\X64\ -Ox -f win64 -g -o c:\users\maciej\uefi\edk2\Bu
ild\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib\OUTPUT\X64\LongJump.obj c:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib
\OUTPUT\X64\LongJump.iii
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\PeiCrc32GuidedSectionExtractLib\PeiCrc32GuidedSectionExtractLib.inf [X64]
c:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib\OUTPUT\X64\LongJump.iii:44: error: parser: instruction expected
c:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib\OUTPUT\X64\LongJump.iii:49: error: parser: instruction expected
NMAKE : fatal error U1077: 'C:\nasm\nasm.EXE' : return code '0x1'
Stop.
Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\SmmReportStatusCodeLib\SmmReportStatusCodeLib.inf [X64]


build.py...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe /nologo tbuild [c:\users\maciej\uefi\edk2\Build\MdeM
odule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib]


build.py...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe /nologo tbuild [c:\users\maciej\uefi\edk2\Build\MdeM
odule\DEBUG_VS2017\X64\MdeModulePkg\Library\BrotliCustomDecompressLib\BrotliCustomDecompressLib]


build.py...
 : error F002: Failed to build module
        c:\users\maciej\uefi\edk2\MdePkg\Library\BaseLib\BaseLib.inf [X64, VS2017, DEBUG]


On Thu, Jun 16, 2022 at 2:11 PM Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>> wrote:
Looks like Brotli submodule code is missing.

https://github.com/tianocore/edk2#submodules

Mike

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of M.T.
Sent: Thursday, June 16, 2022 11:09 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [edk2-devel] Windows 10 build failing

Hello

I am trying to setup a windows build system with MSVS2017 or MSVS2022, but I keep running into the same issue over and over, and I can't seem to figure it out.

I followed several guides on how to get everything working, but also, I can't build MdeModulePkg, which on linux was nowhere near this difficult.

In any case, here is what I have so far.
From a regular command prompt, I setup my paths for NASM_Prefix (Version 2.15), WORKSPACE, PACKAGE_PATHS and EDK_TOOLS_PATH
I run edk2setup.bat, which gives warnings about CLANG_BIN and CYGWIN_HOME, I ignore those, and then I run build.
(Python is 3.9.4)
target.txt is switched to TOOL_CHAIN_TAG = VS2017 and TARGET_ARCH= X64
This is what I always hit, no matter how many variations of the above I try including python venvs etc.

Building ... c:\users\maciej\uefi\edk2\MdeModulePkg\Library\SmmLockBoxLib\SmmLockBoxPeiLib.inf [X64]
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe" /Foc:\users\ma
ciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib\OUTPUT\X64\ /showIncludes /nologo /c /WX /GS- /W4 /Gs3276
8 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /Ic:\users\maciej\uefi\edk2\MdePkg\Library\BaseLib\X64  /Ic:\users\mac
iej\uefi\edk2\MdePkg\Library\BaseLib  /Ic:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib\DEBUG
 /Ic:\users\maciej\uefi\edk2\MdePkg  /Ic:\users\maciej\uefi\edk2\MdePkg\Include  /Ic:\users\maciej\uefi\edk2\MdePkg\Test\UnitTest\Includ
e  /Ic:\users\maciej\uefi\edk2\MdePkg\Include\X64 @c:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\Bas
eLib\OUTPUT\cc_resp_56.txt
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl
.exe"' : return code '0x2'
Stop.
PeCoffExtraActionLib.c
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe" /Foc:\users\ma
ciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdeModulePkg\Library\PlatformHookLibSerialPortPpi\PlatformHookLibSerialPortPpi\OUTPUT\.\
 /showIncludes /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /Ic:\users\maciej\uefi\e
dk2\MdeModulePkg\Library\PlatformHookLibSerialPortPpi  /Ic:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdeModulePkg\Library
\PlatformHookLibSerialPortPpi\PlatformHookLibSerialPortPpi\DEBUG  /Ic:\users\maciej\uefi\edk2\MdePkg  /Ic:\users\maciej\uefi\edk2\MdePkg
\Include  /Ic:\users\maciej\uefi\edk2\MdePkg\Test\UnitTest\Include  /Ic:\users\maciej\uefi\edk2\MdePkg\Include\X64  /Ic:\users\maciej\ue
fi\edk2\MdeModulePkg  /Ic:\users\maciej\uefi\edk2\MdeModulePkg\Include  /Ic:\users\maciej\uefi\edk2\MdeModulePkg\Library\BrotliCustomDec
ompressLib\brotli\c\include c:\users\maciej\uefi\edk2\MdeModulePkg\Library\PlatformHookLibSerialPortPpi\PlatformHookLibSerialPortPpi.c
        "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe" /Foc:\users\ma
ciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdeModulePkg\Library\VarCheckPolicyLib\VarCheckPolicyLibStandaloneMm\OUTPUT\.\ /showIncl
udes /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /Ic:\users\maciej\uefi\edk2\MdeMod
ulePkg\Library\VarCheckPolicyLib  /Ic:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdeModulePkg\Library\VarCheckPolicyLib\Va
rCheckPolicyLibStandaloneMm\DEBUG  /Ic:\users\maciej\uefi\edk2\MdePkg  /Ic:\users\maciej\uefi\edk2\MdePkg\Include  /Ic:\users\maciej\uef
i\edk2\MdePkg\Test\UnitTest\Include  /Ic:\users\maciej\uefi\edk2\MdePkg\Include\X64  /Ic:\users\maciej\uefi\edk2\MdeModulePkg  /Ic:\user
s\maciej\uefi\edk2\MdeModulePkg\Include  /Ic:\users\maciej\uefi\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\brotli\c\include  /I
c:\users\maciej\uefi\edk2\StandaloneMmPkg  /Ic:\users\maciej\uefi\edk2\StandaloneMmPkg\Include @c:\users\maciej\uefi\edk2\Build\MdeModul
e\DEBUG_VS2017\X64\MdeModulePkg\Library\VarCheckPolicyLib\VarCheckPolicyLibStandaloneMm\OUTPUT\cc_resp_1.txt


build.py...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe /nologo tbuil
d [c:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdeModulePkg\Library\BrotliCustomDecompressLib\BrotliCustomDecompressLib]


build.py...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe /nologo tbuil
d [c:\users\maciej\uefi\edk2\Build\MdeModule\DEBUG_VS2017\X64\MdePkg\Library\BaseLib\BaseLib]


build.py...
 : error F002: Failed to build module
        c:\users\maciej\uefi\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\BrotliCustomDecompressLib.inf [X64, VS2017, DEBUG]

- Failed -
Build end time: 13:55:06, Jun.16 2022
Build total time: 00:00:13

I am not sure what this error is:
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl
.exe"' : return code '0x2'

I tried tracking it down, but I'm just not familiar enough with edk2 build env to sort it all out.

I would really appreciate some help as I'm totally stuck with this.

Thank you
xp


[-- Attachment #2: Type: text/html, Size: 66171 bytes --]

  reply	other threads:[~2022-06-16 20:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 18:08 Windows 10 build failing M.T.
2022-06-16 18:11 ` [edk2-devel] " Michael D Kinney
2022-06-16 18:43   ` M.T.
2022-06-16 18:53     ` Michael D Kinney
2022-06-16 19:06       ` M.T.
2022-06-16 20:17         ` Michael D Kinney [this message]
     [not found]       ` <16F92F5BB85EDA30.4074@groups.io>
2022-06-16 20:19         ` M.T.
2022-06-17  3:05           ` Kilian Kegel
2022-06-17 13:58             ` M.T.
2022-06-17 16:52               ` Kilian Kegel
     [not found]             ` <16F96D218CEB30DA.10812@groups.io>
2022-06-17 16:55               ` M.T.
2022-06-17 18:11                 ` Andrew Fish
2022-06-17 19:02                   ` M.T.
2022-06-19 18:02           ` aditya.bhutada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO1PR11MB49292B029D2DF782178EC6DDD2AC9@CO1PR11MB4929.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox