<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-DE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">I found  the  </span><span lang="en-DE">"] Error "   </span><span lang="EN-US">- 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” ) .<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But in this case it worked , so my idea was -  why not automatically extract it  using this pattern ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">( but maybe this would be too easy )<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards, Matthias<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="en-DE"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:#2000">From:</span></b><span lang="EN-US" style="mso-fareast-language:#2000"> Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>
<br>
<b>Sent:</b> Wednesday, 13 September 2023 15:18<br>
<b>To:</b> Baesken, Matthias <matthias.baesken@sap.com>; build-dev@openjdk.org<br>
<b>Cc:</b> Zeller, Arno <arno.zeller@sap.com><br>
<b>Subject:</b> Re: error extraction form build log (in case of bash: Permission denied error on Windows)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hi Matthias,<span style="mso-fareast-language:#2000"><o:p></o:p></span></p>
<p>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
<span lang="en-DE">'] Error'. Instead, of doing this, you scrolled through the entire log, just to find that the actual error message was printed close to '] Error'..?</span><o:p></o:p></p>
<p><span lang="en-DE">What exactly are we to do about this?</span><o:p></o:p></p>
<p><span lang="en-DE">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. ;-)</span><o:p></o:p></p>
<p><span lang="en-DE">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.</span><o:p></o:p></p>
<p><span lang="en-DE">/Magnus</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On 2023-09-08 13:19, Baesken, Matthias wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hello, </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">A Windows build failed because of some temp</span><span lang="EN-US">orary
</span><span lang="en-DE"> "Perm</span><span lang="EN-US">i</span><span lang="en-DE">ssion denied" issue we see sometimes on Windows.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">Unfortunately at the end of the log not much info is found, the error is not reported there .</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">.....</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">if /usr/bin/grep -q "recipe for target .* failed"  .......</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">No indication of failed target found.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">HELP: Try searching the build log for '] Error'.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">printf "HELP: Run 'make doctor' to diagnose build problems.\n\n"</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">HELP: Run 'make doctor' to diagnose build problems.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">After a lot of scrolling  through the endless build log, I found
</span><span lang="EN-US">in the middle of the build.log</span><span lang="en-DE">:</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="en-DE">make[3]: /usr/bin/bash: Permission denied</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="en-DE">make[3]: *** [Lib.gmk:62: /cygdrive/C/Windows_x64/jdk-build-fastdebug/support/native/jdk.jpackage/jpackageapplauncher/MsiDb.obj] Error 127</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="en-DE">make[3]: *** Waiting for unfinished jobs....</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">which probably cause</span><span lang="EN-US">d</span><span lang="en-DE"> the error.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">Could we maybe add a grep for  "bash: Permission denied" or for the recommended 
</span><span lang="EN-US">  </span><span lang="en-DE">"] Error "    at the end of the
</span><span lang="EN-US">build </span><span lang="en-DE">log ?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE">At least the grep/search for  "] Error "  finds the issue pretty fast and looks like a good erro</span><span lang="EN-US">r</span><span lang="en-DE"> reporting addition in this case.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Best regards, Matthias</span><o:p></o:p></p>
</blockquote>
</div>
</body>
</html>