public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [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
  2023-11-06 21:54 ` [edk2-devel] [PATCH v1 0/1] " Michael D Kinney
  0 siblings, 2 replies; 4+ 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] 4+ messages in thread

* [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild.py: Clarify make error
  2023-11-06 20:08 [edk2-devel] [PATCH v1 0/1] Edk2ToolsBuild.py: Clarify make error Joey Vagedes via groups.io
@ 2023-11-06 20:08 ` Joey Vagedes via groups.io
  2023-11-06 21:54 ` [edk2-devel] [PATCH v1 0/1] " Michael D Kinney
  1 sibling, 0 replies; 4+ 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] 4+ messages in thread

* Re: [edk2-devel] [PATCH v1 0/1] Edk2ToolsBuild.py: Clarify make error
  2023-11-06 20:08 [edk2-devel] [PATCH v1 0/1] Edk2ToolsBuild.py: Clarify make error Joey Vagedes via groups.io
  2023-11-06 20:08 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
@ 2023-11-06 21:54 ` Michael D Kinney
  2023-11-06 22:47   ` Joey Vagedes via groups.io
  1 sibling, 1 reply; 4+ messages in thread
From: Michael D Kinney @ 2023-11-06 21:54 UTC (permalink / raw)
  To: devel@edk2.groups.io, joeyvagedes@microsoft.com; +Cc: Kinney, Michael D

What is the random data at the end of your path emails???

Thanks,

Mike

> -----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:09 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v1 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.
> 
> 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
> 
> \x06®‹©²*
> Šy,b‹«yÇ¢½æ¥–g¬±¨\x1e²Ç§¶Ú-†+ ®‹©V'°ý\x17©—#§–)Þ×];çˆm¶›?ýçdÚ
> 躛"£ø?uëÞ—
> ùž²Æ {ýuÓ¾x2ë^N\x18¬NŠbr^[m¦Ïÿ‚º.¦È¨þk\x7f×M¸ÛÎüïýzã~=èj躓°êÝz÷¥úŒ'z·“h+¢ê
> lŠ…'²æìr¸›z^[m¦ÏÿyÙ6‚º.¦È¨þ\x0fÝz÷¥þéì¹¹¢r\x16ž•Ù"žw²Š{^•Ê&


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110761): https://edk2.groups.io/g/devel/message/110761
Mute This Topic: https://groups.io/mt/102428787/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] 4+ messages in thread

* Re: [edk2-devel] [PATCH v1 0/1] Edk2ToolsBuild.py: Clarify make error
  2023-11-06 21:54 ` [edk2-devel] [PATCH v1 0/1] " Michael D Kinney
@ 2023-11-06 22:47   ` Joey Vagedes via groups.io
  0 siblings, 0 replies; 4+ messages in thread
From: Joey Vagedes via groups.io @ 2023-11-06 22:47 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Kinney, Michael D

I made a recent change to how I use git send-email:

I follow Laszlo's unkempt git guide for edk2 contributors and maintainers. There was a recent update to add --transfer-encoding=base64 to the git send-email command. My guess is that caused the random data. I do not see that data on the "send" side in my outbox, however.

https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers/_compare/385073186afb8dd7cb8af4c9fcd96d86423fd9d3

Joey

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com> 
Sent: Monday, November 6, 2023 1:54 PM
To: devel@edk2.groups.io; Joey Vagedes <joeyvagedes@microsoft.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [EXTERNAL] RE: [edk2-devel] [PATCH v1 0/1] Edk2ToolsBuild.py: Clarify make error

What is the random data at the end of your path emails???

Thanks,

Mike

> -----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:09 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v1 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Ftianocore%2Fedk2%2Fdiscussions%2F4611&data=05%7C01%7Cjoeyvage
> des%40microsoft.com%7C271dfa9b91c844696b5808dbdf12e82c%7C72f988bf86f14
> 1af91ab2d7cd011db47%7C1%7C0%7C638349044524508743%7CUnknown%7CTWFpbGZsb
> 3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> 7C3000%7C%7C%7C&sdata=5aewZruHiYbB9dBtbVegXeJmDdMre5oWasFWCnSmYDc%3D&r
> eserved=0
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstac
> koverflow.com%2Fquestions%2F77421168%2Fedkii-base-tools-fails-&data=05
> %7C01%7Cjoeyvagedes%40microsoft.com%7C271dfa9b91c844696b5808dbdf12e82c
> %7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638349044524515634%7CUnk
> nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWw
> iLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=P2GDkAZrpm1pZHE9Vl4RKLszDTEzAGW7
> xF5Wh%2Byakkw%3D&reserved=0
> to-build
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Ftianocore%2Fedk2-pytool-extensions%2Fissues%2F180&data=05%7C0
> 1%7Cjoeyvagedes%40microsoft.com%7C271dfa9b91c844696b5808dbdf12e82c%7C7
> 2f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638349044524521511%7CUnknown
> %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
> XVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uahh%2FKPyyLsf19R0WLszjkWGRg6x3jVLq7
> GDGuBdS4o%3D&reserved=0
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Ftianocore%2Fedk2-pytool-extensions%2Fissues%2F207&data=05%7C0
> 1%7Cjoeyvagedes%40microsoft.com%7C271dfa9b91c844696b5808dbdf12e82c%7C7
> 2f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638349044524526191%7CUnknown
> %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
> XVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MvX3P5bYPvwI7z%2BDiy%2Bbezj0kBEx51RQ
> GTkoS6WUiDI%3D&reserved=0
> 
> 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
> 
> \x06®‹©²*
> Šy,b‹«yÇ¢½æ¥–g¬±¨\x1e²Ç§¶Ú-†+ ®‹©V'°ý\x17©—#§–)Þ×];çˆm¶›?ýçdÚ èº›"£ø?uëÞ— 
> ùž²Æ {ýuÓ¾x2ë^N\x18¬NŠbr^[m¦Ïÿ‚º.¦È¨þk\x7f×M¸ÛÎüïýzã~=èj躓°êÝz÷¥úŒ'z·“h+¢ê
> lŠ…'²æìr¸›z^[m¦ÏÿyÙ6‚º.¦È¨þ\x0fÝz÷¥þéì¹¹¢r\x16ž•Ù"žw²Š{^•Ê&


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110769): https://edk2.groups.io/g/devel/message/110769
Mute This Topic: https://groups.io/mt/102428787/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-06 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 20:08 [edk2-devel] [PATCH v1 0/1] Edk2ToolsBuild.py: Clarify make error Joey Vagedes via groups.io
2023-11-06 20:08 ` [edk2-devel] [PATCH v1 1/1] BaseTools: " Joey Vagedes via groups.io
2023-11-06 21:54 ` [edk2-devel] [PATCH v1 0/1] " Michael D Kinney
2023-11-06 22:47   ` 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