Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-04-25 Thread Jie Fu

Hi Andrew,

Is it possible that this issue be fixed in 8u222?
Or shall we just update the README to work around it like this:
-
diff -r c52bf8887eb0 README
--- a/README    Tue Apr 16 21:59:20 2019 +0100
+++ b/README    Thu Apr 25 17:49:36 2019 +0800
@@ -27,7 +27,7 @@
  variable.

   2. Configure the build:
-   bash ./configure
+   bash ./configure --with-extra-cflags=-Wno-error

   3. Build the OpenJDK:
    make all
-

What's your next plan?
Thanks.

Best regards,
Jie

On 2019/3/20 上午2:06, Andrew John Hughes wrote:

If this is because of readdir_r, then that's on my radar to backport
once we've branched for 8u212 (it needs time to soak, so I'm aiming for
8u222). I've prefer we fixed this rather than disabling warnings
unnecessarily.




Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-21 Thread Andrew Haley
On 3/20/19 3:53 PM, Andrew John Hughes wrote:
> On 19/03/2019 15:09, Martin Buchholz wrote:
>> Probably it's because glibc deprecated readdir, and we don't have
>> --disable-warnings-as-errors by default?
>>
>> (I think warnings should not be errors except as opt-in by openjdk
>> developers/maintainers)
> I agree

I'm pretty sure that -Wall should never be used with -Werror, because
-Wall is a grab bag of unconnected warnings. The official doc is "all
the warnings about constructions that some users consider
questionable, and that are easy to avoid (or modify to prevent the
warning)".

So, I think that warnings-as-errors makes sense, but not in
conjunction with -Wall. I guess no-one wants to start the bikeshed
discussion about which warnings should be on, though.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. 
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-20 Thread Jie Fu

Thanks Andrew.

On 2019/3/20 下午11:53, Andrew John Hughes wrote:

On 19/03/2019 15:09, Martin Buchholz wrote:

Probably it's because glibc deprecated readdir, and we don't have
--disable-warnings-as-errors by default?

(I think warnings should not be errors except as opt-in by openjdk
developers/maintainers)

I agree, and we've implemented it that way downstream in IcedTea.
At present, 8u doesn't even have the option to toggle this in the
HotSpot build. I can certainly look at providing such an option and that
would be a better, more general fix than turning off one specific warning.

Note that warnings as errors is still the default in jdk/jdk unless xlc
is used:

https://hg.openjdk.java.net/jdk/jdk/file/83cace4142c8/make/autoconf/flags-cflags.m4#l142




Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-20 Thread Andrew John Hughes
On 19/03/2019 15:09, Martin Buchholz wrote:
> Probably it's because glibc deprecated readdir, and we don't have
> --disable-warnings-as-errors by default?
> 
> (I think warnings should not be errors except as opt-in by openjdk
> developers/maintainers)

I agree, and we've implemented it that way downstream in IcedTea.
At present, 8u doesn't even have the option to toggle this in the
HotSpot build. I can certainly look at providing such an option and that
would be a better, more general fix than turning off one specific warning.

Note that warnings as errors is still the default in jdk/jdk unless xlc
is used:

https://hg.openjdk.java.net/jdk/jdk/file/83cace4142c8/make/autoconf/flags-cflags.m4#l142
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew



Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-19 Thread Jie Fu

Hi all,

Unless a runtime failure is triggered, I think the simplest way to fix 
this issue is to change the build system since deprecated-declarations 
warnings are not errors at all.


deprecated-declarations warnings seem to be treated as errors only for 
hotspot build.

But why not for jdk build?
There are also deprecated-declarations warnings when building jdk:

jdk8u/jdk/src/solaris/native/java/util/TimeZone_md.c:136:5: warning: 
‘readdir64_r’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/java/io/UnixFileSystem_md.c:310:5: warning: 
‘readdir64_r’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c:693:5: 
warning: ‘readdir64_r’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c:83:5: 
warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:836:5: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:836:5: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:840:5: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:841:5: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:842:5: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:843:5: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:858:13: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:861:13: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:868:13: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XWindow.c:871:13: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XlibWrapper.c:1289:9: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
jdk8u/jdk/src/solaris/native/sun/xawt/XlibWrapper.c:1923:5: warning: 
‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]



It seems unfair to accept deprecated-declarations warnings in jdk build 
but not in hotspot build.


Best regards,
Jie


On 2019/3/20 上午2:06, Andrew John Hughes wrote:

On 19/03/2019 15:09, Martin Buchholz wrote:

Probably it's because glibc deprecated readdir, and we don't have
--disable-warnings-as-errors by default?

(I think warnings should not be errors except as opt-in by openjdk
developers/maintainers)

On Tue, Mar 19, 2019 at 7:47 AM Andrew Haley  wrote:


On 3/19/19 12:25 PM, Jie Fu wrote:

To fix build failures caused by deprecated-declarations warnings, can we
make this change to jdk8u?

This is very GCC-version dependent. We really should probe at configure
time for
these options.

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. 
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


If this is because of readdir_r, then that's on my radar to backport
once we've branched for 8u212 (it needs time to soak, so I'm aiming for
8u222). I've prefer we fixed this rather than disabling warnings
unnecessarily.




Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-19 Thread Jie Fu

On 2019/3/19 下午11:09, Martin Buchholz wrote:

Probably it's because glibc deprecated readdir, and we don't have 
--disable-warnings-as-errors by default?

Yes.


(I think warnings should not be errors except as opt-in by openjdk 
developers/maintainers)



I agree, especially for deprecated-declarations warnings.
On Tue, Mar 19, 2019 at 7:47 AM Andrew Haley > wrote:


On 3/19/19 12:25 PM, Jie Fu wrote:
> To fix build failures caused by deprecated-declarations
warnings, can we
> make this change to jdk8u?

This is very GCC-version dependent. We really should probe at
configure time for
these options.

-- 
Andrew Haley

Java Platform Lead Engineer
Red Hat UK Ltd. 
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671





Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-19 Thread Andrew John Hughes
On 19/03/2019 15:09, Martin Buchholz wrote:
> Probably it's because glibc deprecated readdir, and we don't have
> --disable-warnings-as-errors by default?
> 
> (I think warnings should not be errors except as opt-in by openjdk
> developers/maintainers)
> 
> On Tue, Mar 19, 2019 at 7:47 AM Andrew Haley  wrote:
> 
>> On 3/19/19 12:25 PM, Jie Fu wrote:
>>> To fix build failures caused by deprecated-declarations warnings, can we
>>> make this change to jdk8u?
>>
>> This is very GCC-version dependent. We really should probe at configure
>> time for
>> these options.
>>
>> --
>> Andrew Haley
>> Java Platform Lead Engineer
>> Red Hat UK Ltd. 
>> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>>

If this is because of readdir_r, then that's on my radar to backport
once we've branched for 8u212 (it needs time to soak, so I'm aiming for
8u222). I've prefer we fixed this rather than disabling warnings
unnecessarily.
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew



Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-19 Thread Brian Burkhalter
jdk8u-dev will build with this conf

bash configure --with-extra-cflags=-Wno-error

at least on Ubuntu 18.04.

> On Mar 19, 2019, at 8:09 AM, Martin Buchholz  wrote:
> 
> Probably it's because glibc deprecated readdir, and we don't have
> --disable-warnings-as-errors by default?
> 
> (I think warnings should not be errors except as opt-in by openjdk
> developers/maintainers)
> 
> On Tue, Mar 19, 2019 at 7:47 AM Andrew Haley  wrote:
> 
>> On 3/19/19 12:25 PM, Jie Fu wrote:
>>> To fix build failures caused by deprecated-declarations warnings, can we
>>> make this change to jdk8u?
>> 
>> This is very GCC-version dependent. We really should probe at configure
>> time for
>> these options.
>> 
>> --
>> Andrew Haley
>> Java Platform Lead Engineer
>> Red Hat UK Ltd. 
>> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>> 



Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-19 Thread Martin Buchholz
Probably it's because glibc deprecated readdir, and we don't have
--disable-warnings-as-errors by default?

(I think warnings should not be errors except as opt-in by openjdk
developers/maintainers)

On Tue, Mar 19, 2019 at 7:47 AM Andrew Haley  wrote:

> On 3/19/19 12:25 PM, Jie Fu wrote:
> > To fix build failures caused by deprecated-declarations warnings, can we
> > make this change to jdk8u?
>
> This is very GCC-version dependent. We really should probe at configure
> time for
> these options.
>
> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. 
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>


Re: RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-19 Thread Andrew Haley
On 3/19/19 12:25 PM, Jie Fu wrote:
> To fix build failures caused by deprecated-declarations warnings, can we 
> make this change to jdk8u?

This is very GCC-version dependent. We really should probe at configure time for
these options.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. 
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


RFR: [8u] Build failed on Ubuntu 18.04 due to deprecated-declarations warnings

2019-03-19 Thread Jie Fu

Hi all,

To fix build failures caused by deprecated-declarations warnings, can we 
make this change to jdk8u?

--
diff -r 6e2900603bc6 make/linux/makefiles/gcc.make
--- a/make/linux/makefiles/gcc.make Mon Mar 18 08:33:53 2019 +0100
+++ b/make/linux/makefiles/gcc.make Tue Mar 19 20:20:17 2019 +0800
@@ -209,6 +209,8 @@
   WARNINGS_ARE_ERRORS += -Wno-switch 
-Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated 
-Wno-format -Wno-dynamic-class-memaccess

   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
+else
+  WARNINGS_ARE_ERRORS += -Wno-deprecated-declarations
 endif

 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef 
-Wunused-function -Wunused-value

--

Thanks a lot.

Best regards,
Jie