Re: [PATCH] Fail to build zero on x86

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to build zero on x86

John Paul Adrian Glaubitz
Hi Ao!

On 01/10/2018 01:58 AM, Ao Qi wrote:
> Thanks for your information. We have a Jenkins server to build OpenJDK 8/9/10 on x86
> and MIPS (loongson3a), and I have already used those patches:) Hope those patches
> can be submitted to upstream.

Yes, they definitely will be.

In the meantime, I wanted to open a bug report with the issue you reported, so I started
building OpenJDK with the --disable-warnings-treated-as-errors configure flag removed.

However, I did not run into the issue you reported but my build bailed out earlier
already:

=== Output from failing command(s) repeated here ===
/usr/bin/printf "* For target support_native_java.base_libjava_TimeZone_md.o:\n"
* For target support_native_java.base_libjava_TimeZone_md.o:
(/bin/grep -v -e "^Note: including file:" <  /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/make-support/failure-logs/support_native_java.base_libjava_TimeZone_md.o.log || true) | /usr/bin/head -n 12
/home/glaubitz/upstream/hs/src/java.base/unix/native/libjava/TimeZone_md.c: In function ‘findZoneinfoFile’:
/home/glaubitz/upstream/hs/src/java.base/unix/native/libjava/TimeZone_md.c:150:5: error: ‘readdir64_r’ is deprecated [-Werror=deprecated-declarations]
      while (readdir64_r(dirp, entry, &dp) == 0 && dp != NULL) {
      ^~~~~
In file included from /home/glaubitz/upstream/hs/src/java.base/unix/native/libjava/TimeZone_md.c:36:0:
/usr/include/dirent.h:201:12: note: declared here
  extern int readdir64_r (DIR *__restrict __dirp,
             ^~~~~~~~~~~
cc1: all warnings being treated as errors
if test `/usr/bin/wc -l < /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/make-support/failure-logs/support_native_java.base_libjava_TimeZone_md.o.log` -gt 12; then /bin/echo "   ... (rest of output omitted)" ; fi
/usr/bin/printf "* For target support_native_java.base_libverify_check_code.o:\n"
* For target support_native_java.base_libverify_check_code.o:
(/bin/grep -v -e "^Note: including file:" <  /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/make-support/failure-logs/support_native_java.base_libverify_check_code.o.log || true) | /usr/bin/head -n 12
/home/glaubitz/upstream/hs/src/java.base/share/native/libverify/check_code.c: In function ‘verify_opcode_operands’:
/home/glaubitz/upstream/hs/src/java.base/share/native/libverify/check_code.c:1391:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
          CCerror(context,
          ^~~~~~~~~~~~~~~~
                  "invokedynamic bytecode is not supported in this class file version");
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/glaubitz/upstream/hs/src/java.base/share/native/libverify/check_code.c:1394:5: note: here
      case JVM_OPC_instanceof:
      ^~~~
cc1: all warnings being treated as errors
if test `/usr/bin/wc -l < /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/make-support/failure-logs/support_native_java.base_libverify_check_code.o.log` -gt 12; then /bin/echo "   ... (rest of output omitted)" ; fi
/usr/bin/printf "\n* All command lines available in /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/make-support/failure-logs.\n"

* All command lines available in /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/make-support/failure-logs.
/usr/bin/printf "=== End of repeated output ===\n"
=== End of repeated output ===
if /bin/grep -q "recipe for target .* failed" /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/build.log 2> /dev/null; then /usr/bin/printf "\n=== Make failed targets repeated here ===\n" ; /bin/grep "recipe for target .* failed" /home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/build.log ; /usr/bin/printf "=== End of repeated output ===\n" ; /usr/bin/printf "\nHint: Try searching the build log for the name of the first failed target.\n" ; else /usr/bin/printf "\nNo indication of failed target found.\n" ; /usr/bin/printf "Hint: Try searching the build log for '] Error'.\n" ; fi

=== Make failed targets repeated here ===
CoreLibraries.gmk:157: recipe for target '/home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/support/native/java.base/libjava/TimeZone_md.o' failed
CoreLibraries.gmk:110: recipe for target '/home/glaubitz/upstream/hs/build/linux-x86_64-normal-zero-release/support/native/java.base/libverify/check_code.o' failed
make/Main.gmk:226: recipe for target 'java.base-libs' failed
=== End of repeated output ===

Did you run into this issue as well? We should probably deal with this
issue first depending on whether it affects the Server variant as well.

I am testing this now.

Adrian

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to build zero on x86

John Paul Adrian Glaubitz
On 01/11/2018 02:15 PM, John Paul Adrian Glaubitz wrote:
> Did you run into this issue as well? We should probably deal with this
> issue first depending on whether it affects the Server variant as well.
>
> I am testing this now.

And it seems the Server variant will also fail without --disable-warnings-as-errors,
but the builds bails out at a different place:

=== Output from failing command(s) repeated here ===
/usr/bin/printf "* For target hotspot_variant-server_libjvm_objs_assembler_x86.o:\n"
* For target hotspot_variant-server_libjvm_objs_assembler_x86.o:
(/bin/grep -v -e "^Note: including file:" <  /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_assembler_x86.o.log || true) | /usr/bin/head -n 12
/home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp: In static member function ‘static Address Address::make_raw(int, int, int, int, relocInfo::relocType)’:
/home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp:199:12: error: ‘*((void*)& rspec +32)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      return madr;
             ^~~~
/home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp:199:12: error: ‘*((void*)& rspec +24)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
/home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp:199:12: error: ‘*((void*)& rspec +16)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1plus: all warnings being treated as errors
if test `/usr/bin/wc -l < /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_assembler_x86.o.log` -gt 12; then /bin/echo "   ... (rest of output omitted)" ; fi
/usr/bin/printf "\n* All command lines available in /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs.\n"

* All command lines available in /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs.
/usr/bin/printf "=== End of repeated output ===\n"
=== End of repeated output ===

So, I guess we should have a discussion in general whether and how to handle
these issues in OpenJDK-11, i.e. whether we should have one big patch to
address all of these warnings or whether we should have individual bug
reports and changesets.

Opinions?

Adrian

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to build zero on x86

Severin Gehwolf
On Thu, 2018-01-11 at 14:21 +0100, John Paul Adrian Glaubitz wrote:

> On 01/11/2018 02:15 PM, John Paul Adrian Glaubitz wrote:
> > Did you run into this issue as well? We should probably deal with this
> > issue first depending on whether it affects the Server variant as well.
> >
> > I am testing this now.
>
> And it seems the Server variant will also fail without --disable-warnings-as-errors,
> but the builds bails out at a different place:
>
> === Output from failing command(s) repeated here ===
> /usr/bin/printf "* For target hotspot_variant-server_libjvm_objs_assembler_x86.o:\n"
> * For target hotspot_variant-server_libjvm_objs_assembler_x86.o:
> (/bin/grep -v -e "^Note: including file:" <  /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_assembler_x86.o.log || true) | /usr/bin/head -n 12
> /home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp: In static member function ‘static Address Address::make_raw(int, int, int, int, relocInfo::relocType)’:
> /home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp:199:12: error: ‘*((void*)& rspec +32)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>       return madr;
>              ^~~~
> /home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp:199:12: error: ‘*((void*)& rspec +24)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> /home/glaubitz/upstream/hs/src/hotspot/cpu/x86/assembler_x86.cpp:199:12: error: ‘*((void*)& rspec +16)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> cc1plus: all warnings being treated as errors
> if test `/usr/bin/wc -l < /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_assembler_x86.o.log` -gt 12; then /bin/echo "   ... (rest of output omitted)" ; fi
> /usr/bin/printf "\n* All command lines available in /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs.\n"
>
> * All command lines available in /home/glaubitz/upstream/hs/build/linux-x86_64-normal-server-release/make-support/failure-logs.
> /usr/bin/printf "=== End of repeated output ===\n"
> === End of repeated output ===
>
> So, I guess we should have a discussion in general whether and how to handle
> these issues in OpenJDK-11, i.e. whether we should have one big patch to
> address all of these warnings or whether we should have individual bug
> reports and changesets.
>
> Opinions?

As far as I know this heavily depends on the toolchain used to compile
OpenJDK. Changing the compiler will produce different warnings. We
usually run into this when building on Fedora with newer toolchains.

If you fix the toolchain versions, which I believe Oracle does for
their builds, you might be able to get a build with no warnings. I'm
doubtful Zero would build without warnings even on such a toolchain,
though.

Once you deviate from the officially supported toolchain in some form
you'll end up with some warnings. Getting rid of all warnings for all
compiler versions/variants combinations might be a daunting task.

My $0.02

Thanks,
Severin
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Fail to build zero on x86

Andrew Haley
On 11/01/18 14:00, Severin Gehwolf wrote:
> As far as I know this heavily depends on the toolchain used to compile
> OpenJDK. Changing the compiler will produce different warnings. We
> usually run into this when building on Fedora with newer toolchains.

Indeed.  -Wall -Werror will break your build every time GCC is revised.
This is because GCC adds warnings.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671