Re: Build failures Windows10, VS2019


Just to add yet another way and more info about how the CI does all this for every commit (I hate batch files and the junk in "edksetup")

If you follow this:

You can build CI which will build and test packages like MdeModulePkg.dsc and others.

But there is one missing step between step 4 and Step 5.
You need to build the edk2 basetools. My preferred method is:

python BaseTools/ -t VS2019

If you want to build a platform like OVMF or EmulatorPkg they also have files with pretty good details that include this required step.

Hope that helps.


On 8/13/2021 10:44 AM, wrote:
Does anyone have a link to a single and consistent description of a build of edk2 starting from scratch on a new Windows 10 machine using the python BaseTools etc? The several recipes I have tried have all ultimately failed me.
Currently this is my breaking point:
Build environment: Windows-10-10.0.19042-SP0
Build start time: 13:29:22, Aug.13 2021
WORKSPACE = c:\users\dss\dev\mc\edk2
EDK_TOOLS_PATH = c:\users\dss\dev\mc\edk2\basetools
EDK_TOOLS_BIN = c:\users\dss\dev\mc\edk2\basetools\bin\win32
CONF_PATH = c:\users\dss\dev\mc\edk2\conf
Processing meta-data
Architecture(s) = X64
Build target = DEBUG
.Toolchain = VS2019
Active Platform = c:\users\dss\dev\mc\edk2\MdeModulePkg\MdeModulePkg.dsc
(many inf's built here)
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib.inf [X64]
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x64\cl.exe" /showIncludes /nologo /E /TC /DVFRCOMPILE /FIPlatformVarCleanupLibStrDefs.h /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib /Ic:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG /Ic:\users\dss\dev\mc\edk2\MdePkg /Ic:\users\dss\dev\mc\edk2\MdePkg\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Test\UnitTest\Include /Ic:\users\dss\dev\mc\edk2\MdePkg\Include\X64 /Ic:\users\dss\dev\mc\edk2\MdeModulePkg /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Include /Ic:\users\dss\dev\mc\edk2\MdeModulePkg\Library\BrotliCustomDecompressLib\brotli\c\include c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\PlatVarCleanup.vfr > c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\DxePrintLibPrint2Protocol\DxePrintLibPrint2Protocol.inf [X64]
"VfrCompile" -l -n --string-db c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatformVarCleanupLibStrDefs.hpk --output-directory c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG\. c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatVarCleanup.i
Building ... c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PeiReportStatusCodeLib\PeiReportStatusCodeLib.inf [X64]
'VfrCompile' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: '"VfrCompile' : return code '0x1'
I have made a number of passes at it from various wiki's, README.rst's with no luck. Many months ago I chanced upon an install sequence that gave me a development workspace which would build .EFI apps, HelloWorld and such with some precompiled win32 basetools binaries. But that is now not reproducible.
Using the somewhat inconsistent instructions from the wiki, windows_build, (which humorously explains edk2-basetools is not on pyPI, yes I see it was just added). I also looked at the CI implementation, but it is so containerized I could not glean my path through it. Mathew Carlsons repo and comments in discussions have moved me much closer to success than I was. But as seen above that was still not enough for me.
Anyhow, any help is appreciated.

Join to automatically receive all group messages.