error extraction form build log (in case of bash: Permission denied error on Windows)
Baesken, Matthias
matthias.baesken at sap.com
Wed Sep 13 14:14:11 UTC 2023
I found the "] Error " - advice unfortunately AFTER I did some searching through the log (seems I overlooked it at first because I searched for a compile errors and not for such “hints” ) .
But in this case it worked , so my idea was - why not automatically extract it using this pattern ?
( but maybe this would be too easy )
Best regards, Matthias
From: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
Sent: Wednesday, 13 September 2023 15:18
To: Baesken, Matthias <matthias.baesken at sap.com>; build-dev at openjdk.org
Cc: Zeller, Arno <arno.zeller at sap.com>
Subject: Re: error extraction form build log (in case of bash: Permission denied error on Windows)
Hi Matthias,
Let me see if I get this correct. You got a build failure, and the built-in system could not diagnose it. Instead, it suggested that you should search the build log for '] Error'. Instead, of doing this, you scrolled through the entire log, just to find that the actual error message was printed close to '] Error'..?
What exactly are we to do about this?
The reason we do not extract this information to the build failure summary is that it is not possible (or, if possible, extremely non-trivial). Instead, we direct the user on how to best go ahead to try and find this information themselves. Fixing users not reading or following suggestions is unfortunately out of scope for the build system. ;-)
There is no point in trying to search for this particular error and repeat it to the user. The "No indication of failed target found. Try searching the build log for '] Error'." is our generic fallback when we have no way to determine the cause of failure. There are a myriad ways of the build to fail in that case, if we start adding special cases to this, there will be no end.
/Magnus
On 2023-09-08 13:19, Baesken, Matthias wrote:
Hello,
A Windows build failed because of some temporary "Permission denied" issue we see sometimes on Windows.
Unfortunately at the end of the log not much info is found, the error is not reported there .
.....
if /usr/bin/grep -q "recipe for target .* failed" .......
No indication of failed target found.
HELP: Try searching the build log for '] Error'.
printf "HELP: Run 'make doctor' to diagnose build problems.\n\n"
HELP: Run 'make doctor' to diagnose build problems.
After a lot of scrolling through the endless build log, I found in the middle of the build.log:
make[3]: /usr/bin/bash: Permission denied
make[3]: *** [Lib.gmk:62: /cygdrive/C/Windows_x64/jdk-build-fastdebug/support/native/jdk.jpackage/jpackageapplauncher/MsiDb.obj] Error 127
make[3]: *** Waiting for unfinished jobs....
which probably caused the error.
Could we maybe add a grep for "bash: Permission denied" or for the recommended "] Error " at the end of the build log ?
At least the grep/search for "] Error " finds the issue pretty fast and looks like a good error reporting addition in this case.
Best regards, Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20230913/1d5c7a97/attachment.htm>
More information about the build-dev
mailing list