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.web09.27631.1607905354349352503 for ; Sun, 13 Dec 2020 16:22:36 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: fengyunhua@byosoft.com.cn) Received: from LAPTOP2AECFQIA ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Mon, 14 Dec 2020 08:22:30 +0800 X-WM-Sender: fengyunhua@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: fengyunhua@byosoft.com.cn From: "fengyunhua" To: "'gaoliming'" , , , Cc: "'Bob Feng'" References: <007f01d6cf5b$09731980$1c594c80$@byosoft.com.cn> In-Reply-To: <007f01d6cf5b$09731980$1c594c80$@byosoft.com.cn> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gRURLMiBidWlsZCBlcnJvcnMgd2l0aCBQeXRob24gMy45?= Date: Mon, 14 Dec 2020 08:22:30 +0800 Message-ID: <000001d6d1af$35ef8560$a1ce9020$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJ8wtAk6Kb7FRvI+a22RBw3kXRSYwGzDSalqJw/YdA= Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01D6D1F2.441424F0" Content-Language: zh-cn ------=_NextPart_000_0001_01D6D1F2.441424F0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Please refer to Mingyue submitted patch https://edk2.groups.io/g/devel/message/67511 =20 Thanks Yunhua =20 =B7=A2=BC=FE=C8=CB: gaoliming =20 =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA12=D4=C211=C8=D5 9:15 =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io; sergey.kiselev@intel.com =B3=AD=CB=CD: gaoliming@byosoft.com.cn; 'Bob Feng' ;= 'Yunhua Feng' =D6=F7=CC=E2: =BB=D8=B8=B4: [edk2-devel] EDK2 build errors with Python 3.9 =20 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 Kisel= ev, 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 =20 =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_0001_01D6D1F2.441424F0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

Please refer t= o Mingyue submitted patch

https://edk2.groups.io/g/devel/message/67511=

 

Thanks

Yunhua=

 

=B7=A2=BC=FE=C8=CB: gaoliming <gaoliming@byosoft.com.cn>
=B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA12=D4=C211=C8=D5 9:15
=CA=D5=BC=FE=C8=CB: devel@edk2.groups.io; sergey.kiselev@intel.com
= =B3=AD=CB=CD: gaoliming= @byosoft.com.cn; 'Bob Feng' <bob.c.feng@intel.com>; 'Yunhua Feng' <= ;fengyunhua@byosoft.com.cn>
=D6=F7=CC=E2= : =BB=D8=B8=B4: [ed= k2-devel] EDK2 build errors with Python 3.9

 

Bob and Yunhua:

&n= bsp;I remember you have the patch to fix this issue. Right?

 

Thanks<= o:p>

Liming

=B7= =A2=BC=FE=C8=CB: bounce+27952+68668+4905953+8761045@groups.io <= ;bounce+279= 52+68668+4905953+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= ] EDK2 build errors with Python 3.9

 

Hi,

 

The array object in Python 3.9 no longer supports fromstri= ng() and tostring() methods. EDK2 BaseTools use these methods, and therefor= e the EDK2 build fails when using Python 3.9. See the trace below.

 

Thanks,
Sergey<= /span>

 <= /p>

build.py...

: error C0DE: Tools code failure

  &nb= sp;     Please send email to devel@edk2.groups.io for help, attaching following call s= tack trace!

 

Traceback= (most recent call last):

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

    GenFds.GenFd('', FdfParserO= bj, BuildWorkSpace, ArchList)

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

    FdObj.GenFd()

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

   = RegionObj.AddToBuffer (FdBuffer, self.BaseAddress, self.BlockSizeList, sel= f.ErasePolarity, GenFdsGlobalVariable.ImageBinDict, self.DefineVarDict, Fla= g=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_0001_01D6D1F2.441424F0--