From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.15947.1607617115189230910 for ; Thu, 10 Dec 2020 08:18:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ItEFlunO; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: sergey.kiselev@intel.com) IronPort-SDR: ZSGowW8CgtgK8y4g/nIgdbmoOhFTtrgPyCi+KcJNPoBlj74/+bKuOIMzGHd4lI7yED6DlJpbrX EeWpXpDAD0LQ== X-IronPort-AV: E=McAfee;i="6000,8403,9830"; a="171716505" X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208,217";a="171716505" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 08:18:34 -0800 IronPort-SDR: ihfGucsepHuznBWhpJ1WvkOfn2ngwRcs29o92qQpNk0hQzgot8FTsXq7Xbhf2mamZPIM9WhsdU PymNjEltwlQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208,217";a="543189828" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga005.fm.intel.com with ESMTP; 10 Dec 2020 08:18:32 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 10 Dec 2020 08:18:28 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 10 Dec 2020 08:18:28 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 10 Dec 2020 08:18:27 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 10 Dec 2020 08:16:00 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HWImIEUoK8dMnkq6KLvSG9bvyRBkcnrBrQoTaemtkkOEh+H0oe/+DDaYyNe8qi+6Jp48jhgSnF63Ts1bAGXy2ryV1wZcmehxPODc/g8m+z6+VF5DABYi6LaY878Jqi0UD00EMhN/eBk39Yexy+DwH7fEbW0wxpTJ53WO2T3pWWAnxh4BtEYAihnaUOZTx2c0c3xVtg0jRg5pQbDpFBThdV91C1zqtVV/rKH/gUi2fFCRWiLf8bOKSPVj9clWEvi/hH+sr8yj1P/czQLDWqIi7VrWBU3hOR/glu5dPCZph5KjCSG9Ob+R0jo2U3Hi0CeA2uczNhy04ryXRngru9kzsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IeDc44DOnvLpLOTJZhHs5ERatL9npOXzr8tBLr3kvvI=; b=jJOKp6MhiM62YmWb6AEitlhhFEwFLCmgxc5KD0c8alQOkthBxBpsUmD7MYQYN1l/DWQls5/qqUsfX2kKIjmpF6GiWLDPMtIk5HLQvjTFVL3PHdFJE66AcV+xiK7XWhr/C13eo+HlQFpkmlKuUAx4Op/4XaMgQ2xW1wgtZHLkwUBjLSaoe37x8HPVbuaUkbJxhc/TbVAbfSMEqKiwZ3JlVHNiw8W/Y19zdxJen2aRbLQOHCdBvvw0w2Mlhw7QWnmI7h5a6cW54WqpTuF5bmbMYdRLcWTSIgCHt7nor3ZMIL/Y+VwjGrze0nr0wC7Z8hBZF1YTVFX2LKBtV57AJdUOkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IeDc44DOnvLpLOTJZhHs5ERatL9npOXzr8tBLr3kvvI=; b=ItEFlunOWjq3GLEM18n2IbZ31elpUJhovEiiFsl4vE+b9zBgQG+KNBnjPekOQx9F+ULSGdkRqYa0wufYaspvXDWz0Rv+fBmaV1/5kOcNBlDFXS0/WXAqkGe8zHxCHUopDGGV7smhoGQSCrD0DQZ0rseELYBVzuMhWFSWnpDboS0= Received: from MWHPR1101MB2207.namprd11.prod.outlook.com (2603:10b6:301:58::7) by MWHPR11MB1598.namprd11.prod.outlook.com (2603:10b6:301:c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12; Thu, 10 Dec 2020 16:15:59 +0000 Received: from MWHPR1101MB2207.namprd11.prod.outlook.com ([fe80::18e2:70d6:cc3d:b760]) by MWHPR1101MB2207.namprd11.prod.outlook.com ([fe80::18e2:70d6:cc3d:b760%10]) with mapi id 15.20.3654.014; Thu, 10 Dec 2020 16:15:59 +0000 From: "Kiselev, Sergey" To: "devel@edk2.groups.io" Subject: EDK2 build errors with Python 3.9 Thread-Topic: EDK2 build errors with Python 3.9 Thread-Index: AdbPDuivOWGEqAVRRz6TiVNW5oqXPw== Date: Thu, 10 Dec 2020 16:15:59 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [50.45.176.97] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 02433114-e710-4525-6f1c-08d89d26e207 x-ms-traffictypediagnostic: MWHPR11MB1598: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: x/E69iQsYg3tKPehqQnQPQpbRE3IF2eVVKKoTELV/ZQV90axcgj+JtfXKWVkNBjB9et4ZAmdwybF6kp+pN6bFMdqcFNJ5lLHisHn9NIoRPuMeShrmDyJcblQ8OY9JFuzseuMSGAbGLlMd6oo8JSE69oRZIIDLX6N4xrAvLEDPJyQ0qyVLfimgmmy/ZycDelRcaT3/AXARIlPXJ0+hA1RZ5I2R1Bj4QfVBFawJKiny0zLiL2DyHxDTX4rGu9DcBor8sAi3tn1fA9PSLz6FcBCHfSBGiUptaavgB+PIF2O1iT2CxzBeXEyOnb/ale6iTyE8qA2L/jgYGI0zGnyr+tJNw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1101MB2207.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(346002)(136003)(376002)(186003)(66476007)(2906002)(8936002)(33656002)(64756008)(66446008)(9326002)(71200400001)(6916009)(55016002)(66946007)(52536014)(7696005)(86362001)(8676002)(66556008)(83380400001)(508600001)(5660300002)(76116006)(6506007)(26005)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?eMwo5NMY30hEHgmXBR2wy5KjosaYtqV6vIRsgyO9WBfsdR047TQkjnAryvR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GMtAyugkCJKKg8Jts7+S/ZI2KweTGf0WUxV4uh?= =?us-ascii?Q?DlQMcD7HvfH7n7XSHpglBxIpferAZTeJYPnPaRB9mu0=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2207.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02433114-e710-4525-6f1c-08d89d26e207 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2020 16:15:59.8371 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zpaSI75u/nZTKJBg0BgUmpL8id3t5ddY70np8F5wZH71Bl2JlcEVnFbqnVU4kUr+4AZ6C2cU9oaUuYfPBTgqJ9W0h2+35LiZDo3/XAaipF0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1598 Return-Path: sergey.kiselev@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MWHPR1101MB2207E46438671D05F17E487395CB0MWHPR1101MB2207_" --_000_MWHPR1101MB2207E46438671D05F17E487395CB0MWHPR1101MB2207_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, The array object in Python 3.9 no longer supports fromstring() and tostring= () methods. EDK2 BaseTools use these methods, and therefore the EDK2 build = fails when using Python 3.9. See the trace below. Thanks, Sergey build.py... : error C0DE: Tools code failure Please send email to devel@edk2.groups.io for help, attaching follo= wing call stack trace! Traceback (most recent call last): File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\GenFds.py", line 37= 1, in GenFdsApi GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\GenFds.py", line 51= 0, in GenFd FdObj.GenFd() File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\Fd.py", line 131, i= n GenFd RegionObj.AddToBuffer (FdBuffer, self.BaseAddress, self.BlockSizeList, = self.ErasePolarity, GenFdsGlobalVariable.ImageBinDict, self.DefineVarDict, = Flag=3DFlag) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\Region.py", line 13= 4, in AddToBuffer FvObj.AddToBuffer(FvBuffer, FvBaseAddress, BlockSize, BlockNum, ErasePo= larity, Flag=3DFlag) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\Fv.py", line 127, i= n AddToBuffer FileName =3D FfsFile.GenFfs(MacroDict, FvParentAddr=3DBaseAddress, IsMa= kefile=3DFlag, FvName=3Dself.UiFvName) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\FfsFileStatement.py= ", line 153, in GenFfs sectList, align =3D section.GenSection(OutputDir, self.NameGuid, SecInd= ex, self.KeyStringList, None, Dict) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\GuidSection.py", li= ne 95, in GenSection ReturnSectList, align =3D Sect.GenSection(OutputPath, ModuleName, SecIn= dex, KeyStringList, FfsInf, Dict, IsMakefile=3DIsMakefile) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\FvImageSection.py",= line 108, in GenSection FvFileName =3D Fv.AddToBuffer(Buffer, self.FvAddr, MacroDict =3D Dict, = Flag=3DIsMakefile) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\Fv.py", line 127, i= n AddToBuffer FileName =3D FfsFile.GenFfs(MacroDict, FvParentAddr=3DBaseAddress, IsMa= kefile=3DFlag, FvName=3Dself.UiFvName) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\FfsFileStatement.py= ", line 153, in GenFfs sectList, align =3D section.GenSection(OutputDir, self.NameGuid, SecInd= ex, self.KeyStringList, None, Dict) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\UiSection.py", line= 70, in GenSection GenFdsGlobalVariable.GenerateSection(OutputFile, None, 'EFI_SECTION_USE= R_INTERFACE', Ui=3DNameString, IsMakefile=3DIsMakefile) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\GenFdsGlobalVariabl= e.py", line 466, in GenerateSection SectionData.fromstring(Ui.encode("utf_16_le")) AttributeError: 'array.array' object has no attribute 'fromstring' --_000_MWHPR1101MB2207E46438671D05F17E487395CB0MWHPR1101MB2207_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

The array object in Python 3.9 no longer supports fr= omstring() and tostring() methods. EDK2 BaseTools use these methods, and th= erefore the EDK2 build fails when using Python 3.9. See the trace below.

 

Thanks,
Sergey

 

build.py...

: error C0DE: Tools code failure

        Please se= nd email to devel@edk2.groups.io for help, attaching following call stack t= race!

 

Traceback (most recent call last):

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\GenFds.py", line 371, in GenFdsApi

    GenFds.GenFd('', FdfParserObj, Bu= ildWorkSpace, ArchList)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\GenFds.py", line 510, in GenFd

    FdObj.GenFd()

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\Fd.py", line 131, in GenFd

    RegionObj.AddToBuffer (FdBuffer, = self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFdsGlobalVaria= ble.ImageBinDict, self.DefineVarDict, Flag=3DFlag)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\Region.py", line 134, in AddToBuffer

    FvObj.AddToBuffer(FvBuffer, FvBas= eAddress, BlockSize, BlockNum, ErasePolarity, Flag=3DFlag)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\Fv.py", line 127, in AddToBuffer

    FileName =3D FfsFile.GenFfs(Macro= Dict, FvParentAddr=3DBaseAddress, IsMakefile=3DFlag, FvName=3Dself.UiFvName= )

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\FfsFileStatement.py", line 153, in GenFfs

    sectList, align =3D section.GenSe= ction(OutputDir, self.NameGuid, SecIndex, self.KeyStringList, None, Dict)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\GuidSection.py", line 95, in GenSection

    ReturnSectList, align =3D Sect.Ge= nSection(OutputPath, ModuleName, SecIndex, KeyStringList, FfsInf, Dict, IsM= akefile=3DIsMakefile)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\FvImageSection.py", line 108, in GenSection

    FvFileName =3D Fv.AddToBuffer(Buf= fer, self.FvAddr, MacroDict =3D Dict, Flag=3DIsMakefile)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\Fv.py", line 127, in AddToBuffer

    FileName =3D FfsFile.GenFfs(Macro= Dict, FvParentAddr=3DBaseAddress, IsMakefile=3DFlag, FvName=3Dself.UiFvName= )

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\FfsFileStatement.py", line 153, in GenFfs

    sectList, align =3D section.GenSe= ction(OutputDir, self.NameGuid, SecIndex, self.KeyStringList, None, Dict)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\UiSection.py", line 70, in GenSection

    GenFdsGlobalVariable.GenerateSect= ion(OutputFile, None, 'EFI_SECTION_USER_INTERFACE', Ui=3DNameString, IsMake= file=3DIsMakefile)

  File "C:\edk2-upx\edk2\BaseTools\Source\= Python\GenFds\GenFdsGlobalVariable.py", line 466, in GenerateSection

    SectionData.fromstring(Ui.encode(= "utf_16_le"))

AttributeError: 'array.array' object has no attribut= e 'fromstring'

 

--_000_MWHPR1101MB2207E46438671D05F17E487395CB0MWHPR1101MB2207_--