error extraction form build log (in case of bash: Permission denied error on Windows)
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Sep 13 13:17:34 UTC 2023
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 causedthe 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 errorreporting addition in this case.
>
> Best regards, Matthias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20230913/fe6f3616/attachment-0001.htm>
More information about the build-dev
mailing list