From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, ryderkeys@proton.me
Cc: Sean Brogan <sean.brogan@microsoft.com>
Subject: Re: [edk2-devel] BaseTools KeyError When Building EmulatorPkg
Date: Tue, 21 Nov 2023 17:22:04 +0100 [thread overview]
Message-ID: <4b054861-5558-c9c8-0850-281abb9ac6e5@redhat.com> (raw)
In-Reply-To: <pvmT3_LlcrVDZnCxSysdERtNbeLZtQ5Zorg3Oir4MldzLAF2zF5sHcoJr-HaKo90vUHdz0hXb_tknKVAEzQui07wzimZSKZlzEuhwz4m-MA=@proton.me>
Adding Sean
Laszlo
On 11/19/23 23:43, ryderkeys via groups.io wrote:
> Hi all,
>
> I am trying to build EDK2 from most recent Github (namely, EmulatorPkg) with the new Stuart build system on Windows 10 22H2 64 bit with VS 2019. I'm getting the following error which directed me to this mailing list. More details on my build process below.
>
> INFO - build.py...
> INFO - : error C0DE: Unknown fatal error when processing [c:\users\ryder\edk2_2023\edk2\EmulatorPkg\EmulatorPkg.dsc]
> INFO -
> INFO - (Please send email to devel@edk2.groups.io for help, attaching following call stack trace!)
> INFO -
> INFO - (Python 3.11.5 on win32) Traceback (most recent call last):
> INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\build\build.py", line 2692, in Main
> INFO - MyBuild = Build(Target, Workspace, Option,LogQ)
> INFO - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\build\build.py", line 815, in __init__
> INFO - self.InitPreBuild()
> INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\build\build.py", line 1015, in InitPreBuild
> INFO - self.LoadConfiguration()
> INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\build\build.py", line 971, in LoadConfiguration
> INFO - self.GetToolChainAndFamilyFromDsc (self.PlatformFile)
> INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\build\build.py", line 905, in GetToolChainAndFamilyFromDsc
> INFO - dscobj = self.BuildDatabase[File, BuildArch]
> INFO - ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\WorkspaceDatabase.py", line 104, in __getitem__
> INFO - BuildObject = self.CreateBuildObject(FilePath, Arch, Target, Toolchain)
> INFO - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\WorkspaceDatabase.py", line 125, in CreateBuildObject
> INFO - BuildObject = self._GENERATOR_[FileType](
> INFO - ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\DscBuildData.py", line 231, in __init__
> INFO - self.SkuIdMgr = SkuClass(self.SkuName, self.SkuIds)
> INFO - ^^^^^^^^^^^^
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\DscBuildData.py", line 510, in SkuName
> INFO - self._GetHeaderInfo()
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\DscBuildData.py", line 310, in _GetHeaderInfo
> INFO - RecordList = self._RawData[MODEL_META_DATA_HEADER, self._Arch]
> INFO - ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\MetaFileParser.py", line 250, in __getitem__
> INFO - self._PostProcess()
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\MetaFileParser.py", line 1429, in _PostProcess
> INFO - Processer[self._ItemType]()
> INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2basetools\Workspace\MetaFileParser.py", line 1609, in __ProcessDirective
> INFO - __IncludeMacros['WORKSPACE'] = GlobalData.gGlobalDefines['WORKSPACE']
> INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
> INFO - KeyError: 'WORKSPACE'
>
> I followed the directions on <https://github.com/tianocore/tianocore.github.io/wiki/How-to-Build-With-Stuart> and <https://github.com/tianocore/edk2/tree/master/EmulatorPkg/PlatformCI>. Are these the correct set of instructions to follow? If so, I entered the following commands and received the error above.
>
> git clone https://github.com/tianocore/edk2.git
> cd edk2
> python -m venv .venv
> .\.venv\Scripts\Activate.ps1
> stuart_setup -c EmulatorPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=VS2019 -a X64
> stuart_update -c EmulatorPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=VS2019 -a X64
> stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=VS2019 -a X64
>
> A quick couple of print statements in the python code of basetools reveal that gGlobalDefines is an empty dictionary. Help would be greatly appreciated. Let me know if you need more information.
>
> Thank you,
> Ryder
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111560): https://edk2.groups.io/g/devel/message/111560
Mute This Topic: https://groups.io/mt/102698986/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-11-21 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-19 22:43 [edk2-devel] BaseTools KeyError When Building EmulatorPkg ryderkeys via groups.io
2023-11-21 16:22 ` Laszlo Ersek [this message]
2023-11-27 18:16 ` Sean
[not found] ` <179B8D98556E51B3.32091@groups.io>
2023-11-27 19:43 ` Sean
2023-11-27 22:48 ` ryderkeys via groups.io
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=4b054861-5558-c9c8-0850-281abb9ac6e5@redhat.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