From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web11.29.1607649299363118025 for ; Thu, 10 Dec 2020 17:15:00 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 11 Dec 2020 09:14:52 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: , "'Bob Feng'" , "'Yunhua Feng'" References: In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gRURLMiBidWlsZCBlcnJvcnMgd2l0aCBQeXRob24gMy45?= Date: Fri, 11 Dec 2020 09:14:55 +0800 Message-ID: <007f01d6cf5b$09731980$1c594c80$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJ8wtAk6Kb7FRvI+a22RBw3kXRSY6ilMCMQ Content-Type: multipart/alternative; boundary="----=_NextPart_000_0080_01D6CF9E.179743E0" Content-Language: zh-cn ------=_NextPart_000_0080_01D6CF9E.179743E0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Bob and Yunhua: I remember you have the patch to fix this issue. Right? =20 Thanks Liming =B7=A2=BC=FE=C8=CB: bounce+27952+68668+4905953+8761045@groups.io =B4=FA=B1=ED Kiselev, Serge= y =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA12=D4=C211=C8=D5 0:16 =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io =D6=F7=CC=E2: [edk2-devel] EDK2 build errors with Python 3.9 =20 Hi, =20 The array object in Python 3.9 no longer supports fromstring() and tostring() methods. EDK2 BaseTools use these methods, and therefore the ED= K2 build fails when using Python 3.9. See the trace below. =20 Thanks, Sergey =20 build.py... : error C0DE: Tools code failure Please send email to devel@edk2.groups.io for help, attaching following call stack trace! =20 Traceback (most recent call last): File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\GenFds.py", line 371, in GenFdsApi GenFds.GenFd('', FdfParserObj, BuildWorkSpace, 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, GenFdsGlobalVariable.ImageBinDict, self.DefineVarDict, Flag=3DFlag) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\Region.py", line 134, in AddToBuffer FvObj.AddToBuffer(FvBuffer, FvBaseAddress, BlockSize, BlockNum, ErasePolarity, Flag=3DFlag) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\Fv.py", line 127, = in AddToBuffer FileName =3D FfsFile.GenFfs(MacroDict, FvParentAddr=3DBaseAddress, IsMakefile=3DFlag, FvName=3Dself.UiFvName) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\FfsFileStatement.py", lin= e 153, in GenFfs sectList, align =3D section.GenSection(OutputDir, self.NameGuid, SecIn= dex, self.KeyStringList, None, Dict) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\GuidSection.py", line 95, in GenSection ReturnSectList, align =3D Sect.GenSection(OutputPath, ModuleName, SecIndex, 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, = in AddToBuffer FileName =3D FfsFile.GenFfs(MacroDict, FvParentAddr=3DBaseAddress, IsMakefile=3DFlag, FvName=3Dself.UiFvName) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\FfsFileStatement.py", lin= e 153, in GenFfs sectList, align =3D section.GenSection(OutputDir, self.NameGuid, SecIn= dex, self.KeyStringList, None, Dict) File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\UiSection.py", lin= e 70, in GenSection GenFdsGlobalVariable.GenerateSection(OutputFile, None, 'EFI_SECTION_USER_INTERFACE', Ui=3DNameString, IsMakefile=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 attribute 'fromstring' =20 ------=_NextPart_000_0080_01D6CF9E.179743E0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

Bob and Yunhua:

<= span lang=3DEN-US style=3D'font-size:10.5pt;font-family:DengXian'>  I = remember you have the patch to fix this issue. Right?

=

 

Thanks

Liming

=B7=A2=BC=FE=C8=CB: bounce+27952+68668+4905953+8761045@groups.io <bounce+27952+68668+49= 05953+8761045@groups.io> = = =B4=FA=B1=ED = Kiselev, Sergey
=B7=A2=CB= = =CD=CA=B1=BC=E4: 2020=C4=EA12=D4=C211=C8= =D5 0:16
=CA=D5=BC=FE=C8=CB: devel@edk2.groups.io
=D6= =F7=CC=E2: [edk2-devel] E= DK2 build errors with Python 3.9

 

Hi,

 

The array object in Python 3.9 no longer supports fromstrin= g() 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

  &nbs= p;     Please send email to devel@edk2.groups.io for help, attaching following call st= ack trace!

 

Traceback = (most recent call last):

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

    GenFds.GenFd('', FdfParserOb= j, BuildWorkSpace, ArchList)

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

    FdObj.GenFd()

  File "C:\edk2-up= x\edk2\BaseTools\Source\Python\GenFds\Fd.py", line 131, in GenFd<= /o:p>

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

&nbs= p; File "C:\edk2-upx\edk2\BaseTools\Source\Python\GenFds\Region.py&quo= t;, line 134, in AddToBuffer

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

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

    File= Name =3D FfsFile.GenFfs(MacroDict, FvParentAddr=3DBaseAddress, IsMakefile= =3DFlag, FvName=3Dself.UiFvName)

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

    sectList, al= ign =3D section.GenSection(OutputDir, self.NameGuid, SecIndex, self.KeyStri= ngList, None, Dict)

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

    ReturnSectList, align =3D Se= ct.GenSection(OutputPath, ModuleName, SecIndex, KeyStringList, FfsInf, Dict= , IsMakefile=3DIsMakefile)

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

<= p class=3DMsoNormal>    FvFileName =3D Fv= .AddToBuffer(Buffer, self.FvAddr, MacroDict =3D Dict, Flag=3DIsMakefile)

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

&= nbsp;   FileName =3D FfsFile.GenFfs(MacroDict, FvParentAddr=3DBas= eAddress, IsMakefile=3DFlag, FvName=3Dself.UiFvName)

<= p class=3DMsoNormal>  File "C:\edk2-upx\edk2\B= aseTools\Source\Python\GenFds\FfsFileStatement.py", line 153, in GenFf= s

  =   sectList, align =3D section.GenSection(OutputDir, self.NameGuid, Sec= Index, self.KeyStringList, None, Dict)

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

    GenFdsGloba= lVariable.GenerateSection(OutputFile, None, 'EFI_SECTION_USER_INTERFACE', U= i=3DNameString, IsMakefile=3DIsMakefile)

  File "C:\edk2-upx\edk2\BaseTools\Sou= rce\Python\GenFds\GenFdsGlobalVariable.py", line 466, in GenerateSecti= on

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

AttributeError: 'array.a= rray' object has no attribute 'fromstring'

 

------=_NextPart_000_0080_01D6CF9E.179743E0--