* [edk2-devel] [PATCH v2 0/1] Edk2ToolsBuild.py: Clarify make error
@ 2023-11-06 20:12 Joey Vagedes via groups.io
2023-11-06 20:12 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
2023-11-06 21:55 ` [edk2-devel] [PATCH v2 0/1] " Michael D Kinney
0 siblings, 2 replies; 5+ messages in thread
From: Joey Vagedes via groups.io @ 2023-11-06 20:12 UTC (permalink / raw)
To: devel; +Cc: Rebecca Cran, Liming Gao, Bob Feng, Yuwei Chen
When make or nmake fails to build the basetools, Edk2ToolsBuild.py
currently prints a generic error message "Failed to build." and
raises an exception. This has two issues: The first is that it raises
an exception, which leads people to believe it is a python issue, and
not a build issue. The second is that users don't necessarily know to
check the build log if this error occurs.
This has been reported many times through many different avenues:
https://github.com/tianocore/edk2/discussions/4611
https://stackoverflow.com/questions/77421168/edkii-base-tools-fails-to-build
https://github.com/tianocore/edk2-pytool-extensions/issues/180
https://github.com/tianocore/edk2-pytool-extensions/issues/207
This patch series changes the exception to a error log so that the invocable
completes and returns a non-zero exit code and also logs a more descriptive
error that informs the user to review the build log, and where to find it.
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Joey Vagedes (1):
BaseTools: Edk2ToolsBuild.py: Clarify make error
BaseTools/Edk2ToolsBuild.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild.py: Clarify make error
2023-11-06 20:12 [edk2-devel] [PATCH v2 0/1] Edk2ToolsBuild.py: Clarify make error Joey Vagedes via groups.io
@ 2023-11-06 20:12 ` Joey Vagedes via groups.io
2023-11-06 21:14 ` Rebecca Cran
2023-11-06 21:55 ` [edk2-devel] [PATCH v2 0/1] " Michael D Kinney
1 sibling, 1 reply; 5+ messages in thread
From: Joey Vagedes via groups.io @ 2023-11-06 20:12 UTC (permalink / raw)
To: devel; +Cc: Rebecca Cran, Liming Gao, Bob Feng, Yuwei Chen
Clarify to users that they should review the build log when make
(POSIX-like system) or nmake (Windows) fails to compile basetools.
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com>
---
BaseTools/Edk2ToolsBuild.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py
index 425bb1b63963..4776c583080f 100644
--- a/BaseTools/Edk2ToolsBuild.py
+++ b/BaseTools/Edk2ToolsBuild.py
@@ -141,7 +141,9 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
for level, problem in problems:
logging.log(level, problem)
if ret != 0:
- raise Exception("Failed to build.")
+ e = "Failed to run nmake.exe. Review Buildlog at BaseTools/BaseToolsBuild/BASETOOLS_BUILD.txt for nmake.exe error."
+ logging.error(e)
+ return ret
self.WritePathEnvFile(self.OutputDir)
return ret
@@ -156,7 +158,9 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
for level, problem in problems:
logging.log(level, problem)
if ret != 0:
- raise Exception("Failed to build.")
+ e = "Failed to run make. Review Buildlog at BaseTools/BaseToolsBuild/BASETOOLS_BUILD.txt for make error."
+ logging.error(e)
+ return ret
self.OutputDir = os.path.join(
shell_env.get_shell_var("EDK_TOOLS_PATH"), "Source", "C", "bin")
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild.py: Clarify make error
2023-11-06 20:12 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
@ 2023-11-06 21:14 ` Rebecca Cran
0 siblings, 0 replies; 5+ messages in thread
From: Rebecca Cran @ 2023-11-06 21:14 UTC (permalink / raw)
To: Joey Vagedes, devel; +Cc: Liming Gao, Bob Feng, Yuwei Chen
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
--
Rebecca Cran
On 11/6/2023 1:12 PM, Joey Vagedes wrote:
> Clarify to users that they should review the build log when make
> (POSIX-like system) or nmake (Windows) fails to compile basetools.
>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com>
> ---
> BaseTools/Edk2ToolsBuild.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py
> index 425bb1b63963..4776c583080f 100644
> --- a/BaseTools/Edk2ToolsBuild.py
> +++ b/BaseTools/Edk2ToolsBuild.py
> @@ -141,7 +141,9 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
> for level, problem in problems:
> logging.log(level, problem)
> if ret != 0:
> - raise Exception("Failed to build.")
> + e = "Failed to run nmake.exe. Review Buildlog at BaseTools/BaseToolsBuild/BASETOOLS_BUILD.txt for nmake.exe error."
> + logging.error(e)
> + return ret
>
> self.WritePathEnvFile(self.OutputDir)
> return ret
> @@ -156,7 +158,9 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
> for level, problem in problems:
> logging.log(level, problem)
> if ret != 0:
> - raise Exception("Failed to build.")
> + e = "Failed to run make. Review Buildlog at BaseTools/BaseToolsBuild/BASETOOLS_BUILD.txt for make error."
> + logging.error(e)
> + return ret
>
> self.OutputDir = os.path.join(
> shell_env.get_shell_var("EDK_TOOLS_PATH"), "Source", "C", "bin")
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110759): https://edk2.groups.io/g/devel/message/110759
Mute This Topic: https://groups.io/mt/102428862/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v2 0/1] Edk2ToolsBuild.py: Clarify make error
2023-11-06 20:12 [edk2-devel] [PATCH v2 0/1] Edk2ToolsBuild.py: Clarify make error Joey Vagedes via groups.io
2023-11-06 20:12 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
@ 2023-11-06 21:55 ` Michael D Kinney
1 sibling, 0 replies; 5+ messages in thread
From: Michael D Kinney @ 2023-11-06 21:55 UTC (permalink / raw)
To: devel@edk2.groups.io, joeyvagedes@microsoft.com
Cc: Rebecca Cran, Gao, Liming, Feng, Bob C, Chen, Christine,
Kinney, Michael D
Series Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Joey
> Vagedes via groups.io
> Sent: Monday, November 6, 2023 12:12 PM
> To: devel@edk2.groups.io
> Cc: Rebecca Cran <rebecca@bsdio.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen,
> Christine <yuwei.chen@intel.com>
> Subject: [edk2-devel] [PATCH v2 0/1] Edk2ToolsBuild.py: Clarify make
> error
>
> When make or nmake fails to build the basetools, Edk2ToolsBuild.py
> currently prints a generic error message "Failed to build." and
> raises an exception. This has two issues: The first is that it raises
> an exception, which leads people to believe it is a python issue, and
> not a build issue. The second is that users don't necessarily know to
> check the build log if this error occurs.
>
> This has been reported many times through many different avenues:
>
> https://github.com/tianocore/edk2/discussions/4611
> https://stackoverflow.com/questions/77421168/edkii-base-tools-fails-
> to-build
> https://github.com/tianocore/edk2-pytool-extensions/issues/180
> https://github.com/tianocore/edk2-pytool-extensions/issues/207
>
> This patch series changes the exception to a error log so that the
> invocable
> completes and returns a non-zero exit code and also logs a more
> descriptive
> error that informs the user to review the build log, and where to find
> it.
>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
>
> Joey Vagedes (1):
> BaseTools: Edk2ToolsBuild.py: Clarify make error
>
> BaseTools/Edk2ToolsBuild.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> --
> 2.34.1
>
> \x1aº.¦È¨.)䱊.ç\x1eŠ÷š–
> Yž²Æ zË\x1ežÛh¶\x18¬‚º.¥XžÃô^¦\ŽžX§{]tïž¡¶Úlÿ÷“h+¢êlŠàýׯz_æzË\x1aïõ×NùèËy8
> b±:)‰Èm¶›?þ
> 躛"£ùÿ]6ão<ë_õëø÷¡«¢êNÂw«uëÞ—ê0êÞvM ®‹©²*\x14žË›±Êâmèm¶›?ýçdÚ
> 躛"£ø?uëÞ—û§²ææ‰ÈZzWdŠyÞÊ)ízW(
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110762): https://edk2.groups.io/g/devel/message/110762
Mute This Topic: https://groups.io/mt/102428861/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* [edk2-devel] [PATCH v1 0/1] Edk2ToolsBuild.py: Clarify make error
@ 2023-11-06 20:08 Joey Vagedes via groups.io
2023-11-06 20:08 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
0 siblings, 1 reply; 5+ messages in thread
From: Joey Vagedes via groups.io @ 2023-11-06 20:08 UTC (permalink / raw)
To: devel
When make or nmake fails to build the basetools, Edk2ToolsBuild.py
currently prints a generic error message "Failed to build." and
raises an exception. This has two issues: The first is that it raises
an exception, which leads people to believe it is a python issue, and
not a build issue. The second is that users don't necessarily know to
check the build log if this error occurs.
This has been reported many times through many different avenues:
https://github.com/tianocore/edk2/discussions/4611
https://stackoverflow.com/questions/77421168/edkii-base-tools-fails-to-build
https://github.com/tianocore/edk2-pytool-extensions/issues/180
https://github.com/tianocore/edk2-pytool-extensions/issues/207
This patch series changes the exception to a error log so that the invocable
completes and returns a non-zero exit code and also logs a more descriptive
error that informs the user to review the build log, and where to find it.
Joey Vagedes (1):
BaseTools: Edk2ToolsBuild.py: Clarify make error
BaseTools/Source/C/Common/BinderFuncs.c | 2 +-
BaseTools/Edk2ToolsBuild.py | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild.py: Clarify make error
2023-11-06 20:08 [edk2-devel] [PATCH v1 " Joey Vagedes via groups.io
@ 2023-11-06 20:08 ` Joey Vagedes via groups.io
0 siblings, 0 replies; 5+ messages in thread
From: Joey Vagedes via groups.io @ 2023-11-06 20:08 UTC (permalink / raw)
To: devel; +Cc: Rebecca Cran, Liming Gao, Bob Feng, Yuwei Chen
Clarify to users that they should review the build log when make
(POSIX-like system) or nmake (Windows) fails to compile basetools.
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com>
---
BaseTools/Source/C/Common/BinderFuncs.c | 2 +-
BaseTools/Edk2ToolsBuild.py | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/Common/BinderFuncs.c b/BaseTools/Source/C/Common/BinderFuncs.c
index de835287e95c..8c08bef7a0f0 100644
--- a/BaseTools/Source/C/Common/BinderFuncs.c
+++ b/BaseTools/Source/C/Common/BinderFuncs.c
@@ -21,7 +21,7 @@ CommonLibBinderAllocate (
)
{
return (VOID *) malloc (Size);
-}
+}asdf
VOID
CommonLibBinderFree (
diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py
index 425bb1b63963..4776c583080f 100644
--- a/BaseTools/Edk2ToolsBuild.py
+++ b/BaseTools/Edk2ToolsBuild.py
@@ -141,7 +141,9 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
for level, problem in problems:
logging.log(level, problem)
if ret != 0:
- raise Exception("Failed to build.")
+ e = "Failed to run nmake.exe. Review Buildlog at BaseTools/BaseToolsBuild/BASETOOLS_BUILD.txt for nmake.exe error."
+ logging.error(e)
+ return ret
self.WritePathEnvFile(self.OutputDir)
return ret
@@ -156,7 +158,9 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
for level, problem in problems:
logging.log(level, problem)
if ret != 0:
- raise Exception("Failed to build.")
+ e = "Failed to run make. Review Buildlog at BaseTools/BaseToolsBuild/BASETOOLS_BUILD.txt for make error."
+ logging.error(e)
+ return ret
self.OutputDir = os.path.join(
shell_env.get_shell_var("EDK_TOOLS_PATH"), "Source", "C", "bin")
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-06 21:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 20:12 [edk2-devel] [PATCH v2 0/1] Edk2ToolsBuild.py: Clarify make error Joey Vagedes via groups.io
2023-11-06 20:12 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
2023-11-06 21:14 ` Rebecca Cran
2023-11-06 21:55 ` [edk2-devel] [PATCH v2 0/1] " Michael D Kinney
-- strict thread matches above, loose matches on Subject: below --
2023-11-06 20:08 [edk2-devel] [PATCH v1 " Joey Vagedes via groups.io
2023-11-06 20:08 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox