From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.755.1655268885636121507 for ; Tue, 14 Jun 2022 21:54:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=UBNbJVwl; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655268885; x=1686804885; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ww5PLeJyPieP+1/qcwNps2Ph96DZIRfIz78EyIvNtzg=; b=UBNbJVwlmLzPsbftW2kqV4dyQTlFCWreCQ2a5xlgeHKi1UXF22L5L3j7 g4FXbSNB9cU6163zXgV1z6K+5vFyarx1Dek583kWfYdvjAjuwgklaPj6B k8pYp2kiHmEJ4OWWjkOCU3xB/327bq7wfWp5QySSriR052RLwgFm91gxN w4T1z3pHab3dktrm879ADhHogxVFjx9sPUhKMp7QOCzefywdJvZwtambV 5HQCGZodgBYNwlZByAsXKO4/jVE4TmtEgsJ3wUmNO/NyD53gt8rEkeHcm 2apoBeSyeVrcjvQftiR4lyB7arReYAELzIIA6FqTSMO7ph/W8mpuw9hx6 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10378"; a="278880526" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="278880526" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 21:54:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="674278822" Received: from shwdeopenlab706.ccr.corp.intel.com ([10.239.183.102]) by FMSMGA003.fm.intel.com with ESMTP; 14 Jun 2022 21:54:44 -0700 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH] BaseTools: output the intermediate library instance when error occurs Date: Wed, 15 Jun 2022 12:54:39 +0800 Message-Id: <20220615045439.147-1-ray.ni@intel.com> X-Mailer: git-send-email 2.35.1.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When a module "Module" depends on a library instance "Lib1" which depends on "Lib2" which depends on "Lib3" ... depends on "LibN", but "LibN" doesn't support the type (e.g.: SEC) of the "Module", the following error messages are printed by build tool: (...): error 1001: Module by library instance [] consumed by [] But it's unclear to user how LibN is consumed by the Module. With the patch, following errors are printed: (...): error 1001: Module by library instance [] consumed by library instance [] which is consumed by module[] It doesn't print all the intermediate library instances between the Module and LibN but at least the path of Lib N-1 can help users to help how to fix the build errors. I hope this patch can be a trigger point that a better solution could be developed by tool experts to print all the library instances between the Module and LibN. Signed-off-by: Ray Ni Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py index 53027a0e30..9e506fc646 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -150,7 +150,9 @@ def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolcha EdkLogger.error("build", OPTION_MISSING, "Module type [%s] is not supported by library instance [%s]" \ % (ModuleType, LibraryPath), File=FileName, - ExtraData="consumed by [%s]" % str(Module)) + ExtraData="consumed by library instance [%s] which is consumed by module [%s]" \ + % (str(M), str(Module)) + ) else: return [] -- 2.35.1.windows.2