<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>On 2023-09-13 16:14, Baesken, Matthias wrote:</p>
    <blockquote type="cite" cite="mid:AM9PR02MB67702D29AA881C7FBCBA577A93F0A@AM9PR02MB6770.eurprd02.prod.outlook.com">
      
      <meta name="Generator" content="Microsoft Word 15 (filtered medium)">
      <style>@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;}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;}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]-->
      <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 )</span></p>
      </div>
    </blockquote>
    <p>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 <span lang="EN-US"> </span><span lang="en-DE">"]
        Error " line. The </span><span lang="EN-US"> </span><span lang="en-DE">"] 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.</span></p>
    <p><span lang="en-DE">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. ;-)</span></p>
    <p><span lang="en-DE">/Magnus<br>
      </span><span lang="en-DE"></span></p>
    <p><span lang="en-DE"><br>
      </span></p>
    <p><span lang="en-DE"><br>
      </span></p>
    <p><span lang="en-DE"></span></p>
    <blockquote type="cite" cite="mid:AM9PR02MB67702D29AA881C7FBCBA577A93F0A@AM9PR02MB6770.eurprd02.prod.outlook.com">
      <div class="WordSection1">
        <p class="MsoNormal"><span lang="EN-US"><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 style="mso-fareast-language:#2000" lang="EN-US">From:</span></b><span style="mso-fareast-language:#2000" lang="EN-US"> Magnus
                Ihse Bursie <a class="moz-txt-link-rfc2396E" href="mailto:magnus.ihse.bursie@oracle.com"><magnus.ihse.bursie@oracle.com></a>
                <br>
                <b>Sent:</b> Wednesday, 13 September 2023 15:18<br>
                <b>To:</b> Baesken, Matthias
                <a class="moz-txt-link-rfc2396E" href="mailto:matthias.baesken@sap.com"><matthias.baesken@sap.com></a>; <a class="moz-txt-link-abbreviated" href="mailto:build-dev@openjdk.org">build-dev@openjdk.org</a><br>
                <b>Cc:</b> Zeller, Arno <a class="moz-txt-link-rfc2396E" href="mailto:arno.zeller@sap.com"><arno.zeller@sap.com></a><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>
    </blockquote>
  </body>
</html>