From: "Bob Feng" <bob.c.feng@intel.com>
To: "Gao, Liming" <liming.gao@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [Patch][edk2-stable201908] BaseTools: Incorrect error message for library instance not found
Date: Wed, 21 Aug 2019 14:02:53 +0000 [thread overview]
Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D161526C8F@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4D954A@SHSMSX104.ccr.corp.intel.com>
Yes. I'll double check this patch.
Thanks,
Bob
-----Original Message-----
From: Gao, Liming
Sent: Wednesday, August 21, 2019 9:59 PM
To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io
Subject: RE: [Patch][edk2-stable201908] BaseTools: Incorrect error message for library instance not found
Bob:
After I apply this patch, I will meet with build failure to build -p MdePkg\MdePkg.dsc. Can you help check it?
Thanks
Liming
> -----Original Message-----
> From: Feng, Bob C
> Sent: Wednesday, August 21, 2019 2:27 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [Patch][edk2-stable201908] BaseTools: Incorrect error message
> for library instance not found
>
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2099
> This is a regression issue introduced by commit e8449e.
>
> This patch is to fix this issue.
>
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> ---
> BaseTools/Source/Python/AutoGen/DataPipe.py | 2 +-
> BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 +-
> BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 4 +++-
> BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 3 ++-
> 4 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/BaseTools/Source/Python/AutoGen/DataPipe.py
> b/BaseTools/Source/Python/AutoGen/DataPipe.py
> index 2ca4f9ff4a..8b8cfd1c51 100755
> --- a/BaseTools/Source/Python/AutoGen/DataPipe.py
> +++ b/BaseTools/Source/Python/AutoGen/DataPipe.py
> @@ -87,11 +87,11 @@ class MemoryDataPipe(DataPipe):
> #Module's Library Instance
> ModuleLibs = {}
> libModules = {}
> for m in PlatformInfo.Platform.Modules:
> module_obj = BuildDB.BuildObject[m,PlatformInfo.Arch,PlatformInfo.BuildTarget,PlatformInfo.ToolChain]
> - Libs = GetModuleLibInstances(module_obj, PlatformInfo.Platform, BuildDB.BuildObject,
> PlatformInfo.Arch,PlatformInfo.BuildTarget,PlatformInfo.ToolChain)
> + Libs = GetModuleLibInstances(module_obj,
> + PlatformInfo.Platform, BuildDB.BuildObject,
> PlatformInfo.Arch,PlatformInfo.BuildTarget,PlatformInfo.ToolChain,PlatformInfo.MetaFile,EdkLogger)
> for lib in Libs:
> try:
>
> libModules[(lib.MetaFile.File,lib.MetaFile.Root,lib.Arch,lib.MetaFile.Path)].append((m.File,m.Root,module_obj.Arch,m.Path))
> except:
>
> libModules[(lib.MetaFile.File,lib.MetaFile.Root,lib.Arch,lib.MetaFile.
> Path)] = [(m.File,m.Root,module_obj.Arch,m.Path)]
> diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> index dd629ba2fa..565424a95e 100644
> --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> @@ -1087,11 +1087,11 @@ class PlatformAutoGen(AutoGen):
> def GetAllModuleInfo(self,WithoutPcd=True):
> ModuleLibs = set()
> for m in self.Platform.Modules:
> module_obj = self.BuildDatabase[m,self.Arch,self.BuildTarget,self.ToolChain]
> if not bool(module_obj.LibraryClass):
> - Libs = GetModuleLibInstances(module_obj, self.Platform, self.BuildDatabase, self.Arch,self.BuildTarget,self.ToolChain)
> + Libs = GetModuleLibInstances(module_obj,
> + self.Platform, self.BuildDatabase,
> self.Arch,self.BuildTarget,self.ToolChain,self.MetaFile,EdkLogger)
> else:
> Libs = []
>
> ModuleLibs.update(
> set([(l.MetaFile.File,l.MetaFile.Root,l.MetaFile.Path,l.MetaFile.BaseN
> ame,l.MetaFile.OriginalPath,l.Arch,True) for l in
> Libs]))
> if WithoutPcd and module_obj.PcdIsDriver:
> continue
> diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> index ea0d8f8bfb..2494267472 100644
> --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
> @@ -246,11 +246,13 @@ class WorkspaceAutoGen(AutoGen):
> if BuildData.MetaFile.Ext == '.inf' and str(BuildData) in Platform.Modules :
> Libs.extend(GetModuleLibInstances(BuildData, Platform,
> self.BuildDatabase,
> Arch,
> self.BuildTarget,
> - self.ToolChain
> + self.ToolChain,
> + self.Platform.MetaFile,
> + EdkLogger
> ))
> for BuildData in list(self.BuildDatabase._CACHE_.values()):
> if BuildData.Arch != Arch:
> continue
> if BuildData.MetaFile.Ext == '.inf':
> diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py
> b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py
> index 76583f46e5..cbbd550dbd 100644
> --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py
> +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py
> @@ -13,10 +13,11 @@ from .BuildClassObject import LibraryClassObject
> import Common.GlobalData as GlobalData from
> Workspace.BuildClassObject import StructurePcd from
> Common.BuildToolError import RESOURCE_NOT_AVAILABLE from
> Common.BuildToolError import OPTION_MISSING from
> Common.BuildToolError import BUILD_ERROR
> +import Common.EdkLogger as EdkLogger
>
> class OrderedListDict(OrderedDict):
> def __init__(self, *args, **kwargs):
> super(OrderedListDict, self).__init__(*args, **kwargs)
> self.default_factory = list
> @@ -83,11 +84,11 @@ def GetDeclaredPcd(Platform, BuildDatabase, Arch,
> Target, Toolchain, additionalP # @param Target: Current target #
> @param Toolchain: Current toolchain # @retval: List of dependent
> libraries which are InfBuildData instances # def
> GetLiabraryInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain):
> - return GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain)
> + return GetModuleLibInstances(Module, Platform, BuildDatabase,
> + Arch, Target, Toolchain,Platform.MetaFile,EdkLogger)
>
> def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain, FileName = '', EdkLogger = None):
> if Module.LibInstances:
> return Module.LibInstances
> ModuleType = Module.ModuleType
> --
> 2.20.1.windows.1
prev parent reply other threads:[~2019-08-21 14:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 6:26 [Patch][edk2-stable201908] BaseTools: Incorrect error message for library instance not found Bob Feng
2019-08-21 13:58 ` Liming Gao
2019-08-21 14:02 ` Bob Feng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=08650203BA1BD64D8AD9B6D5D74A85D161526C8F@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox