public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sean" <spbrogan@outlook.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"lersek@redhat.com" <lersek@redhat.com>,
	"ryderkeys@proton.me" <ryderkeys@proton.me>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Subject: Re: [edk2-devel] BaseTools KeyError When Building EmulatorPkg
Date: Mon, 27 Nov 2023 10:16:00 -0800	[thread overview]
Message-ID: <BY3PR19MB4900044056E5BF17CD829B09C8BDA@BY3PR19MB4900.namprd19.prod.outlook.com> (raw)
In-Reply-To: <4b054861-5558-c9c8-0850-281abb9ac6e5@redhat.com>

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

We are looking at it.

It seems to be a problem in the edk2-basetools but at this point it 
still isn't obvious.

You can do a 'pip uninstall edk2-basetools' and then I would expect your 
build would work.

I also see that you didn't build edk2 basetools (step 6) documented 
here: edk2/EmulatorPkg/PlatformCI at master · tianocore/edk2 
(github.com) 
<https://github.com/tianocore/edk2/tree/master/EmulatorPkg/PlatformCI>.  
Without doing that your build will fail as well.


The CI system is building fine so we are still looking into it.

I'll update the thread when we have more info.


Thanks

Sean



On 11/21/2023 8:22 AM, Laszlo Ersek wrote:
> 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 todevel@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 clonehttps://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 (#111736): https://edk2.groups.io/g/devel/message/111736
Mute This Topic: https://groups.io/mt/102698986/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

  reply	other threads:[~2023-11-27 18:16 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
2023-11-27 18:16   ` Sean [this message]
     [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=BY3PR19MB4900044056E5BF17CD829B09C8BDA@BY3PR19MB4900.namprd19.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