[PATCH] Fail to build zero on x86
Severin Gehwolf
sgehwolf at redhat.com
Thu Jan 11 14:00:19 UTC 2018
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
More information about the hotspot-dev
mailing list