From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web10.5794.1675142159843557326 for ; Mon, 30 Jan 2023 21:16:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=d5fc0yp2; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 1B0DFCD1F723 for ; Tue, 31 Jan 2023 13:15:57 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1675142157; bh=B4DKJqTy+4wS9N8FzrQI9ojrZ15hHFfNQOtUgO0eges=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=d5fc0yp25LZTeQccOnfoIz49zKU6QyeLN2gc+xmirVPOsMFzpDQhji2aadTlQsZu7 Qx4YhaNrvUWDaaAS+MgmNvkbk1RK2hkm5is1HonbJynn2aGnMgmElEgmjZ5ZGMl15j a4Kz62dd9v33oTYcNR4lS29cm8C3aZEyZpUlowUI= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 16872CD1F6FD for ; Tue, 31 Jan 2023 13:15:57 +0800 (CST) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id BC073CD1F6DD for ; Tue, 31 Jan 2023 13:15:56 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id C417BCD1F86F for ; Tue, 31 Jan 2023 13:15:53 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 31 Jan 2023 13:15:47 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'He, Jiangang'" , "'Chang, Abner'" , "'Kinney, Michael D'" Cc: "'Bi, Dandan'" , "'Kirkendall, Garrett'" References: <20230112050822.1940-1-abner.chang@amd.com> <001c01d933b4$3db80420$b9280c60$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIFYyXSBNZGVNb2R1bGVQa2cvRGVjb21wcmVzczogQWRkIG1pc3Npbmcgc291cmNlIGZpbGUgdG8gQnJvdGxpIGxpYnJhcnk=?= Date: Tue, 31 Jan 2023 13:15:48 +0800 Message-ID: <01ab01d93533$14a78f30$3df6ad90$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKSDL1LjaDaouG629qjNe5QTMui1wLQvW42ARI+4h4BqPNZAgGuEsxWAcxk45cCAXiIFKzuDZXw Sender: "gaoliming" Content-Type: multipart/alternative; boundary="----=_NextPart_000_01AC_01D93576.22CD4030" Content-Language: zh-cn ------=_NextPart_000_01AC_01D93576.22CD4030 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dose this patch fix GCC5 or VS2019 build failure? =20 =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Lin, Kuei-Hung (Timothy) via groups.io =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B41=E6=9C=8831=E6=97=A5 8:= 50 =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming ; devel@ed= k2.groups.io; He, Jiangang ; Chang, Abner ; 'Kinney, Michael D' =E6=8A=84=E9=80=81: 'Bi, Dandan' ; Kirkendall, Garrett= =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Ad= d missing source file to Brotli library =20 [AMD Official Use Only - General] =20 =20 The failure can be replicated with VS2019 and GCC5. * GCC5: * /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: warning: relocation against = `_kBrotliPrefixCodeRanges' in read-only section `.text.BrotliUefiDecompress= '=20 /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `DecodeLiteralBloc= kSwitch': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/decode.c:879: undefined reference to `_kBrotliPrefixCodeRanges= ' /usr/bin/ld: /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomD= ecompressLib/brotli/c/dec/decode.c:1193: undefined reference to `_kBrotliCo= ntextLookupTable' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `DecodeCommandBloc= kSwitch': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/decode.c:879: undefined reference to `_kBrotliPrefixCodeRanges= ' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `DecodeDistanceBlo= ckSwitch': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/decode.c:879: undefined reference to `_kBrotliPrefixCodeRanges= ' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `SafeDecodeLiteral= BlockSwitch': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/decode.c:898: undefined reference to `_kBrotliPrefixCodeRanges= ' /usr/bin/ld: /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomD= ecompressLib/brotli/c/dec/decode.c:1193: undefined reference to `_kBrotliCo= ntextLookupTable' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `SafeDecodeCommand= BlockSwitch': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/decode.c:898: undefined reference to `_kBrotliPrefixCodeRanges= ' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `SafeDecodeDistanc= eBlockSwitch': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/decode.c:898: undefined reference to `_kBrotliPrefixCodeRanges= ' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `BrotliDecoderDest= royInstance': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/state.c:136: undefined reference to `BrotliSharedDictionaryDes= troyInstance' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `BrotliUefiDecompr= ess': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/state.c:87: undefined reference to `BrotliSharedDictionaryCrea= teInstance' /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `BrotliUefiDecompr= ess': /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/= brotli/c/dec/decode.c:898: undefined reference to `_kBrotliPrefixCodeRanges= ' /usr/bin/ld: /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomD= ecompressLib/brotli/c/dec/decode.c:1193: undefined reference to `_kBrotliCo= ntextLookupTable' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status ... =20 build.py... : error F002: Failed to build module =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82/home/XXX/edk2-stable= 202211/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf [X64, GCC5, RELEASE] * VS2019: * BBrotliDecompressLib.lib(state.obj) : error LNK2001: unresolved external = symbol BrotliDefaultFreeFunc=20 BrotliDecompressLib.lib(state.obj) : error LNK2001: unresolved external sym= bol BrotliDefaultAllocFunc BrotliDecompressLib.lib(state.obj) : error LNK2001: unresolved external sym= bol BrotliSharedDictionaryCreateInstance BrotliDecompressLib.lib(state.obj) : error LNK2001: unresolved external sym= bol BrotliSharedDictionaryDestroyInstance BrotliDecompressLib.lib(decode.obj) : error LNK2001: unresolved external sy= mbol _kBrotliPrefixCodeRanges BrotliDecompressLib.lib(decode.obj) : error LNK2001: unresolved external sy= mbol BrotliSharedDictionaryAttach BrotliDecompressLib.lib(decode.obj) : error LNK2001: unresolved external sy= mbol _kBrotliContextLookupTable d:\XXX\Build\OvmfX64\RELEASE_VS2019\X64\MdeModulePkg\Core\DxeIplPeim\DxeIpl= \DEBUG\DxeIpl.dll : fatal error LNK1120: 7 unresolved externals ... build.py... : error 7000: Failed to execute command C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC= \Tools\MSVC\14.29.30133\bin\Hostx86\x86\nmake.exe /nologo tbuild [d:\XXX\Bu= ild\OvmfX64\RELEASE_VS2019\X64\MdeModulePkg\Core\DxeIplPeim\DxeIpl] =20 =20 -- Timothy _____ =20 From: gaoliming = > Sent: Saturday, January 28, 2023 11:35 PM To: devel@edk2.groups.io >; Lin, Kuei-Hung (Timothy) >; He, Jiangang >; Chang, Abner >; 'Kinney, Michael D' > Cc: 'Bi, Dandan' >; Kirke= ndall, Garrett > Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] [PATCH V2] MdeModulePkg/Decompres= s: Add missing source file to Brotli library=20 =20 =09 Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding.=20 =20 Timothy: Thanks for your report. This is a real issue in Brotli decompress library.= Which tool chain has been verified? GCC5 or VS2019 or Both? =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E4=BB=A3=E8=A1= =A8 Lin, Kuei-Hung (Timothy) via groups.io =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B41=E6=9C=8813=E6=97=A5 6:= 18 =E6=94=B6=E4=BB=B6=E4=BA=BA: He, Jiangang >; Chang, Abner >; Kinney, Michael D >; devel@edk2.groups.io =20 =E6=8A=84=E9=80=81: Bi, Dandan >; Gao, Liming >; Kirkendall, Garrett > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Ad= d missing source file to Brotli library =20 [AMD Official Use Only - General] =20 This patch tried to fix following build failure when linking the Brotli dec= ompress lib. =20 Steps to replicate the issue: 1 - Attach a NULL lib to DxeIpl.inf in any project's .DSC, say OvmfPkgX64.d= sc MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf {=20 NULL|MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliCustomDecom= pressLib.inf } 2 - Follow the EDKII'2 package build steps to build that project. Build.py = would compliains with following errors. ... /home/edk2/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib= /brotli/c/dec/decode.c:879: undefined reference to `_kBrotliPrefixCodeRange= s' /usr/bin/ld: /home/edk2/edk2-stable202211/MdeModulePkg/Library/BrotliCustom= DecompressLib/brotli/c/dec/decode.c:1193: undefined reference to `_kBrotliC= ontextLookupTable' /usr/bin/ld: /tmp/ccKzzHN0.ltrans0.ltrans.o: in function `DecodeCommandBloc= kSwitch': ...=20 /usr/bin/ld: /tmp/ccKzzHN0.ltrans0.ltrans.o: in function `BrotliUefiDecompr= ess': /home/edk2/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib= /brotli/c/dec/decode.c:898: undefined reference to `_kBrotliPrefixCodeRange= s' /usr/bin/ld: /home/edk2/edk2-stable202211/MdeModulePkg/Library/BrotliCustom= DecompressLib/brotli/c/dec/decode.c:1193: undefined reference to `_kBrotliC= ontextLookupTable' =20 -- Timothy =20 =20 =20 =20 _____ =20 From: He, Jiangang > Sent: Thursday, January 12, 2023 8:08 AM To: Chang, Abner >; Kinne= y, Michael D >; devel@edk2.groups.io >; Lin, Kuei-Hung (Timothy) > Cc: Bi, Dandan >; Gao, Li= ming >; Kirkend= all, Garrett >; Kinney, Michael D > Subject: RE: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing s= ource file to Brotli library=20 =20 [AMD Official Use Only - General] =20 Timothy will answer the question. =20 From: Chang, Abner >=20 Sent: Thursday, January 12, 2023 10:05 AM To: Kinney, Michael D >; devel@edk2.groups.io =20 Cc: Bi, Dandan >; Gao, Li= ming >; Kirkend= all, Garrett >; Kinney, Michael D >; He, Jiangang > Subject: Re: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing s= ource file to Brotli library =20 [AMD Official Use Only - General] =20 Hi Mike,=20 CC Jiangang, he can give the clear answer. =20 Thanks Abner=20 =20 =20 Get Outlook for Android =20 _____ =20 From: Kinney, Michael D > Sent: Thursday, January 12, 2023 11:23:48 PM To: devel@edk2.groups.io >; Chang, Abner > Cc: Bi, Dandan >; Gao, Li= ming >; Kirkend= all, Garrett >; Kinney, Michael D > Subject: RE: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing s= ource file to Brotli library=20 =20 Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding. Hi Abner, What was the failure before this change? This looks like something that would always break the build of source files= were missing. Mike > -----Original Message----- > From: devel@edk2.groups.io > On Behalf Of Chang, Abner via groups= .io > Sent: Wednesday, January 11, 2023 9:08 PM > To: devel@edk2.groups.io =20 > Cc: Bi, Dandan >; Gao, = Liming >; Garre= tt Kirkendall >; > Abner Chang > > Subject: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing sou= rce file to Brotli library > > From: Abner Chang > > > Add missing source files to Brotli library INF. > > Signed-off-by: Jiangang He > > Cc: Dandan Bi > > Cc: Liming Gao > > Cc: Garrett Kirkendall > > Cc: Abner Chang > > --- > .../BrotliCustomDecompressLib/BrotliCustomDecompressLib.inf | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliCustomD= ecompressLib.inf > b/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliCustomDecompressLi= b.inf > index 525e92408d6..244c2e35023 100644 > --- a/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliCustomDecompre= ssLib.inf > +++ b/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliCustomDecompre= ssLib.inf > @@ -5,6 +5,7 @@ > # Brotli was released on the website https://github.com/google/brotli. > # > # Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved. > +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<= BR> > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -41,6 +42,10 @@ > # Wrapper header files end # > brotli/c/common/dictionary.c > brotli/c/common/transform.c > + brotli/c/common/context.c > + brotli/c/common/platform.c > + brotli/c/common/constants.c > + brotli/c/common/shared_dictionary.c > brotli/c/dec/bit_reader.c > brotli/c/dec/decode.c > brotli/c/dec/huffman.c > -- > 2.37.1.windows.1 > > > >=20 > ------=_NextPart_000_01AC_01D93576.22CD4030 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Dose this patch fix GCC5 or VS2019 build failure?

 

=E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io <devel@edk2.groups.io> =E4=BB=A3=E8= =A1=A8 Lin, Kuei-Hung (Timothy) via groups.io
=E5=8F=91=E9= =80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B4<= span lang=3DEN-US>1=E6=9C=8831=E6=97=A5 8:50
=E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming <gaoliming@byosoft.com.c= n>; devel@edk2.groups.io; He, Jiangang <Jiangang.He@amd.com>; Chan= g, Abner <Abner.Chang@amd.com>; 'Kinney, Michael D' <michael.d.kin= ney@intel.com>
=E6=8A=84=E9=80=81: 'Bi, Dandan' <dandan.bi@intel.com>; Kirkenda= ll, Garrett <Garrett.Kirkendall@amd.com>
=E4=B8=BB=E9=A2= =98: Re: [edk2-devel] [PAT= CH V2] MdeModulePkg/Decompress: Add missing source file to Brotli library

 

[AMD= Official Use Only - General]

 

 

The failure can b= e replicated with VS2019 and GCC5.

=
  • GCC5:
    • /usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: warning= : relocation against `_kBrotliPrefixCodeRanges' in read-only section `.text= .BrotliUefiDecompress' <= /li>

/usr/bin/ld: /= tmp/cc7sinRE.ltrans0.ltrans.o: in function `DecodeLiteralBlockSwitch':

/home/XXX/edk2-stable202211/MdeModulePkg/Library/Brotl= iCustomDecompressLib/brotli/c/dec/decode.c:879: undefined reference to `_kB= rotliPrefixCodeRanges'

/usr/bin/ld: /home/XXX/edk2-stable202211/MdeModulePkg= /Library/BrotliCustomDecompressLib/brotli/c/dec/decode.c:1193: undefined re= ference to `_kBrotliContextLookupTable'

/usr/bin/ld: /tmp/cc7sinRE.ltrans0.l= trans.o: in function `DecodeCommandBlockSwitch':

/home/XXX/edk2-stable2022= 11/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/c/dec/decode.c:879= : undefined reference to `_kBrotliPrefixCodeRanges'

/usr/bin/ld: /tmp/cc7sin= RE.ltrans0.ltrans.o: in function `DecodeDistanceBlockSwitch':

/home/XXX/edk2= -stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/c/dec/d= ecode.c:879: undefined reference to `_kBrotliPrefixCodeRanges'

/usr/bin/ld= : /tmp/cc7sinRE.ltrans0.ltrans.o: in function `SafeDecodeLiteralBlockSwitch= ':

/home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLi= b/brotli/c/dec/decode.c:898: undefined reference to `_kBrotliPrefixCodeRang= es'

/usr/bin/ld: /home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCust= omDecompressLib/brotli/c/dec/decode.c:1193: undefined reference to `_kBrotl= iContextLookupTable'

/usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in functio= n `SafeDecodeCommandBlockSwitch':

/home/XXX/edk2-stable202211/MdeModulePkg/= Library/BrotliCustomDecompressLib/brotli/c/dec/decode.c:898: undefined refe= rence to `_kBrotliPrefixCodeRanges'

/usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltran= s.o: in function `SafeDecodeDistanceBlockSwitch':

/home/XXX/edk2-stable2022= 11/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/c/dec/decode.c:898= : undefined reference to `_kBrotliPrefixCodeRanges'

/usr/bin/ld: /tmp/cc7sin= RE.ltrans0.ltrans.o: in function `BrotliDecoderDestroyInstance':=

/home/XXX/e= dk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/c/de= c/state.c:136: undefined reference to `BrotliSharedDictionaryDestroyInstanc= e'

/usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function `BrotliUefiDecom= press':

/home/XXX/edk2-stable202211/MdeModulePkg/Library/BrotliCustomDecompr= essLib/brotli/c/dec/state.c:87: undefined reference to `BrotliSharedDiction= aryCreateInstance'

/usr/bin/ld: /tmp/cc7sinRE.ltrans0.ltrans.o: in function = `BrotliUefiDecompress':

/home/XXX/edk2-stable202211/MdeModulePkg/Library/Bro= tliCustomDecompressLib/brotli/c/dec/decode.c:898: undefined reference to `_= kBrotliPrefixCodeRanges'

/usr/bin/ld: /home/XXX/edk2-stable202211/MdeModuleP= kg/Library/BrotliCustomDecompressLib/brotli/c/dec/decode.c:1193: undefined = reference to `_kBrotliContextLookupTable'

<= p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:= auto;margin-left:72.0pt;background:white'>/usr/bin/ld: warning: creating DT_= TEXTREL in a PIE

collect2: error: ld returned 1 exit status

...

 

build.py= ...

 : error F002: Failed to build module

=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82/home/XXX/edk2-stable202211= /MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf [X64, GCC5, RELEASE]= <= o:p>

  • VS2019:
    • BBrotliDecompressLib.lib(s= tate.obj) : error LNK2001: unresolved external symbol BrotliDefaultFreeFunc=

BrotliDecompressLib.lib(state.obj) : err= or LNK2001: unresolved external symbol BrotliDefaultAllocFunc

BrotliDecompressLib.lib(state.obj) : error LNK2001: unresolv= ed external symbol BrotliSharedDictionaryCreateInstance

BrotliDecompressLib.lib(state.obj) : error LNK2001: unresolved ext= ernal symbol BrotliSharedDictionaryDestroyInstance

BrotliDecompressLib.lib(decode.obj) : error LNK2001: unresolved externa= l symbol _kBrotliPrefixCodeRanges

BrotliDecom= pressLib.lib(decode.obj) : error LNK2001: unresolved external symbol Brotli= SharedDictionaryAttach

BrotliDecompressLib.lib(= decode.obj) : error LNK2001: unresolved external symbol _kBrotliContextLook= upTable

d:\XXX\Build\OvmfX64\RELEASE_VS2019\X64= \MdeModulePkg\Core\DxeIplPeim\DxeIpl\DEBUG\DxeIpl.dll : fatal error LNK1120= : 7 unresolved externals

...<= /p>

build.py...

 : error 7000: Faile= d to execute command

      &nbs= p; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tool= s\MSVC\14.29.30133\bin\Hostx86\x86\nmake.exe /nologo tbuild [d:\XXX\Build\O= vmfX64\RELEASE_VS2019\X64\MdeModulePkg\Core\DxeIplPeim\DxeIpl]

 

 

--

<= p class=3DMsoNormal>Timothy<= /span>


= From: gaoliming <gaoliming@byosoft.com.cn>
Sent: Saturday, January 28, 2023 11:35 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Lin, Kuei-Hung (Timothy) = <Kuei-Hung.Lin@amd.com>;= He, Jiangang <Jiangang.He@amd.co= m>; Chang, Abner <Abner.Ch= ang@amd.com>; 'Kinney, Michael D' <michael.d.kinney@intel.com>
Cc: 'Bi, Danda= n' <dandan.bi@intel.com>; = Kirkendall, Garrett <Garre= tt.Kirkendall@amd.com>
Subject:
=E5=9B=9E=E5=A4=8D: [edk2-= devel] [PATCH V2] MdeModulePkg/Decompress: Add missing source file to Brotl= i library

 

= Caution: This message originated from an External = Source. Use proper caution when opening attachments, clicking links, or res= ponding.

 

Timothy:

 Thanks for your report. This is a real issue in Brotli dec= ompress library. Which tool chain has been verified? GCC5 or VS2019 or Both= ?

 =

Thanks<= /span>

Liming

=E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.gro= ups.io <devel@edk2.groups.io= > =E4=BB=A3=E8=A1=A8 Lin, Kuei-Hung (Timothy) via groups= .io
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B41=E6=9C=8813=E6=97=A5 6:18
=E6=94=B6=E4=BB= =B6=E4=BA=BA: He, Jiangang= <Jiangang.He@amd.com>; Ch= ang, Abner <Abner.Chang@amd.com>; Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
=E6=8A=84=E9=80=81: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Kirkendall, Ga= rrett <Garrett.Kirkendall@= amd.com>
=E4=B8=BB=E9=A2=98:<= /b> Re: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress:= Add missing source file to Brotli library

 

[AMD Official Use Only - General]

 =

This patch tried to fix= following build failure when linking the Brotli decompress lib.

 

Steps to replicate the issue:

1 - Attach a NULL lib to DxeIpl.inf in a= ny project's .DSC, say OvmfPkgX64.dsc

  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf = {

    <LibraryClasses>

      NULL|MdeModulePkg/Library/BrotliCustomDecompressLib= /BrotliCustomDecompressLib.inf

<= p class=3Dxmsonormal style=3D'background:white'>  }

2 - Follow the EDKII'2 package build steps to build= that project. Build.py would compliains with following errors.<= o:p>

...

<= p class=3Dxmsonormal style=3D'background:white'>/home/edk2/edk2-st= able202211/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/c/dec/deco= de.c:879: undefined reference to `_kBrotliPrefixCodeRanges'=

/usr/bin/ld: /home/edk2/edk2-stable202211/MdeModulePkg/Library/B= rotliCustomDecompressLib/brotli/c/dec/decode.c:1193: undefined reference to= `_kBrotliContextLookupTable'

/usr/bin/ld: /tmp/c= cKzzHN0.ltrans0.ltrans.o: in function `DecodeCommandBlockSwitch':

...

/usr/bin/ld: /t= mp/ccKzzHN0.ltrans0.ltrans.o: in function `BrotliUefiDecompress':

/home/edk2/edk2-stable202211/MdeModulePkg/Library/BrotliCu= stomDecompressLib/brotli/c/dec/decode.c:898: undefined reference to `_kBrot= liPrefixCodeRanges'

/usr/bin/ld: /home/edk2/edk2-stabl= e202211/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/c/dec/decode.= c:1193: undefined reference to `_kBrotliContextLookupTable'=

 

--

Timothy

 =

 

 

 


From: He, Jiangang <Jiangang.He@amd.com>
Sent:= Thursday, January 12, 2023 8:08 AM
To: Chang, Abner <Abner.Chang@amd.com>; Kinney, Mic= hael D <michael.d.kinney@i= ntel.com>; devel@edk2.groups= .io <devel@edk2.groups.io>; Lin, Kuei-Hung (Timothy) <Kuei-Hung.Lin@amd.com>
Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ki= rkendall, Garrett <Garrett= .Kirkendall@amd.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject:= RE: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing source fi= le to Brotli library

 

[AMD Official Use Only - General]

 =

Timothy will answer = the question.

 

From: Chang, Abner <Abner.Chang@amd.com>
Sent: Thursd= ay, January 12, 2023 10:05 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; = devel@edk2.groups.io
Cc:<= /b> Bi, Dandan <dandan.bi@intel.c= om>; Gao, Liming <gao= liming@byosoft.com.cn>; Kirkendall, Garrett <Garrett.Kirkendall@amd.com>; Kinney, Micha= el D <michael.d.kinney@int= el.com>; He, Jiangang <Jia= ngang.He@amd.com>
Subject: Re: [edk2-devel] [PATCH V2] Mde= ModulePkg/Decompress: Add missing source file to Brotli library<= /span>

 

[AMD Official Use Only - General]<= /span>

&= nbsp;

Hi Mike, 

CC Jiangang, he can give the clear answer.

 

Thanks

Abner 

&nbs= p;


<= span lang=3DEN-US style=3D'font-size:11.0pt;font-family:"Calibri",sans-seri= f;color:black'>From: Kinney, Michael D <michael.d.kinney@intel.com>=
Sent: Thursday, January 12, 2023 11:23:48 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Chang, Abner <= ;Abner.Chang@amd.com>
C= c: Bi, Dandan <dandan.bi@inte= l.com>; Gao, Liming <= gaoliming@byosoft.com.cn>; Kirkendall, Garrett <Garrett.Kirkendall@amd.com>; Kinney, Mi= chael D <michael.d.kinney@= intel.com>
Subject: RE: [edk2-devel] [PATCH V2] MdeModuleP= kg/Decompress: Add missing source file to Brotli library
=

 

Caution: This message originated from an External Source. Use proper= caution when opening attachments, clicking links, or responding.

Hi Abner,

What was the failure before this change?

This loo= ks like something that would always break the build of source files were mi= ssing.

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of = Chang, Abner via groups.io
> Sent: Wednesday, January 11, 2023 9:08 P= M
> To: devel@edk2.groups.io<= /a>
> Cc: Bi, Dandan <
danda= n.bi@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Garrett Kirkendall <garrett.kirkendall@amd.com>;<= br>> Abner Chang <abner.chang@= amd.com>
> Subject: [edk2-devel] [PATCH V2] MdeModulePkg/Decom= press: Add missing source file to Brotli library
>
> From: Abne= r Chang <abner.chang@amd.com&= gt;
>
> Add missing source files to Brotli library INF.
>=
> Signed-off-by: Jiangang He <jiangang.he@amd.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Liming Gao &l= t;gaoliming@byosoft.com.cn&= gt;
> Cc: Garrett Kirkendall <garrett.kirkendall@amd.com>
> Cc: Abner Chang <abner.chang@amd.com>
> --= -
>  .../BrotliCustomDecompressLib/BrotliCustomDecompressLib.inf=   | 5 +++++
>  1 file changed, 5 insertions(+)
>
&= gt; diff --git a/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliCusto= mDecompressLib.inf
> b/MdeModulePkg/Library/BrotliCustomDecompressLib= /BrotliCustomDecompressLib.inf
> index 525e92408d6..244c2e35023 10064= 4
> --- a/MdeModulePkg/Library/BrotliCustomDecompressLib/BrotliCustom= DecompressLib.inf
> +++ b/MdeModulePkg/Library/BrotliCustomDecompress= Lib/BrotliCustomDecompressLib.inf
> @@ -5,6 +5,7 @@
>  #&n= bsp; Brotli was released on the website https://github.com/google/brotli.
>  #
>&nbs= p; #  Copyright (c) 2017 - 2020, Intel Corporation. All rights reserve= d.<BR>
> +#  Copyright (C) 2023 Advanced Micro Devices, In= c. All rights reserved.<BR>
>  #
>  #  SPD= X-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -41,6 = +42,10 @@
>    # Wrapper header files end #
>&nb= sp;   brotli/c/common/dictionary.c
>    brot= li/c/common/transform.c
> +  brotli/c/common/context.c
> +=   brotli/c/common/platform.c
> +  brotli/c/common/constants= .c
> +  brotli/c/common/shared_dictionary.c
>  &= nbsp; brotli/c/dec/bit_reader.c
>    brotli/c/dec/deco= de.c
>    brotli/c/dec/huffman.c
> --
> 2.= 37.1.windows.1
>
>
>
>
>

------=_NextPart_000_01AC_01D93576.22CD4030--