[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] [PATCH] Build fails to compile jchuff.c
From:       Phil Race <philip.race () oracle ! com>
Date:       2018-01-18 19:15:09
Message-ID: d01684d5-ed38-ed3d-29bb-ac83eb179b5c () oracle ! com
[Download RAW message or body]

Try again with build-dev cc'd ..

-phil.

On 01/18/2018 11:14 AM, Phil Race wrote:
> I agree with what Erik said on build-dev that being specific about the 
> tool chain
> and the reason are worthwhile and important. We've done that in 
> similar cases.
>
> Also these review threads usually should have a subject like
> RFR: <BUG ID>: <Bug Synopsis>
>
> which means you first need a bug id .. the patch can't be pushed 
> without one anyway.
>
> Then the patch should be an in-line diff or a webrev hosted on 
> cr.openjdk.java.net.
>
> I think in-line would be OK for this small change.
>
> -phil.
>
> On 01/17/2018 09:30 AM, Adam Farley8 wrote:
>> Hi All,
>>
>> Under these circumstances, jchuff.c will not compile:
>>
>> Platform: zLinux (s390x)
>> Release: JDK9 (may affect other JDKs).
>> GCC Version: 4.8.5
>> Notes: --disable-warnings-as-errors suppresses this error.
>>
>> The error is:
>>
>> /home/adamfarl/hotspot/jdk9/jdk/src/java.desktop/share/native/libjavajpeg/jchuff.c:
>> In function 'jGenOptTbl':
>> /home/adamfarl/hotspot/jdk9/jdk/src/java.desktop/share/native/libjavajpeg/jchuff.c:808:18:
>> error: array subscript is below array bounds [-Werror=array-bounds]
>>       while (bits[j] == 0)
>>                  ^
>>
>> This is a continuation of a conversation in the build-dev mailing 
>> list, if anyone wants to
>> check the history.
>>
>> The short version is that, while you *can* suppress the problem by 
>> adding
>> --disable-warnings-as-errors to your configure step, I posit that a 
>> builder shouldn't
>> have to.
>>
>> Various solutions were debated. One involves changing 
>> Awt2dLibraries.gmk.
>>
>> Basically you change line 494 to this:
>>
>>     DISABLED_WARNINGS_gcc := clobbered array-bounds, \
>>
>> I'm running a build now to check that works, but basically we should 
>> end up with a
>> -Wno-array-bounds on the gcc compile command for jchuff.c, thereby 
>> ignoring the warning.
>>
>> A smarter variant involves checking for that specific version of the 
>> gcc, but that seems
>> wordy to me for this problem. Keeping it simple. :)
>>
>> Thoughts?
>>
>> Best Regards
>>
>> Adam Farley
>>
>> Unless stated otherwise above:
>> IBM United Kingdom Limited - Registered in England and Wales with 
>> number 741598.
>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire 
>> PO6 3AU
>


[Attachment #3 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Try again with build-dev cc'd ..<br>
    <br>
    -phil.<br>
    <br>
    <div class="moz-cite-prefix">On 01/18/2018 11:14 AM, Phil Race
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2db0bae0-9486-9656-ae83-27b6e28e190b@oracle.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      I agree with what Erik said on build-dev that being specific about
      the tool chain<br>
      and the reason are worthwhile and important. We've done that in
      similar cases.<br>
      <br>
      Also these review threads usually should have a subject like<br>
      RFR: &lt;BUG ID&gt;: &lt;Bug Synopsis&gt;<br>
      <br>
      which means you first need a bug id .. the patch can't be pushed
      without one anyway.<br>
      <br>
      Then the patch should be an in-line diff or a webrev hosted on
      cr.openjdk.java.net.<br>
      <br>
      I think in-line would be OK for this small change.<br>
      <br>
      -phil.<br>
      <br>
      <div class="moz-cite-prefix">On 01/17/2018 09:30 AM, Adam Farley8
        wrote:<br>
      </div>
      <blockquote type="cite"
cite="mid:OF8848EC5E.43B1571E-ON00258218.005E2FC4-80258218.00602FBE@notes.na.collabserv.com"><tt><span
  style=" font-size:10pt">Hi All,</span></tt> <br>
        <br>
        <tt><span style=" font-size:10pt">Under these circumstances,
            jchuff.c will not compile:</span></tt> <br>
        <br>
        <tt><span style=" font-size:10pt">Platform: zLinux (s390x)</span></tt>
        <br>
        <tt><span style=" font-size:10pt">Release: JDK9 (may affect
            other JDKs).</span></tt> <br>
        <tt><span style=" font-size:10pt">GCC Version: 4.8.5</span></tt>
        <br>
        <tt><span style=" font-size:10pt">Notes:
            --disable-warnings-as-errors suppresses this error.</span></tt>
        <br>
        <br>
        <tt><span style=" font-size:10pt">The error is:</span></tt> <br>
        <br>
        <tt><span style=" \
font-size:10pt">/home/adamfarl/hotspot/jdk9/jdk/src/java.desktop/share/native/libjavajpeg/jchuff.c:<br>
  In function 'jGenOptTbl':<br>
/home/adamfarl/hotspot/jdk9/jdk/src/java.desktop/share/native/libjavajpeg/jchuff.c:808:18:<br>
  error: array subscript is below array bounds
            [-Werror=array-bounds]<br>
                  while (bits[j] == 0)<br>
                             ^<br>
          </span></tt> <br>
        <tt><span style=" font-size:10pt">This is a continuation of a
            conversation in the build-dev mailing list, if anyone wants
            to </span></tt> <br>
        <tt><span style=" font-size:10pt">check the history.</span></tt>
        <br>
        <br>
        <tt><span style=" font-size:10pt">The short version is that,
            while you *can* suppress the problem by adding </span></tt>
        <br>
        <tt><span style=" font-size:10pt">--disable-warnings-as-errors
            to your configure step, I posit that a builder shouldn't </span></tt>
        <br>
        <tt><span style=" font-size:10pt">have to.</span></tt> <br>
        <br>
        <tt><span style=" font-size:10pt">Various solutions were
            debated. One involves changing Awt2dLibraries.gmk.</span></tt>
        <br>
        <br>
        <tt><span style=" font-size:10pt">Basically you change line 494
            to this:</span></tt> <br>
        <br>
        <tt><span style=" font-size:10pt">    DISABLED_WARNINGS_gcc :=
            clobbered array-bounds, \</span></tt> <br>
        <br>
        <tt><span style=" font-size:10pt">I'm running a build now to
            check that works, but basically we should end up with a </span></tt>
        <br>
        <tt><span style=" font-size:10pt">-Wno-array-bounds on the gcc
            compile command for jchuff.c, thereby ignoring the warning.</span></tt>
        <br>
        <br>
        <tt><span style=" font-size:10pt">A smarter variant involves
            checking for that specific version of the gcc, but that
            seems </span></tt> <br>
        <tt><span style=" font-size:10pt">wordy to me for this problem.
            Keeping it simple. :)</span></tt> <br>
        <br>
        <tt><span style=" font-size:10pt">Thoughts?</span></tt> <br>
        <tt><span style=" font-size:10pt"><br>
            Best Regards<br>
            <br>
            Adam Farley</span></tt> <br>
        <span style=" font-size:10pt;font-family:sans-serif"><br>
          Unless stated otherwise above:<br>
          IBM United Kingdom Limited - Registered in England and Wales
          with number 741598. <br>
          Registered office: PO Box 41, North Harbour, Portsmouth,
          Hampshire PO6 3AU<br>
        </span> </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic