RFR: 8263028: Windows build fails due to several treat-warning-as-errors
Magnus Ihse Bursie
ihse at openjdk.java.net
Mon Mar 29 09:47:28 UTC 2021
On Sun, 28 Mar 2021 04:40:46 GMT, Yi Yang <yyang at openjdk.org> wrote:
>> Based on Ioi's suggestion I decided to try with a different locale as well. I tried setting my system locale to something else and with that I was able to reproduce the warnings you report, so it _could_ be an issue with locale settings. AFAIK only `en-us` is supported. Maybe you could confirm/check your locale settings as well? (can run `systeminfo` to get the current setting)
>>
>> I've had problems in the past as well because I had the wrong locale set, and some of the tests were failing because of that. So, maybe rather than disabling the warnings, it might be more prudent to change the system locale of the used build systems to prevent similar issues in the future (FWIW, the display language doesn't seem to affect `cl` so that could still be whatever is convenient).
>
>> Based on Ioi's suggestion I decided to try with a different locale as well. I tried setting my system locale to something else and with that I was able to reproduce the warnings you report, so it _could_ be an issue with locale settings. AFAIK only `en-us` is supported. Maybe you could confirm/check your locale settings as well? (can run `systeminfo` to get the current setting)
>>
>> I've had problems in the past as well because I had the wrong locale set, and some of the tests were failing because of that. So, maybe rather than disabling the warnings, it might be more prudent to change the system locale of the used build systems to prevent similar issues in the future (FWIW, the display language doesn't seem to affect `cl` so that could still be whatever is convenient).
>
> Hi Jorn,
>
> Sorry for the delayed response. I set the locale of my Cygwin environment to en-us via `export LC_ALL="en_US.UTF-8"`, these warnings are generated when compiling as well as before. Should I change this setting globally instead of just changing it in Cygwin?
>
> Anyway, it seems that this problem is caused by the locale setting because as you mentioned, this problem appears when you change the locale setting to Chinese. Setting the locale to English does not have this problem. I checked the building document, but there is no mention of the need to set the locale option to en-us before building JDK. If this is really a necessary step for building, I think we should add this step in the building document, otherwise, I think we should fix this problem in HotSpot.
>
> Best Regards
> Yang
@kelthuzadx Hi Yang,
Setting locale to US English used to be documented as a build requirement. When the "new" build-infra system was introduced several years ago, we thought that all locale-dependent issues were solved, and removed that requirement. Later on, issues crept in on non-Windows platforms, but these were handled by setting LC_ALL=C in the build system itself while building.
The problem with requiring US English as locale on Windows is that you cannot set that for a single process, but must change the entire system locale for the user (which also often requires a reboot). Otoh, if we do *not* require US English, the test matrix grows almost without bounds, and we might run into a lot of weird problems (like this one!).
So I'm not really comfortable with just patching around this issue, since:
a) it does not occur in what is at least the "recommended" locale, and
b) more issues are likely to creep up in the future (in fact, there might already be testing issues as Jorn says)
On the other hand, I am not really comfortable either with just stating in the build document that US English is the only supported Windows locale, since it has such far-reaching consequences for the individual developers.
In short, I'm torn between two bad solutions, but I'm definitely leaning towards the latter. If only there were some way of setting the locale just for cl.exe! :-(
-------------
PR: https://git.openjdk.java.net/jdk/pull/3107
More information about the hotspot-runtime-dev
mailing list