回复: [edk2-discuss] Build failures Windows10, VS2019


gaoliming
 

Have you full build log? You can check whether VfrCompile is compiled from
BaseTools source code or not.

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 Matthew
Carlson via groups.io
发送时间: 2021年8月18日 20:59
收件人: discuss@edk2.groups.io; dss.v1.0@gmail.com
主题: Re: [edk2-discuss] Build failures Windows10, VS2019

Hello Dan,

VfrCompile is a c based barstools and should be compiled (I think edk2
setup
does this). Do you see that? I think it will be under
Basetools/Source/C/bin

https://github.com/tianocore/edk2/blob/master/BaseTools/Bin/CYGWIN_NT
-5.1-i686/VfrCompile



On Aug 13, 2021, at 12:44 PM, dss.v1.0@gmail.com wrote:

Friends,

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:

```
(.venv)>edk2_build
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
PYTHON_COMMAND = py -3


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\Pl
atformVarCleanupLib.inf [X64]
"C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x64\cl.e
xe" /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\MdeM
odulePkg\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\BrotliCustomDecompre
ssLib\brotli\c\include
c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\PlatformVarCleanupLib\Pl
atVarCleanup.vfr >
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatV
arCleanup.i
Building ...
c:\users\dss\dev\mc\edk2\MdeModulePkg\Library\DxePrintLibPrint2Protocol
\DxePrintLibPrint2Protocol.inf [X64]
PlatVarCleanup.vfr
"VfrCompile" -l -n --string-db
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\Platf
ormVarCleanupLibStrDefs.hpk --output-directory
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\DEBUG\.
c:\users\dss\dev\mc\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeMod
ulePkg\Library\PlatformVarCleanupLib\PlatformVarCleanupLib\OUTPUT\PlatV
arCleanup.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'
Stop.
```

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,
https://pypi.org/project/edk2-basetools/ (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.
thanks,
Dan