From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8D492740037 for ; Tue, 21 Nov 2023 16:22:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=DxOWqGXNfD1RmZy8k3oFPlyTQHQfcDR+1kPk9MW6Xjw=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1700583732; v=1; b=BZaJ4ka2yskQcxacFuST0UmOBRHeqwgPploG/aXL7pRjxpznrRPmZv4/RO98KaaHUjoEXW6L 6PBMktoaHTraMBptzRAhAvX7qu7Go4hsxDQXGpOzREc127E87GVgNNE1wAiPSusDl1ZfKU1GGgw Poh/+wruynXDrMGdk8k2iIRU= X-Received: by 127.0.0.2 with SMTP id 8PnxYY7687511xylUSehmXmc; Tue, 21 Nov 2023 08:22:12 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.45692.1700583731487497171 for ; Tue, 21 Nov 2023 08:22:11 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-zS1lrhLnP0-LscRxLIdgOA-1; Tue, 21 Nov 2023 11:22:07 -0500 X-MC-Unique: zS1lrhLnP0-LscRxLIdgOA-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CE29101B044; Tue, 21 Nov 2023 16:22:06 +0000 (UTC) X-Received: from [10.39.194.228] (unknown [10.39.194.228]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5AECA10F44; Tue, 21 Nov 2023 16:22:05 +0000 (UTC) Message-ID: <4b054861-5558-c9c8-0850-281abb9ac6e5@redhat.com> Date: Tue, 21 Nov 2023 17:22:04 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] BaseTools KeyError When Building EmulatorPkg To: devel@edk2.groups.io, ryderkeys@proton.me References: Cc: Sean Brogan From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zJCuhBgkV7WPXDt7NRKSh9crx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=BZaJ4ka2; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Adding Sean Laszlo On 11/19/23 23:43, ryderkeys via groups.io wrote: > Hi all, >=20 > I am trying to build EDK2 from most recent Github (namely, EmulatorPkg) w= ith 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 d= etails on my build process below. =20 >=20 > INFO - build.py... > INFO - : error C0DE: Unknown fatal error when processing [c:\users\ryder= \edk2_2023\edk2\EmulatorPkg\EmulatorPkg.dsc] > INFO -=20 > INFO - (Please send email to devel@edk2.groups.io for help, attaching fol= lowing call stack trace!) > INFO -=20 > INFO - (Python 3.11.5 on win32) Traceback (most recent call last): > INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\buil= d\build.py", line 2692, in Main > INFO - MyBuild =3D Build(Target, Workspace, Option,LogQ) > INFO - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\buil= d\build.py", line 815, in __init__ > INFO - self.InitPreBuild() > INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\buil= d\build.py", line 1015, in InitPreBuild > INFO - self.LoadConfiguration() > INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\buil= d\build.py", line 971, in LoadConfiguration > INFO - self.GetToolChainAndFamilyFromDsc (self.PlatformFile) > INFO - File "C:\Users\ryder\edk2_2023\edk2\BaseTools\Source\Python\buil= d\build.py", line 905, in GetToolChainAndFamilyFromDsc > INFO - dscobj =3D self.BuildDatabase[File, BuildArch] > INFO - ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\WorkspaceDatabase.py", line 104, in __getitem__ > INFO - BuildObject =3D self.CreateBuildObject(FilePath, Arch, Target,= Toolchain) > INFO - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^ > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\WorkspaceDatabase.py", line 125, in CreateBuildObject > INFO - BuildObject =3D self._GENERATOR_[FileType]( > INFO - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\DscBuildData.py", line 231, in __init__ > INFO - self.SkuIdMgr =3D SkuClass(self.SkuName, self.SkuIds) > INFO - ^^^^^^^^^^^^ > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\DscBuildData.py", line 510, in SkuName > INFO - self._GetHeaderInfo() > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\DscBuildData.py", line 310, in _GetHeaderInfo > INFO - RecordList =3D self._RawData[MODEL_META_DATA_HEADER, self._Arc= h] > INFO - ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\MetaFileParser.py", line 250, in __getitem__ > INFO - self._PostProcess() > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\MetaFileParser.py", line 1429, in _PostProcess > INFO - Processer[self._ItemType]() > INFO - File "C:\Users\ryder\edk2_2023\edk2\.venv\Lib\site-packages\edk2= basetools\Workspace\MetaFileParser.py", line 1609, in __ProcessDirective > INFO - __IncludeMacros['WORKSPACE'] =3D GlobalData.gGlobalDefines['WO= RKSPACE'] > INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^= ^^^^^^^ > INFO - KeyError: 'WORKSPACE' >=20 > I followed the directions on and . Are these the correct set of instruct= ions to follow? If so, I entered the following commands and received the er= ror above. >=20 > 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=3D= VS2019 -a X64 > stuart_update -c EmulatorPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG= =3DVS2019 -a X64 > stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=3D= VS2019 -a X64 >=20 > A quick couple of print statements in the python code of basetools reveal= that gGlobalDefines is an empty dictionary. Help would be greatly apprecia= ted. Let me know if you need more information. >=20 > Thank you, > Ryder >=20 >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-