On 2023-09-13 16:14, Baesken, Matthias wrote:
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 )
In this case you were lucky and the actual error was printed just a line
above. In general, this is not the case, since output from different
jobs can be intermingled, so a more typical scenario is that the real
error message is printed tens or maybe hundreds of lines before the "]
Error " line. The "] Error " line just marks the *last* line in the log
that it is meaningful to look at -- anything relevant to the failure
must be presented above it, but not necessarily just above it.
Maybe we can present this so it comes across more clearly to the
developers, but I do not really know how. I've just resigned at the fact
that no-one really reads the output from the build system. ;-)
/Magnus
Best regards, Matthias
*From:*Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com>
*Sent:* Wednesday, 13 September 2023 15:18
*To:* Baesken, Matthias <matthias.baes...@sap.com>; build-dev@openjdk.org
*Cc:* Zeller, Arno <arno.zel...@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 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