I am using EDK2 and Visual Studio 2019. I followed the instruction to set up EDKII build environment on Windows systems. After sending the following command "edksetup.bat Rebuild" on windows command line, I got the following message.
subprocess not exit successfully
Error while execute command 'nmake all' in direcotry C:\edk2\BaseTools\Source\C\BrotliCompress
...
LINK : fatal error LNK1181: Eingabedatei "brotli\c\tools\brotli.obj" kann nicht geffnet werden.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\link.exe"": Rckgabe-Code "0x49d"
Stop.
NMAKE : fatal error U1077: "if": Rückgabe-Code "0x1"
Stop.
NMAKE : fatal error U1077: "if": Rückgabe-Code "0x1"
Stop.
Is it because Of Visual Studio 2019 compatibility or is there any problem with "BrotliCompress"? I changed the tag to TOOL_CHAIN_TAG = VS2019x86. But it did not work. What else should I change for VS2019 compatibility? Is anything to do with NMAKE file?
I tested an older version of EDK2 and it works. But the problem is I am using VS2019 and I want to use edk2-stable201911. The older version (edk2-stable201908) can support up to VS2017 only. In tools_de.txt there is no "common path macros" for VS2019. The above error is result of using edk2-stable201911
You need to check out (and build) the various submodules.
Run
git submodule update --init
in your edk2 directory and you should get output similar to this:You may also need to compile stuff first; I don't know how to do it on Windows, but
make -C <path-to-edk2>/BaseTools/Source/C
is the ticket in Linux.Once both of these are done you should be able to successfully build EDK2!