[PATCH] Support for building using WSL (Windows Subsystem for Linux) on Windows

Andrew Luo andrewluotechnologies at outlook.com
Tue Dec 18 20:45:48 UTC 2018


Hi Erik/Magnus,

I've attached my latest changes:

1. Fixed a file I forgot to revert in my previous change while trying something out...
2. Added information about case sensitivity of the OpenJDK build directory (yes, I did use the make target to generate the HTML file)
3. Fixed Cygwin (hopefully, I don't have a Cygwin environment to verify this)

With this patch I've tested the following targets:
exploded-image (default): Works
images: Works
bundles: Works
test: Completes, but some tests fail.

I didn't go through the test failures completely, but all of the ones I did see are due to attempting to call CreateProcess with "sh" as the argument (in jtreg: http://hg.openjdk.java.net/code-tools/jtreg/file/36c592d2f544/src/share/classes/com/sun/javatest/regtest/exec/ShellAction.java).  This isn't supported in Windows, perhaps using a Linux boot JDK would fix this (but might break other things).  I can look into fixing it (on WSL you can call "wsl sh", for example), but I think since it's a completely separate repo anyways, it would be best to take up those changes separately.  Let me know your thoughts on this.

Otherwise, let me know if there is any other comments/suggestions before we can merge this into the main repository.

Thanks,

-Andrew

-----Original Message-----
From: Erik Joelsson <erik.joelsson at oracle.com> 
Sent: Monday, December 17, 2018 9:52 AM
To: Andrew Luo <andrewluotechnologies at outlook.com>; Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
Cc: build-dev at openjdk.java.net
Subject: Re: [PATCH] Support for building using WSL (Windows Subsystem for Linux) on Windows

Hello Andrew,

On 2018-12-16 00:01, Andrew Luo wrote:
> For me, /mnt/c was already mounted case insensitive.  Maybe this is 
> only the default for the C:\ drive though (or perhaps depends on your 
> Windows/WSL version?)
I think the default is "dir", which will cause any new directory created from WSL to be case sensitive, so I would say this needs to be documented in building.md.
> Anyways, I've synced down the sandbox and added a new patch to address some of the feedback (and some of my own minor enhancements):
>
> 1. Got rid of EXECUTABLE_SUFFIX in favor of EXE_SUFFIX, which had to move earlier in the sequence
> 2. Use $EXE_SUFFIX instead of .exe literal per Magnus' feedback
> 3. Added information about WSL versioning to build, similar to Cygwin
> 4. Updated building.md and building.html with WSL build instructions

Nice! I've applied and pushed this patch to the sandbox. Just to be 
sure, did you generate the html version with pandoc using "make 
update-build-docs"? If not, we will need to make sure that is done 
before the final push.

I noticed trailing whitespace in some files. Jcheck will reject that in 
most types of files but in the build, we are a bit on our own trying to 
avoid it.

>
> (By the way, you misspelled my name in your sandbox commit): http://hg.openjdk.java.net/jdk/sandbox/rev/12615de8335e
Terribly sorry about that! The combination of u and o is a common slip 
for me on the keyboard. It's correct in the new commit at least, and in 
the final commit, contributors are attributed with email addresses.
>
> I will work on fixing the Cygwin path extraction in my next patch.  Most likely I will just restore the old code for Cygwin while using the new code for WSL, unless there are other suggestions... Aside from this, is there any other feedback that I should take into account before we can merge this into the main repository?

That may be the best solution.

I tried to build some more targets and failed. Please make sure you can 
do "make bundles". That will build docs and tests in addition to just 
the product and also do the packaging into zip/tar.gz. It would also be 
nice if "make test" worked.

Note that Magnus is now on vacation and I will be traveling, so you will 
not hear from me until Wednesday.

/Erik

>
> Thanks,
>
> -Andrew
>
> -----Original Message-----
> From: Erik Joelsson <erik.joelsson at oracle.com>
> Sent: Friday, December 14, 2018 5:42 PM
> To: Andrew Luo <andrewluotechnologies at outlook.com>; Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
> Cc: build-dev at openjdk.java.net
> Subject: Re: [PATCH] Support for building using WSL (Windows Subsystem for Linux) on Windows
>
> After having configured my WSL to mount using case=off, I was able to successfully build images using the latest patch as applied in the sandbox.
>
> /Erik
>
> On 2018-12-14 17:23, Erik Joelsson wrote:
>> Hello again,
>>
>> I took the liberty of creating a bug for this and also a sandbox
>> branch where I've applied your latest patch. If you clone that you can
>> send further patches based on a known state in the sandbox. This will
>> make it easier to see what you are actually doing in each update, as
>> well as give us better references when discussing them. It also gives
>> me the ability to directly change things so we can keep Cygwin/msys
>> working.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8215445
>>
>> http://hg.openjdk.java.net/jdk/sandbox/shortlog/12615de8335e
>>
>> /Erik
>>
>> On 2018-12-14 16:47, Erik Joelsson wrote:
>>> Hello,
>>>
>>> You beat me to it. I just found the rc.exe problem was that
>>> FIXPATH_PATH in spec.gmk.in was quoted. Make just propagates quotes
>>> verbatim, so then fixpath.c would create a path variable like;
>>>
>>> $PATH;"$FIXPATH_PATH"
>>>
>>> Which is why link.exe could not find rc.exe.
>>>
>>> /Erik
>>>
>>> On 2018-12-14 16:32, Andrew Luo wrote:
>>>> Ok, here's my latest patch (I didn't add your case sensitivity fix
>>>> yet, but will do next patch).  I believe this should get you past
>>>> the rc.exe issues.
>>>>
>>>> Thanks,
>>>>
>>>> -Andrew
>>>>
>>>> -----Original Message-----
>>>> From: Erik Joelsson <erik.joelsson at oracle.com>
>>>> Sent: Friday, December 14, 2018 4:15 PM
>>>> To: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
>>>> Cc: Andrew Luo <andrewluotechnologies at outlook.com>;
>>>> build-dev at openjdk.java.net
>>>> Subject: Re: [PATCH] Support for building using WSL (Windows
>>>> Subsystem for Linux) on Windows
>>>>
>>>>
>>>> On 2018-12-14 16:06, Magnus Ihse Bursie wrote:
>>>>>> 14 dec. 2018 kl. 23:42 skrev Erik Joelsson
>>>>>> <erik.joelsson at oracle.com>:
>>>>>>
>>>>>> I found the reason it's not failing make. It returns "1" and
>>>>>> NativeCompilation.gmk currently ignores 1 explicitly for Visual
>>>>>> Studio. I added that back in 2014 in
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8065576, but I can't
>>>>>> figure out why. Nothing mentioned in either comment or review.
>>>>> Sounds like it's ripe for removal then. :) I wonder what kind of
>>>>> issue you might have run into that caused a returned 1 to happen
>>>>> and yet we didn't want to consider it a failure...
>>>> If I'm to guess, I think it's one of the commands we pipe the output
>>>> to when the output is zero. This would explain why it was added
>>>> together with pipefail.
>>>>
>>>> /Erik
>>>>
>>>>> /Magnus
>>>>>
>>>>>> /Erik
>>>>>>
>>>>>>> On 2018-12-14 13:59, Magnus Ihse Bursie wrote:
>>>>>>>
>>>>>>>
>>>>>>>> On 2018-12-14 22:15, Erik Joelsson wrote:
>>>>>>>> I get the same error for pch and it still continues, but this
>>>>>>>> time I let it run until it eventually fails for real when it
>>>>>>>> can't link. Perhaps it's simply cl.exe that isn't returning non
>>>>>>>> zero for this error? When the linker fails, make fails, so
>>>>>>>> propagation doesn't seem broken.
>>>>>>> That does also seem really weird, considering that it claims it
>>>>>>> to be a "fatal error". Can you repeat the command at the command
>>>>>>> line and get the failure again, and then check the return value?
>>>>>>> Can you rewrite the command line and run it from the devenv
>>>>>>> prompt? That is, is there any indication that the pch file itself
>>>>>>> is messed up, or can it be used if running the compilation that
>>>>>>> should use it from an "ok" prompt?
>>>>>>>
>>>>>>> /Magnus
>>>>>>>> /Erik
>>>>>>>>
>>>>>>>>> On 2018-12-14 12:55, Andrew Luo wrote:
>>>>>>>>> Hmm, I get the rc.exe error as well, but now it is much later
>>>>>>>>> down the line... Still investigating...
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> -Andrew
>>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: Andrew Luo
>>>>>>>>> Sent: Friday, December 14, 2018 12:34 PM
>>>>>>>>> To: 'Andrew Luo' <andrewluotechnologies at outlook.com>; Magnus
>>>>>>>>> Ihse Bursie <magnus.ihse.bursie at oracle.com>; Erik Joelsson
>>>>>>>>> <erik.joelsson at oracle.com>
>>>>>>>>> Cc: build-dev at openjdk.java.net
>>>>>>>>> Subject: RE: [PATCH] Support for building using WSL (Windows
>>>>>>>>> Subsystem for Linux) on Windows
>>>>>>>>>
>>>>>>>>> Try this updated patch with some fixes...
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> -Andrew
>>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: build-dev <build-dev-bounces at openjdk.java.net> On Behalf
>>>>>>>>> Of Andrew Luo
>>>>>>>>> Sent: Friday, December 14, 2018 12:01 PM
>>>>>>>>> To: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>; Erik
>>>>>>>>> Joelsson <erik.joelsson at oracle.com>
>>>>>>>>> Cc: build-dev at openjdk.java.net
>>>>>>>>> Subject: RE: [PATCH] Support for building using WSL (Windows
>>>>>>>>> Subsystem for Linux) on Windows
>>>>>>>>>
>>>>>>>>> I think I have a fix for it.  Give me a minute (or a few hours
>>>>>>>>> depending on if it works).
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> -Andrew
>>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
>>>>>>>>> Sent: Friday, December 14, 2018 11:42 AM
>>>>>>>>> To: Erik Joelsson <erik.joelsson at oracle.com>
>>>>>>>>> Cc: Andrew Luo <andrewluotechnologies at outlook.com>;
>>>>>>>>> build-dev at openjdk.java.net
>>>>>>>>> Subject: Re: [PATCH] Support for building using WSL (Windows
>>>>>>>>> Subsystem for Linux) on Windows
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> 14 dec. 2018 kl. 20:31 skrev Erik Joelsson
>>>>>>>>>> <erik.joelsson at oracle.com>:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> On 2018-12-14 11:05, Magnus Ihse Bursie wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>> On 2018-12-14 19:41, Erik Joelsson wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 2018-12-14 10:28, Magnus Ihse Bursie wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 2018-12-14 19:23, Erik Joelsson wrote:
>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I took your patch for a spin, and configure passes, but I
>>>>>>>>>>>>>> get the same build error I got with my patch:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> fatal error C1083: Cannot open compiler intermediate file:
>>>>>>>>>>>>>> 'd:\erik\jdk-wsl\build\windows-x86_64-server-release\hotsp
>>>>>>>>>>>>>> ot\
>>>>>>>>>>>>>> varia
>>>>>>>>>>>>>> nt-server\libjvm\objs\build_libjvm.pch': No such file or
>>>>>>>>>>>>>> directory
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> This is repeated for every C++ file in Hotspot. I see two
>>>>>>>>>>>>>> issues here. First of all, I need to figure out why the
>>>>>>>>>>>>>> compiler will not find the file, which is clearly there.
>>>>>>>>>>>>>> Second, why isn't this failure picked up by make?
>>>>>>>>>>>>>> Somewhere the return value of cl.exe is disappearing.
>>>>>>>>>>>>> Can you build without errors if you disable PCH?
>>>>>>>>>>> Could you? That is, is it only the PCH that is problematic?
>>>>>>>>>> Trying that now.
>>>>>>>>>>>>> Also, a wild guess: can it be related to file permissions?
>>>>>>>>>>>>> Can you read the file properly from both WSL and Windows?
>>>>>>>>>>>> It is readable, but it could be something with case. The
>>>>>>>>>>>> file is actually called BUILD_LIBJVM.pch, but that is also
>>>>>>>>>>>> how it's given to the compiler command line. Here is the
>>>>>>>>>>>> output from DEBUG_FIXPATH:
>>>>>>>>>>> Weird. What if you, after a failed build, rename it to
>>>>>>>>>>> build_libjvm.pch?
>>>>>>>>>> Doing that causes a new error:
>>>>>>>>>>
>>>>>>>>>> d:\erik\jdk-wsl\open\src\hotspot\share\gc\shared\accessBarrierSupport.
>>>>>>>>>>
>>>>>>>>>> cpp : fatal error C1382: the PCH file
>>>>>>>>>> 'd:\erik\jdk-wsl\build\windows-x86_64-server-release\hotspot\v
>>>>>>>>>> ari ant-s erver\libjvm\objs\build_libjvm.pch' has been rebuilt
>>>>>>>>>> since
>>>>>>>>>> 'd:\erik\jdk-wsl\build\windows-x86_64-server-release\hotspot\v
>>>>>>>>>> ari ant-s erver\libjvm\objs\accessBarrierSupport.obj' was
>>>>>>>>>> generated.
>>>>>>>>>> Please rebuild this object
>>>>>>>>>>
>>>>>>>>>> But I think even more important is that make is not getting
>>>>>>>>>> the error. The build just continues until interrupted.
>>>>>>>>> Agree, that's bad.
>>>>>>>>>
>>>>>>>>> Does fixpath_debug print exit code? If so, what does it say? If
>>>>>>>>> not, we should add that instrumentation.
>>>>>>>>>
>>>>>>>>> /Magnus
>>>>>>>>>
>>>>>>>>>>>> Compiling ad_x86_expand.cpp (for jvm.dll) fixpath input line
>>>>>>>>>>>>> -wsl\build\windows-x86_64-server-release\configure-support\
>>>>>>>>>>>>> bin
>>>>>>>>>>>>> \fixp
>>>>>>>>>>>> ath.exe -w
>>>>>>>>>>> This starts out quite odd..? -wsl\build\...?
>>>>>>>>>> I agree, didn't look into that part.
>>>>>>>>>>>> /mnt/c/PROGRA~2/MICROS~1/2017/PROFES~1/VC/Tools/MSVC/1416~1.
>>>>>>>>>>>> 270
>>>>>>>>>>>> /bin/
>>>>>>>>>>>> Hostx86/x64/cl.exe
>>>>>>>>>>> Also, FWIW, this seems not to have been properly case
>>>>>>>>>>> treated. Which version of the patch are you using?
>>>>>>>>>> The last one posted by Andrew: "diff15.txt".
>>>>>>>>>>
>>>>>>>>>> /Erik
>>>>>>>>>>
>>>>>>>>>>> /Magnus
>>>>>>>>>>>> -showIncludes
>>>>>>>>>>>> -Fp/mnt/d/erik/jdk-wsl/build/windows-x86_64-server-release/h
>>>>>>>>>>>> ots pot/v ariant-server/libjvm/objs/BUILD_LIBJVM.pch
>>>>>>>>>>>> -Yuprecompiled.hpp -D__STDC_FORMAT_MACROS
>>>>>>>>>>>> -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNOMINMAX
>>>>>>>>>>>> -DWIN32_LEAN_AND_MEAN -nologo -MD -MP -D_WINDOWS -DWIN32
>>>>>>>>>>>> -D_JNI_IMPLEMENTATION_ -W3 -DVM_LITTLE_ENDIAN -D_LP64=1
>>>>>>>>>>>> -DPRODUCT -DTARGET_ARCH_x86 -DINCLUDE_SUFFIX_OS=_windows
>>>>>>>>>>>> -DINCLUDE_SUFFIX_CPU=_x86 -DINCLUDE_SUFFIX_COMPILER=_visCPP
>>>>>>>>>>>> -DTARGET_COMPILER_visCPP
>>>>>>>>>>>> -DAMD64 "-DHOTSPOT_LIB_ARCH=\"amd64\"" -DCOMPILER1
>>>>>>>>>>>> -DCOMPILER2
>>>>>>>>>>>> -DINCLUDE_ZGC=0
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/build/windows-x86_64-server-release/ho
>>>>>>>>>>>> tsp
>>>>>>>>>>>> ot/va
>>>>>>>>>>>> riant-server/gensrc/adfiles
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/closed/src/hotspot/share
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/hotspot/share
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/hotspot/os/windows
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/hotspot/cpu/x86
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/hotspot/os_cpu/windows_x86
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/build/windows-x86_64-server-release/ho
>>>>>>>>>>>> tsp
>>>>>>>>>>>> ot/va
>>>>>>>>>>>> riant-server/gensrc
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/hotspot/share/precompiled
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/hotspot/share/include
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/hotspot/os/windows/include
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/build/windows-x86_64-server-release/su
>>>>>>>>>>>> ppo
>>>>>>>>>>>> rt/mo
>>>>>>>>>>>> dules_include/java.base
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/build/windows-x86_64-server-release/su
>>>>>>>>>>>> ppo
>>>>>>>>>>>> rt/mo
>>>>>>>>>>>> dules_include/java.base/win32
>>>>>>>>>>>> -I/mnt/d/erik/jdk-wsl/open/src/java.base/share/native/libjim
>>>>>>>>>>>> age
>>>>>>>>>>>> -Z7
>>>>>>>>>>>> -d2Zi+ -wd4800 -WX
>>>>>>>>>>>> -I/mnt/c/PROGRA~2/MICROS~1/2017/PROFES~1/VC/Tools/MSVC/1416~
>>>>>>>>>>>> 1.2
>>>>>>>>>>>> 70/at
>>>>>>>>>>>> lmfc/include
>>>>>>>>>>>> -I/mnt/c/PROGRA~2/MICROS~1/2017/PROFES~1/VC/Tools/MSVC/1416~
>>>>>>>>>>>> 1.2
>>>>>>>>>>>> 70/in clude
>>>>>>>>>>>> -I/mnt/c/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/ucrt
>>>>>>>>>>>> -I/mnt/c/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/shared
>>>>>>>>>>>> -I/mnt/c/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/um
>>>>>>>>>>>> -I/mnt/c/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/winrt
>>>>>>>>>>>> -I/mnt/c/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/cppwinrt
>>>>>>>>>>>> -O2
>>>>>>>>>>>> -Oy- "-DTHIS_FILE=\"\"" -c
>>>>>>>>>>>> -Fo/mnt/d/erik/jdk-wsl/build/windows-x86_64-server-release/h
>>>>>>>>>>>> ots pot/v ariant-server/libjvm/objs/ad_x86_expand.obj
>>>>>>>>>>>> /mnt/d/erik/jdk-wsl/build/windows-x86_64-server-release/hots
>>>>>>>>>>>> pot /vari ant-server/gensrc/adfiles/ad_x86_expand.cpp<
>>>>>>>>>>>> fixpath using wsl mode, with path list:
>>>>>>>>>>>> fixpath converted line
>>>>>>>>>>>>> c:/PROGRA~2/MICROS~1/2017/PROFES~1/VC/Tools/MSVC/1416~1.270
>>>>>>>>>>>>> /bi
>>>>>>>>>>>>> n/Hos
>>>>>>>>>>>> tx86/x64/cl.exe -showIncludes
>>>>>>>>>>>> -Fpd:/erik/jdk-wsl/build/windows-x86_64-server-release/hotsp
>>>>>>>>>>>> ot/ varia nt-server/libjvm/objs/BUILD_LIBJVM.pch
>>>>>>>>>>>> -Yuprecompiled.hpp -D__STDC_FORMAT_MACROS
>>>>>>>>>>>> -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNOMINMAX
>>>>>>>>>>>> -DWIN32_LEAN_AND_MEAN -nologo -MD -MP -D_WINDOWS -DWIN32
>>>>>>>>>>>> -D_JNI_IMPLEMENTATION_ -W3 -DVM_LITTLE_ENDIAN -D_LP64=1
>>>>>>>>>>>> -DPRODUCT -DTARGET_ARCH_x86 -DINCLUDE_SUFFIX_OS=_windows
>>>>>>>>>>>> -DINCLUDE_SUFFIX_CPU=_x86 -DINCLUDE_SUFFIX_COMPILER=_visCPP
>>>>>>>>>>>> -DTARGET_COMPILER_visCPP
>>>>>>>>>>>> -DAMD64 "-DHOTSPOT_LIB_ARCH=\"amd64\"" -DCOMPILER1
>>>>>>>>>>>> -DCOMPILER2
>>>>>>>>>>>> -DINCLUDE_ZGC=0
>>>>>>>>>>>> -Id:/erik/jdk-wsl/build/windows-x86_64-server-release/hotspo
>>>>>>>>>>>> t/v arian t-server/gensrc/adfiles
>>>>>>>>>>>> -Id:/erik/jdk-wsl/closed/src/hotspot/share
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/hotspot/share
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/hotspot/os/windows
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/hotspot/cpu/x86
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/hotspot/os_cpu/windows_x86
>>>>>>>>>>>> -Id:/erik/jdk-wsl/build/windows-x86_64-server-release/hotspo
>>>>>>>>>>>> t/v
>>>>>>>>>>>> arian t-server/gensrc
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/hotspot/share/precompiled
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/hotspot/share/include
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/hotspot/os/windows/include
>>>>>>>>>>>> -Id:/erik/jdk-wsl/build/windows-x86_64-server-release/suppor
>>>>>>>>>>>> t/m
>>>>>>>>>>>> odule
>>>>>>>>>>>> s_include/java.base
>>>>>>>>>>>> -Id:/erik/jdk-wsl/build/windows-x86_64-server-release/suppor
>>>>>>>>>>>> t/m
>>>>>>>>>>>> odule
>>>>>>>>>>>> s_include/java.base/win32
>>>>>>>>>>>> -Id:/erik/jdk-wsl/open/src/java.base/share/native/libjimage
>>>>>>>>>>>> -Z7
>>>>>>>>>>>> -d2Zi+ -wd4800 -WX
>>>>>>>>>>>> -Ic:/PROGRA~2/MICROS~1/2017/PROFES~1/VC/Tools/MSVC/1416~1.27
>>>>>>>>>>>> 0/a
>>>>>>>>>>>> tlmfc
>>>>>>>>>>>> /include
>>>>>>>>>>>> -Ic:/PROGRA~2/MICROS~1/2017/PROFES~1/VC/Tools/MSVC/1416~1.27
>>>>>>>>>>>> 0/i nclud e
>>>>>>>>>>>> -Ic:/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/ucrt
>>>>>>>>>>>> -Ic:/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/shared
>>>>>>>>>>>> -Ic:/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/um
>>>>>>>>>>>> -Ic:/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/winrt
>>>>>>>>>>>> -Ic:/PROGRA~2/WI3CF2~1/10/Include/100177~1.0/cppwinrt -O2
>>>>>>>>>>>> -Oy- "-DTHIS_FILE=\"\"" -c
>>>>>>>>>>>> -Fod:/erik/jdk-wsl/build/windows-x86_64-server-release/hotsp
>>>>>>>>>>>> ot/ varia nt-server/libjvm/objs/ad_x86_expand.obj
>>>>>>>>>>>> d:/erik/jdk-wsl/build/windows-x86_64-server-release/hotspot/
>>>>>>>>>>>> var
>>>>>>>>>>>> iant- server/gensrc/adfiles/ad_x86_expand.cpp<
>>>>>>>>>>>>
>>>>>>>>>>>> An interesting note is that make is rebuilding the pch file
>>>>>>>>>>>> on every invocation so it too has trouble finding the file.
>>>>>>>>>>>>
>>>>>>>>>>>> /Erik
-------------- next part --------------
ÿþd i f f   - r   1 6 8 8 3 0 d e d 6 8 a   d o c / b u i l d i n g . h t m l 
 
 - - -   a / d o c / b u i l d i n g . h t m l 	 M o n   D e c   1 7   0 9 : 3 5 : 1 5   2 0 1 8   - 0 8 0 0 
 
 + + +   b / d o c / b u i l d i n g . h t m l 	 T u e   D e c   1 8   1 2 : 2 3 : 4 2   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 0 6 , 6   + 2 0 6 , 7   @ @ 
 
   < h 4   i d = " w i n d o w s - s u b s y s t e m - f o r - l i n u x - w s l " > W i n d o w s   S u b s y s t e m   f o r   L i n u x   ( W S L ) < / h 4 > 
 
   < p > O n l y   W i n d o w s   1 0   1 8 0 3   o r   n e w e r   i s   s u p p o r t e d   d u e   t o   a   d e p e n d e n c y   o n   t h e   w s l p a t h   u t i l i t y   a n d   s u p p o r t   f o r   e n v i r o n m e n t   v a r i a b l e   s h a r i n g   t h r o u g h   W S L E N V . < / p > 
 
   < p > Y o u   m a y   b u i l d   b o t h   W i n d o w s   a n d   L i n u x   b i n a r i e s   f r o m   W S L .   T o   b u i l d   W i n d o w s   b i n a r i e s ,   y o u   m u s t   u s e   a   W i n d o w s   b o o t   J D K   ( l o c a t e d   i n   a   W i n d o w s - a c c e s s i b l e   d i r e c t o r y ) .   T o   b u i l d   L i n u x   b i n a r i e s ,   y o u   m u s t   u s e   a   L i n u x   b o o t   J D K .   T h e   d e f a u l t   b e h a v i o r   i s   t o   b u i l d   f o r   W i n d o w s .   T o   b u i l d   f o r   L i n u x ,   p a s s   < c o d e > - - b u i l d = x 8 6 _ 6 4 - u n k n o w n - l i n u x - g n u < / c o d e >   a n d   < c o d e > - - h o s t = x 8 6 _ 6 4 - u n k n o w n - l i n u x - g n u < / c o d e >   t o   < c o d e > c o n f i g u r e < / c o d e > . < / p > 
 
 + < p > I f   b u i l d i n g   W i n d o w s   b i n a r i e s ,   y o u   m u s t   a l s o   h a v e   s y n c e d   d o w n   t h e   O p e n J D K   s o u r c e   c o d e   f r o m   W i n d o w s .   T h i s   i s   b e c a u s e   W i n d o w s   e x e c u t a b l e s   ( s u c h   a s   V i s u a l   S t u d i o   a n d   t h e   b o o t   J D K )   m u s t   b e   a b l e   t o   a c c e s s   t h e   s o u r c e   c o d e .   A l s o ,   t h e   d i r e c t o r y   w h e r e   t h e   O p e n J D K   s o u r c e   c o d e   i s   s t o r e d   m u s t   b e   c a s e - i n s e n s i t i v e   ( e i t h e r   b y   s e t t i n g   t h e   i n d i v i d u a l   d i r e c t o r y   a s   c a s e   i n s e n s i t i v e   u s i n g   f s u t i l ,   c h a n g i n g   / e t c / f s t a b   t o   m o u n t   t h e   d r i v e   a s   c a s e - i n s e n s i t i v e ,   o r   e d i t i n g   / e t c / w s l . c o n f   t o   m a r k   a l l   m o u n t e d   W i n d o w s   d r i v e s   a s   c a s e - i n s e n s i t i v e ) . < / p > 
 
   < h 4   i d = " c y g w i n " > C y g w i n < / h 4 > 
 
   < p > A   f u n c t i o n i n g   < a   h r e f = " h t t p : / / w w w . c y g w i n . c o m / " > C y g w i n < / a >   e n v i r o n m e n t   i s   t h u s   r e q u i r e d   f o r   b u i l d i n g   t h e   J D K   o n   W i n d o w s .   I f   y o u   h a v e   a   6 4 - b i t   O S ,   w e   s t r o n g l y   r e c o m m e n d   u s i n g   t h e   6 4 - b i t   v e r s i o n   o f   C y g w i n . < / p > 
 
   < p > < s t r o n g > N o t e : < / s t r o n g >   C y g w i n   h a s   a   m o d e l   o f   c o n t i n u o u s l y   u p d a t i n g   a l l   p a c k a g e s   w i t h o u t   a n y   e a s y   w a y   t o   i n s t a l l   o r   r e v e r t   t o   a   s p e c i f i c   v e r s i o n   o f   a   p a c k a g e .   T h i s   m e a n s   t h a t   w h e n e v e r   y o u   a d d   o r   u p d a t e   a   p a c k a g e   i n   C y g w i n ,   y o u   m i g h t   ( i n a d v e r t e n t l y )   u p d a t e   t o o l s   t h a t   a r e   u s e d   b y   t h e   J D K   b u i l d   p r o c e s s ,   a n d   t h a t   c a n   c a u s e   u n e x p e c t e d   b u i l d   p r o b l e m s . < / p > 
 
 d i f f   - r   1 6 8 8 3 0 d e d 6 8 a   d o c / b u i l d i n g . m d 
 
 - - -   a / d o c / b u i l d i n g . m d 	 M o n   D e c   1 7   0 9 : 3 5 : 1 5   2 0 1 8   - 0 8 0 0 
 
 + + +   b / d o c / b u i l d i n g . m d 	 T u e   D e c   1 8   1 2 : 2 3 : 4 2   2 0 1 8   - 0 8 0 0 
 
 @ @   - 1 9 7 , 6   + 1 9 7 , 1 4   @ @ 
 
   W i n d o w s .   T o   b u i l d   f o r   L i n u x ,   p a s s   ` - - b u i l d = x 8 6 _ 6 4 - u n k n o w n - l i n u x - g n u `   a n d   
 
   ` - - h o s t = x 8 6 _ 6 4 - u n k n o w n - l i n u x - g n u `   t o   ` c o n f i g u r e ` . 
 
   
 
 + I f   b u i l d i n g   W i n d o w s   b i n a r i e s ,   y o u   m u s t   a l s o   h a v e   s y n c e d   d o w n   t h e   O p e n J D K   s o u r c e   c o d e   
 
 + f r o m   W i n d o w s .   T h i s   i s   b e c a u s e   W i n d o w s   e x e c u t a b l e s   ( s u c h   a s   V i s u a l   S t u d i o   a n d   t h e   b o o t 
 
 + J D K )   m u s t   b e   a b l e   t o   a c c e s s   t h e   s o u r c e   c o d e .   A l s o ,   t h e   d i r e c t o r y   w h e r e   t h e   O p e n J D K 
 
 + s o u r c e   c o d e   i s   s t o r e d   m u s t   b e   c a s e - i n s e n s i t i v e   ( e i t h e r   b y   s e t t i n g   t h e   i n d i v i d u a l 
 
 + d i r e c t o r y   a s   c a s e   i n s e n s i t i v e   u s i n g   f s u t i l ,   c h a n g i n g   / e t c / f s t a b   t o   m o u n t   t h e   d r i v e   a s 
 
 + c a s e - i n s e n s i t i v e ,   o r   e d i t i n g   / e t c / w s l . c o n f   t o   m a r k   a l l   m o u n t e d   W i n d o w s   d r i v e s   a s   
 
 + c a s e - i n s e n s i t i v e ) . 
 
 + 
 
   # # # #   C y g w i n 
 
   
 
   A   f u n c t i o n i n g   [ C y g w i n ] ( h t t p : / / w w w . c y g w i n . c o m / )   e n v i r o n m e n t   i s   t h u s   r e q u i r e d   f o r 
 
 d i f f   - r   1 6 8 8 3 0 d e d 6 8 a   m a k e / a u t o c o n f / s p e c . g m k . i n 
 
 - - -   a / m a k e / a u t o c o n f / s p e c . g m k . i n 	 M o n   D e c   1 7   0 9 : 3 5 : 1 5   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / s p e c . g m k . i n 	 T u e   D e c   1 8   1 2 : 2 3 : 4 2   2 0 1 8   - 0 8 0 0 
 
 @ @   - 1 2 3 , 7   + 1 2 3 , 8   @ @ 
 
       #   O n   W i n d o w s ,   t h e   V i s u a l   S t u d i o   t o o l c h a i n   n e e d s   t h e   P A T H   t o   b e   a d j u s t e d 
 
       #   t o   i n c l u d e   V i s u a l   S t u d i o   t o o l s   ( t h i s   n e e d s   t o   b e   i n   c y g w i n / m s y s   s t y l e ) . 
 
       i f e q   ( $ ( O P E N J D K _ T A R G E T _ O S _ E N V ) ,   w i n d o w s . w s l ) 
 
 -         e x p o r t   F I X P A T H _ W S L : = @ F I X P A T H _ W S L @ 
 
 +         e x p o r t   F I X P A T H _ P A T H : = @ V S _ P A T H _ W I N D O W S @ 
 
 +         e x p o r t   W S L E N V : = $ ( W S L E N V ) : F I X P A T H _ P A T H : D E B U G _ F I X P A T H 
 
       e l s e 
 
           e x p o r t   P A T H : = @ V S _ P A T H @ 
 
       e n d i f 
 
 d i f f   - r   1 6 8 8 3 0 d e d 6 8 a   m a k e / a u t o c o n f / t o o l c h a i n _ w i n d o w s . m 4 
 
 - - -   a / m a k e / a u t o c o n f / t o o l c h a i n _ w i n d o w s . m 4 	 M o n   D e c   1 7   0 9 : 3 5 : 1 5   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / t o o l c h a i n _ w i n d o w s . m 4 	 T u e   D e c   1 8   1 2 : 2 3 : 4 2   2 0 1 8   - 0 8 0 0 
 
 @ @   - 3 8 9 , 2 4   + 3 8 9 , 4 3   @ @ 
 
               #   I n   s o m e   c a s e s ,   t h e   V S _ E N V _ C M D   w i l l   c h a n g e   d i r e c t o r y ,   c h a n g e   b a c k   s o 
 
               #   t h e   s e t - v s - e n v . s h   e n d s   u p   i n   t h e   r i g h t   p l a c e . 
 
               $ E C H O   ' c d   % ~ d p 0 '   > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             #   T h e s e   w i l l   e n d   u p   s o m e t h i n g   l i k e : 
 
 -             #   C : / C y g W i n / b i n / b a s h   - c   ' e c h o   V S _ P A T H = \ " $ P A T H \ "   >   l o c a l d e v e n v . s h 
 
 -             #   T h e   t r a i l i n g   s p a c e   f o r   e v e r y o n e   e x c e p t   P A T H   i s   n o   t y p o ,   b u t   i s   n e e d e d   d u e 
 
 -             #   t o   t r a i l i n g   \   i n   t h e   W i n d o w s   p a t h s .   T h e s e   w i l l   b e   s t r i p p e d   l a t e r . 
 
 -             #   T r y i n g   p u r e   C M D   e x t r a c t .   T h i s   r e s u l t s   i n   w i n d o w s   p a t h s   t h a t   n e e d   t o 
 
 -             #   b e   c o n v e r t e d   p o s t   e x t r a c t i o n ,   b u t   a   s i m p l e r   s c r i p t . 
 
 -             $ E C H O   ' e c h o   V S _ P A T H = " % P A T H % "   >   s e t - v s - e n v . s h '   \ 
 
 -                     > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   ' e c h o   V S _ I N C L U D E = " % I N C L U D E %   "   > >   s e t - v s - e n v . s h '   \ 
 
 -                     > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   ' e c h o   V S _ L I B = " % L I B %   "   > >   s e t - v s - e n v . s h '   \ 
 
 -                     > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   ' e c h o   V C I N S T A L L D I R = " % V C I N S T A L L D I R %   "   > >   s e t - v s - e n v . s h '   \ 
 
 -                     > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   ' e c h o   W i n d o w s S d k D i r = " % W i n d o w s S d k D i r %   "   > >   s e t - v s - e n v . s h '   \ 
 
 -                     > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   ' e c h o   W I N D O W S S D K D I R = " % W I N D O W S S D K D I R %   "   > >   s e t - v s - e n v . s h '   \ 
 
 -                     > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +             i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +                 #   T h e s e   w i l l   e n d   u p   s o m e t h i n g   l i k e : 
 
 +                 #   e c h o   V S _ P A T H = \ " $ P A T H \ "   >   s e t - v s - e n v . s h 
 
 +                 #   T h e   t r a i l i n g   s p a c e   f o r   e v e r y o n e   e x c e p t   P A T H   i s   n o   t y p o ,   b u t   i s   n e e d e d   d u e 
 
 +                 #   t o   t r a i l i n g   \   i n   t h e   W i n d o w s   p a t h s .   T h e s e   w i l l   b e   s t r i p p e d   l a t e r . 
 
 +                 #   T r y i n g   p u r e   C M D   e x t r a c t .   T h i s   r e s u l t s   i n   w i n d o w s   p a t h s   t h a t   n e e d   t o 
 
 +                 #   b e   c o n v e r t e d   p o s t   e x t r a c t i o n ,   b u t   a   s i m p l e r   s c r i p t . 
 
 +                 $ E C H O   ' e c h o   V S _ P A T H = " % P A T H % "   >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   ' e c h o   V S _ I N C L U D E = " % I N C L U D E %   "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   ' e c h o   V S _ L I B = " % L I B %   "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   ' e c h o   V C I N S T A L L D I R = " % V C I N S T A L L D I R %   "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   ' e c h o   W i n d o w s S d k D i r = " % W i n d o w s S d k D i r %   "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   ' e c h o   W I N D O W S S D K D I R = " % W I N D O W S S D K D I R %   "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +             e l s e 
 
 +                 #   T h e s e   w i l l   e n d   u p   s o m e t h i n g   l i k e : 
 
 +                 #   C : / C y g W i n / b i n / b a s h   - c   ' e c h o   V S _ P A T H = \ " $ P A T H \ "   >   l o c a l d e v e n v . s h 
 
 +                 #   T h e   t r a i l i n g   s p a c e   f o r   e v e r y o n e   e x c e p t   P A T H   i s   n o   t y p o ,   b u t   i s   n e e d e d   d u e 
 
 +                 #   t o   t r a i l i n g   \   i n   t h e   W i n d o w s   p a t h s .   T h e s e   w i l l   b e   s t r i p p e d   l a t e r . 
 
 +                 $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V S _ P A T H = " ' \ " $ P A T H \ "   >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V S _ I N C L U D E = " ' \ " $ I N C L U D E \ ; $ i n c l u d e   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V S _ L I B = " ' \ " $ L I B \ ; $ l i b   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V C I N S T A L L D I R = " ' \ " $ V C I N S T A L L D I R   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   W i n d o w s S d k D i r = " ' \ " $ W i n d o w s S d k D i r   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +                 $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   W I N D O W S S D K D I R = " ' \ " $ W I N D O W S S D K D I R   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +                         > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +             f i 
 
   
 
               #   N o w   e x e c u t e   t h e   n e w l y   c r e a t e d   b a t   f i l e . 
 
               #   T h e   |   c a t   i s   t o   s t o p   S e t E n v . C m d   t o   m e s s   w i t h   s y s t e m   c o l o r s   o n   m s y s . 
 
 


More information about the build-dev mailing list