Hi Max,

Take a look at the latest docs for more info on building in WSL: 
http://hg.openjdk.java.net/jdk/jdk/raw-file/tip/doc/building.html

WSL is not actually a VM, it runs "directly" on the hardware.  More accurately, 
it is the Linux syscalls implemented on top of the NT kernel (just as Win32 is 
also implemented on top of the NT kernel), thus it can run unmodified Linux 
binaries (it uses the full Linux user mode).  (Cygwin on the other hand is 
implemented on top of Win32 rather than directly on the NT kernel, save for a 
few things).  One nice thing about WSL though is that you can build both a 
Linux JDK and a Windows JDK (see the instructions).

Let us know of any feedback if you do try it out.  We just added support in the 
past few days so there are definitely some rough edges (currently: VS IDE sln 
files do not work, testing does not work, but we are working on these).

Thanks,

-Andrew

-----Original Message-----
From: build-dev <[email protected]> On Behalf Of Weijun Wang
Sent: Friday, January 4, 2019 2:50 AM
To: Erik Joelsson <[email protected]>
Cc: [email protected]; Yasumasa Suenaga <[email protected]>
Subject: Re: C4819 warnings on Windows

Wow, very impressive.

I haven't played with WSL and thought it's like a VM running Linux inside 
Windows. So one either logins to it and build a Linux JDK or stay outside to 
build a Windows JDK. Never imagined that you can mix the two to do such 
marvelous things.

--Max

> On Jan 4, 2019, at 5:48 PM, Erik Joelsson <[email protected]> wrote:
> 
> 
> On 2019-01-04 10:29, Weijun Wang wrote:
>> Just curious, why were you mentioning WSL and Ubuntu? Isn't this a pure 
>> Windows build issue? Or is it possible to use WSL instead of Cygwin to 
>> launch the build process now? That's unbelievable.
> 
> The OpenJDK build can be run in WSL since 
> https://bugs.openjdk.java.net/browse/JDK-8215445. (Note that Jib does not 
> support WSL yet)
> 
> /Erik
> 
>> Thanks,
>> Max
>> 
>>> On Jan 4, 2019, at 3:22 PM, Yasumasa Suenaga <[email protected]> wrote:
>>> 
>>> Hi all,
>>> 
>>> I tried to build OpenJDK on WSL (Windows 10 1809 + VS2017 (15.9.4) + Ubuntu 
>>> 18.04 LTS).
>>> However, I saw some C4819 warnings as below:
>>> 
>>> ```
>>> c:/OpenJDK/jdk/src/hotspot/share/compiler/methodMatcher.cpp(258): warning 
>>> C4819: ファイルは、現在のコード ページ (0) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 
>>> 形式で保存してください。
>>> ```
>>> 
>>> * The locale of my laptop is set to Japanese (CP932), thanks :-)
>>> 
>>> 
>>> I saw this warning at 3 files as below:
>>> 
>>>  1. hotspot/share/code/codeHeapState.cpp
>>>  2. java.desktop/share/native/libfreetype/src/autofit/afscript.h
>>>  3. hotspot/share/compiler/methodMatcher.cpp
>>> 
>>> We can see the problem in 1. and 2. with iconv:
>>>  $ iconv -f US-ASCII -t UTF8 <file>
>>> 
>>> 
>>> I've fixed them with following patch. It works fine on my environment:
>>>  http://cr.openjdk.java.net/~ysuenaga/wsl/build-warnings/
>>> 
>>> I think we should fix them, but I don't know what component/subcomponent 
>>> should we set to JBS.
>>> Could you help?
>>> 
>>> 
>>> Thanks,
>>> 
>>> Yasumasa

Reply via email to