[PATCH] Support for building using WSL (Windows Subsystem for Linux) on Windows
Andrew Luo
andrewluotechnologies at outlook.com
Sun Dec 16 08:01:31 UTC 2018
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?)
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
(By the way, you misspelled my name in your sandbox commit): http://hg.openjdk.java.net/jdk/sandbox/rev/12615de8335e
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?
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 2 6 1 5 d e 8 3 3 5 e 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 F r i D e c 1 4 1 7 : 1 2 : 1 4 2 0 1 8 - 0 8 0 0
+ + + b / d o c / b u i l d i n g . h t m l S a t D e c 1 5 2 3 : 1 0 : 1 1 2 0 1 8 - 0 8 0 0
@ @ - 1 4 5 , 7 + 1 4 5 , 7 @ @
< l i > < p > D o n o t c h e c k o u t t h e s o u r c e c o d e i n a p a t h w h i c h c o n t a i n s s p a c e s . C h a n c e s a r e t h e b u i l d w i l l n o t w o r k . T h i s i s m o s t l i k e l y t o b e a n i s s u e o n W i n d o w s s y s t e m s . < / p > < / l i >
< l i > < p > D o n o t c h e c k o u t t h e s o u r c e c o d e i n a p a t h w h i c h h a s a v e r y l o n g n a m e o r i s n e s t e d m a n y l e v e l s d e e p . C h a n c e s a r e y o u w i l l h i t a n O S l i m i t a t i o n d u r i n g t h e b u i l d . < / p > < / l i >
< l i > < p > P u t t h e s o u r c e c o d e o n a l o c a l d i s k , n o t a n e t w o r k s h a r e . I f p o s s i b l e , u s e a n S S D . T h e b u i l d p r o c e s s i s v e r y d i s k i n t e n s i v e , a n d h a v i n g s l o w d i s k a c c e s s w i l l s i g n i f i c a n t l y i n c r e a s e b u i l d t i m e s . I f y o u n e e d t o u s e a n e t w o r k s h a r e f o r t h e s o u r c e c o d e , s e e b e l o w f o r s u g g e s t i o n s o n h o w t o k e e p t h e b u i l d a r t i f a c t s o n a l o c a l d i s k . < / p > < / l i >
- < l i > < p > O n W i n d o w s , e x t r a c a r e m u s t b e t a k e n t o m a k e s u r e t h e < a h r e f = " # c y g w i n " > C y g w i n < / a > e n v i r o n m e n t i s c o n s i s t e n t . I t i s r e c o m m e n d e d t h a t y o u f o l l o w t h i s p r o c e d u r e : < / p >
+ < l i > < p > O n W i n d o w s , i f u s i n g < a h r e f = " # c y g w i n " > C y g w i n < / a > , e x t r a c a r e m u s t b e t a k e n t o m a k e s u r e t h e e n v i r o n m e n t i s c o n s i s t e n t . I t i s r e c o m m e n d e d t h a t y o u f o l l o w t h i s p r o c e d u r e : < / p >
< u l >
< l i > < p > C r e a t e t h e d i r e c t o r y t h a t i s g o i n g t o c o n t a i n t h e t o p d i r e c t o r y o f t h e J D K c l o n e b y u s i n g t h e < c o d e > m k d i r < / c o d e > c o m m a n d i n t h e C y g w i n b a s h s h e l l . T h a t i s , d o < e m > n o t < / e m > c r e a t e i t u s i n g W i n d o w s E x p l o r e r . T h i s w i l l e n s u r e t h a t i t w i l l h a v e p r o p e r C y g w i n a t t r i b u t e s , a n d t h a t i t ' s c h i l d r e n w i l l i n h e r i t t h o s e a t t r i b u t e s . < / p > < / l i >
< l i > < p > D o n o t p u t t h e J D K c l o n e i n a p a t h u n d e r y o u r C y g w i n h o m e d i r e c t o r y . T h i s i s e s p e c i a l l y i m p o r t a n t i f y o u r u s e r n a m e c o n t a i n s s p a c e s a n d / o r m i x e d u p p e r a n d l o w e r c a s e l e t t e r s . < / p > < / l i >
@ @ - 2 0 1 , 8 + 2 0 1 , 1 1 @ @
< h 3 i d = " w i n d o w s " > W i n d o w s < / h 3 >
< p > W i n d o w s X P i s n o t a s u p p o r t e d p l a t f o r m , b u t a l l n e w e r W i n d o w s s h o u l d b e a b l e t o b u i l d t h e J D K . < / p >
< p > O n W i n d o w s , i t i s i m p o r t a n t t h a t y o u p a y a t t e n t i o n t o t h e i n s t r u c t i o n s i n t h e < a h r e f = " # s p e c i a l - c o n s i d e r a t i o n s " > S p e c i a l C o n s i d e r a t i o n s < / a > . < / p >
- < p > W i n d o w s i s t h e o n l y n o n - P O S I X O S s u p p o r t e d b y t h e J D K , a n d a s s u c h , r e q u i r e s s o m e e x t r a c a r e . A P O S I X s u p p o r t l a y e r i s r e q u i r e d t o b u i l d o n W i n d o w s . C u r r e n t l y , t h e o n l y s u p p o r t e d s u c h l a y e r i s C y g w i n . ( M s y s i s n o l o n g e r s u p p o r t e d d u e t o a t o o o l d b a s h ; m s y s 2 a n d t h e n e w 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 o u l d l i k e l y b e p o s s i b l e t o s u p p o r t i n a f u t u r e v e r s i o n b u t t h a t w o u l d r e q u i r e e f f o r t t o i m p l e m e n t . ) < / p >
+ < p > W i n d o w s i s t h e o n l y n o n - P O S I X O S s u p p o r t e d b y t h e J D K , a n d a s s u c h , r e q u i r e s s o m e e x t r a c a r e . A P O S I X s u p p o r t l a y e r i s r e q u i r e d t o b u i l d o n W i n d o w s . C u r r e n t l y , t h e o n l y s u p p o r t e d s u c h l a y e r s a r e 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 ) a n d C y g w i n . ( M s y s i s n o l o n g e r s u p p o r t e d d u e t o a t o o o l d b a s h ; m s y s 2 w o u l d l i k e l y b e p o s s i b l e t o s u p p o r t i n a f u t u r e v e r s i o n b u t t h a t w o u l d r e q u i r e e f f o r t t o i m p l e m e n t . ) < / p >
< p > I n t e r n a l l y i n t h e b u i l d s y s t e m , a l l p a t h s a r e r e p r e s e n t e d a s U n i x - s t y l e p a t h s , e . g . < c o d e > / c y g d r i v e / c / h g / j d k 9 / M a k e f i l e < / c o d e > r a t h e r t h a n < c o d e > C : \ h g \ j d k 9 \ M a k e f i l e < / c o d e > . T h i s r u l e a l s o a p p l i e s t o i n p u t t o t h e b u i l d s y s t e m , e . g . i n a r g u m e n t s t o < c o d e > c o n f i g u r e < / c o d e > . S o , u s e < c o d e > - - w i t h - m s v c r - d l l = / c y g d r i v e / c / m s v c r 1 0 0 . d l l < / c o d e > r a t h e r t h a n < c o d e > - - w i t h - m s v c r - d l l = c : \ m s v c r 1 0 0 . d l l < / c o d e > . F o r d e t a i l s o n t h i s c o n v e r s i o n , s e e t h e s e c t i o n o n < a h r e f = " # f i x p a t h " > F i x p a t h < / a > . < / p >
+ < 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 >
< 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 2 6 1 5 d e 8 3 3 5 e 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 F r i D e c 1 4 1 7 : 1 2 : 1 4 2 0 1 8 - 0 8 0 0
+ + + b / d o c / b u i l d i n g . m d S a t D e c 1 5 2 3 : 1 0 : 1 1 2 0 1 8 - 0 8 0 0
@ @ - 7 5 , 8 + 7 5 , 8 @ @
n e t w o r k s h a r e f o r t h e s o u r c e c o d e , s e e b e l o w f o r s u g g e s t i o n s o n h o w t o k e e p
t h e b u i l d a r t i f a c t s o n a l o c a l d i s k .
- * O n W i n d o w s , e x t r a c a r e m u s t b e t a k e n t o m a k e s u r e t h e [ C y g w i n ] ( # c y g w i n )
- e n v i r o n m e n t i s c o n s i s t e n t . I t i s r e c o m m e n d e d t h a t y o u f o l l o w t h i s
+ * O n W i n d o w s , i f u s i n g [ C y g w i n ] ( # c y g w i n ) , e x t r a c a r e m u s t b e t a k e n t o m a k e s u r e
+ t h e e n v i r o n m e n t i s c o n s i s t e n t . I t i s r e c o m m e n d e d t h a t y o u f o l l o w t h i s
p r o c e d u r e :
* C r e a t e t h e d i r e c t o r y t h a t i s g o i n g t o c o n t a i n t h e t o p d i r e c t o r y o f t h e
@ @ - 1 7 4 , 1 0 + 1 7 4 , 1 0 @ @
W i n d o w s i s t h e o n l y n o n - P O S I X O S s u p p o r t e d b y t h e J D K , a n d a s s u c h , r e q u i r e s
s o m e e x t r a c a r e . A P O S I X s u p p o r t l a y e r i s r e q u i r e d t o b u i l d o n W i n d o w s .
- C u r r e n t l y , t h e o n l y s u p p o r t e d s u c h l a y e r i s C y g w i n . ( M s y s i s n o l o n g e r
- s u p p o r t e d d u e t o a t o o o l d b a s h ; m s y s 2 a n d t h e n e w 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 o u l d l i k e l y b e p o s s i b l e t o s u p p o r t i n a f u t u r e v e r s i o n b u t t h a t w o u l d
- r e q u i r e e f f o r t t o i m p l e m e n t . )
+ C u r r e n t l y , t h e o n l y s u p p o r t e d s u c h l a y e r s a r e 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 )
+ a n d C y g w i n . ( M s y s i s n o l o n g e r s u p p o r t e d d u e t o a t o o o l d b a s h ; m s y s 2 w o u l d
+ l i k e l y b e p o s s i b l e t o s u p p o r t i n a f u t u r e v e r s i o n b u t t h a t w o u l d r e q u i r e e f f o r t
+ t o i m p l e m e n t . )
I n t e r n a l l y i n t h e b u i l d s y s t e m , a l l p a t h s a r e r e p r e s e n t e d a s U n i x - s t y l e p a t h s ,
e . g . ` / c y g d r i v e / c / h g / j d k 9 / M a k e f i l e ` r a t h e r t h a n ` C : \ h g \ j d k 9 \ M a k e f i l e ` . T h i s
@ @ - 1 8 6 , 6 + 1 8 6 , 1 7 @ @
` - - w i t h - m s v c r - d l l = c : \ m s v c r 1 0 0 . d l l ` . F o r d e t a i l s o n t h i s c o n v e r s i o n , s e e t h e s e c t i o n
o n [ F i x p a t h ] ( # f i x p a t h ) .
+ # # # # 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 )
+
+ 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 .
+
+ 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 ` - - 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 ` .
+
# # # # 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 2 6 1 5 d e 8 3 3 5 e m a k e / a u t o c o n f / b a s i c s . m 4
- - - a / m a k e / a u t o c o n f / b a s i c s . m 4 F r i D e c 1 4 1 7 : 1 2 : 1 4 2 0 1 8 - 0 8 0 0
+ + + b / m a k e / a u t o c o n f / b a s i c s . m 4 S a t D e c 1 5 2 3 : 1 0 : 1 1 2 0 1 8 - 0 8 0 0
@ @ - 6 1 6 , 6 + 6 1 6 , 7 @ @
B A S I C _ P A T H _ P R O G S ( C P I O , [ c p i o b s d c p i o ] )
B A S I C _ P A T H _ P R O G S ( N I C E , n i c e )
B A S I C _ P A T H _ P R O G S ( P A N D O C , p a n d o c )
+ B A S I C _ P A T H _ P R O G S ( L S B _ R E L E A S E , l s b _ r e l e a s e )
B A S I C _ P A T H _ P R O G S ( C M D , [ c m d . e x e / m n t / c / W i n d o w s / S y s t e m 3 2 / c m d . e x e ] )
] )
@ @ - 6 3 8 , 1 3 + 6 3 9 , 1 4 @ @
i f t e s t " x $ O P E N J D K _ T A R G E T _ O S " = " x w i n d o w s " ; t h e n
P A T H _ S E P = " ; "
+ E X E _ S U F F I X = " . e x e "
B A S I C _ C H E C K _ P A T H S _ W I N D O W S
e l s e
P A T H _ S E P = " : "
- E X E C U T A B L E _ S U F F I X = " "
+ E X E _ S U F F I X = " "
f i
A C _ S U B S T ( P A T H _ S E P )
- A C _ S U B S T ( E X E C U T A B L E _ S U F F I X )
+ A C _ S U B S T ( E X E _ S U F F I X )
# W e g e t t h e t o p - l e v e l d i r e c t o r y f r o m t h e s u p p o r t i n g w r a p p e r s .
A C _ M S G _ C H E C K I N G ( [ f o r t o p - l e v e l d i r e c t o r y ] )
d i f f - r 1 2 6 1 5 d e 8 3 3 5 e m a k e / a u t o c o n f / b a s i c s _ w i n d o w s . m 4
- - - a / m a k e / a u t o c o n f / b a s i c s _ w i n d o w s . m 4 F r i D e c 1 4 1 7 : 1 2 : 1 4 2 0 1 8 - 0 8 0 0
+ + + b / m a k e / a u t o c o n f / b a s i c s _ w i n d o w s . m 4 S a t D e c 1 5 2 3 : 1 0 : 1 1 2 0 1 8 - 0 8 0 0
@ @ - 4 6 4 , 7 + 4 6 4 , 6 @ @
i f t e s t " x $ t e s t _ c y g d r i v e _ p r e f i x " = x ; t h e n
A C _ M S G _ E R R O R ( [ Y o u r c y g d r i v e p r e f i x i s n o t / c y g d r i v e . T h i s i s c u r r e n t l y n o t s u p p o r t e d . C h a n g e w i t h m o u n t - c . ] )
f i
- E X E C U T A B L E _ S U F F I X = " "
e l 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 . m s y s " ; t h e n
A C _ M S G _ C H E C K I N G ( [ m s y s r e l e a s e ] )
M S Y S _ V E R S I O N = ` $ U N A M E - r `
@ @ - 4 7 9 , 9 + 4 7 8 , 2 6 @ @
B A S I C _ W I N D O W S _ R E W R I T E _ A S _ U N I X _ P A T H ( M S Y S _ R O O T _ P A T H )
A C _ M S G _ R E S U L T ( [ $ M S Y S _ R O O T _ P A T H ] )
W I N D O W S _ E N V _ R O O T _ P A T H = " $ M S Y S _ R O O T _ P A T H "
- E X E C U T A B L E _ S U F F I X = " "
e l 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
- E X E C U T A B L E _ S U F F I X = " . e x e "
+ A C _ M S G _ C H E C K I N G ( [ W i n d o w s v e r s i o n ] )
+ # m 4 r e p l a c e s [ a n d ] s o w e u s e @ < : @ a n d @ : > @ i n s t e a d
+ W I N D O W S _ V E R S I O N = ` $ C M D / c v e r . e x e | $ E G R E P - o ' ( @ < : @ 0 - 9 @ : > @ + \ . ) + @ < : @ 0 - 9 @ : > @ + ' `
+ A C _ M S G _ R E S U L T ( [ $ W I N D O W S _ V E R S I O N ] )
+
+ A C _ M S G _ C H E C K I N G ( [ W S L k e r n e l v e r s i o n ] )
+ W S L _ K E R N E L _ V E R S I O N = ` $ U N A M E - v `
+ A C _ M S G _ R E S U L T ( [ $ W S L _ K E R N E L _ V E R S I O N ] )
+
+ A C _ M S G _ C H E C K I N G ( [ W S L k e r n e l r e l e a s e ] )
+ W S L _ K E R N E L _ R E L E A S E = ` $ U N A M E - r `
+ A C _ M S G _ R E S U L T ( [ $ W S L _ K E R N E L _ R E L E A S E ] )
+
+ A C _ M S G _ C H E C K I N G ( [ W S L d i s t r i b u t i o n ] )
+ W S L _ D I S T R I B U T I O N = ` $ L S B _ R E L E A S E - d | s e d ' s / D e s c r i p t i o n : \ t / / ' `
+ A C _ M S G _ R E S U L T ( [ $ W S L _ D I S T R I B U T I O N ] )
+
+ W I N D O W S _ E N V _ V E N D O R = ' W S L '
+ W I N D O W S _ E N V _ V E R S I O N = " $ W S L _ D I S T R I B U T I O N $ W S L _ K E R N E L _ V E R S I O N $ W S L _ K E R N E L _ R E L E A S E ( o n W i n d o w s b u i l d $ W I N D O W S _ V E R S I O N ) "
e l s e
A C _ M S G _ E R R O R ( [ U n k n o w n W i n d o w s e n v i r o n m e n t . N e i t h e r c y g w i n , m s y s , n o r w s l w a s d e t e c t e d . ] )
f i
d i f f - r 1 2 6 1 5 d e 8 3 3 5 e m a k e / a u t o c o n f / b o o t - j d k . m 4
- - - a / m a k e / a u t o c o n f / b o o t - j d k . m 4 F r i D e c 1 4 1 7 : 1 2 : 1 4 2 0 1 8 - 0 8 0 0
+ + + b / m a k e / a u t o c o n f / b o o t - j d k . m 4 S a t D e c 1 5 2 3 : 1 0 : 1 1 2 0 1 8 - 0 8 0 0
@ @ - 6 3 , 1 8 + 6 3 , 1 8 @ @
# I f p r e v i o u s s t e p c l a i m e d t o h a v e f o u n d a J D K , c h e c k i t t o s e e i f i t s e e m s t o b e v a l i d .
i f t e s t " x $ B O O T _ J D K _ F O U N D " = x m a y b e ; t h e n
# D o w e h a v e a b i n / j a v a ?
- i f t e s t ! - x " $ B O O T _ J D K / b i n / j a v a $ E X E C U T A B L E _ S U F F I X " ; t h e n
+ i f t e s t ! - x " $ B O O T _ J D K / b i n / j a v a $ E X E _ S U F F I X " ; t h e n
A C _ M S G _ N O T I C E ( [ P o t e n t i a l B o o t J D K f o u n d a t $ B O O T _ J D K d i d n o t c o n t a i n b i n / j a v a ; i g n o r i n g ] )
B O O T _ J D K _ F O U N D = n o
e l s e
# D o w e h a v e a b i n / j a v a c ?
- i f t e s t ! - x " $ B O O T _ J D K / b i n / j a v a c $ E X E C U T A B L E _ S U F F I X " ; t h e n
+ i f t e s t ! - x " $ B O O T _ J D K / b i n / j a v a c $ E X E _ S U F F I X " ; t h e n
A C _ M S G _ N O T I C E ( [ P o t e n t i a l B o o t J D K f o u n d a t $ B O O T _ J D K d i d n o t c o n t a i n b i n / j a v a c ; i g n o r i n g ] )
A C _ M S G _ N O T I C E ( [ ( T h i s m i g h t b e a n J R E i n s t e a d o f a n J D K ) ] )
B O O T _ J D K _ F O U N D = n o
e l s e
# O h , t h i s i s l o o k i n g g o o d ! W e p r o b a b l y h a v e f o u n d a p r o p e r J D K . I s i t t h e c o r r e c t v e r s i o n ?
- B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a $ E X E C U T A B L E _ S U F F I X " $ U S E R _ B O O T _ J D K _ O P T I O N S - v e r s i o n 2 > & 1 | $ H E A D - n 1 `
+ B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a $ E X E _ S U F F I X " $ U S E R _ B O O T _ J D K _ O P T I O N S - v e r s i o n 2 > & 1 | $ H E A D - n 1 `
i f [ [ [ " $ B O O T _ J D K _ V E R S I O N " = ~ " P i c k e d u p " ] ] ] ; t h e n
A C _ M S G _ N O T I C E ( [ Y o u h a v e _ J A V A _ O P T I O N S o r J A V A _ T O O L _ O P T I O N S s e t . T h i s c a n m e s s u p t h e b u i l d . P l e a s e u s e - - w i t h - b o o t - j d k - j v m a r g s i n s t e a d . ] )
A C _ M S G _ N O T I C E ( [ J a v a r e p o r t s : " $ B O O T _ J D K _ V E R S I O N " . ] )
@ @ - 1 0 1 , 7 + 1 0 1 , 7 @ @
A C _ M S G _ C H E C K I N G ( [ f o r B o o t J D K ] )
A C _ M S G _ R E S U L T ( [ $ B O O T _ J D K ] )
A C _ M S G _ C H E C K I N G ( [ B o o t J D K v e r s i o n ] )
- B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a $ E X E C U T A B L E _ S U F F I X " $ U S E R _ B O O T _ J D K _ O P T I O N S - v e r s i o n 2 > & 1 | $ T R ' \ n \ r ' ' ' `
+ B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a $ E X E _ S U F F I X " $ U S E R _ B O O T _ J D K _ O P T I O N S - v e r s i o n 2 > & 1 | $ T R ' \ n \ r ' ' ' `
A C _ M S G _ R E S U L T ( [ $ B O O T _ J D K _ V E R S I O N ] )
f i # e n d c h e c k j d k v e r s i o n
f i # e n d c h e c k j a v a c
@ @ - 3 3 5 , 1 1 + 3 3 5 , 1 1 @ @
A C _ S U B S T ( B O O T _ J D K )
# S e t u p t o o l s f r o m t h e B o o t J D K .
- B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A , j a v a $ E X E C U T A B L E _ S U F F I X )
- B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A C , j a v a c $ E X E C U T A B L E _ S U F F I X )
- B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A D O C , j a v a d o c $ E X E C U T A B L E _ S U F F I X )
- B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R , j a r $ E X E C U T A B L E _ S U F F I X )
- B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R S I G N E R , j a r s i g n e r $ E X E C U T A B L E _ S U F F I X )
+ B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A , j a v a $ E X E _ S U F F I X )
+ B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A C , j a v a c $ E X E _ S U F F I X )
+ B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A D O C , j a v a d o c $ E X E _ S U F F I X )
+ B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R , j a r $ E X E _ S U F F I X )
+ B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R S I G N E R , j a r s i g n e r $ E X E _ S U F F I X )
# F i n a l l y , s e t s o m e o t h e r o p t i o n s . . .
d i f f - r 1 2 6 1 5 d e 8 3 3 5 e 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 F r i D e c 1 4 1 7 : 1 2 : 1 4 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 S a t D e c 1 5 2 3 : 1 0 : 1 1 2 0 1 8 - 0 8 0 0
@ @ - 1 2 3 , 8 + 1 2 3 , 7 @ @
# 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 _ 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 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 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 2 6 1 5 d e 8 3 3 5 e m a k e / a u t o c o n f / t o o l c h a i n . m 4
- - - a / m a k e / a u t o c o n f / t o o l c h a i n . m 4 F r i D e c 1 4 1 7 : 1 2 : 1 4 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 . m 4 S a t D e c 1 5 2 3 : 1 0 : 1 1 2 0 1 8 - 0 8 0 0
@ @ - 1 8 0 , 7 + 1 8 0 , 6 @ @
S H A R E D _ L I B R A R Y = ' [ $ ] 1 . d l l '
S T A T I C _ L I B R A R Y = ' [ $ ] 1 . l i b '
O B J _ S U F F I X = ' . o b j '
- E X E _ S U F F I X = ' . e x e '
e l s e
L I B R A R Y _ P R E F I X = l i b
S H A R E D _ L I B R A R Y _ S U F F I X = ' . s o '
@ @ - 1 8 8 , 7 + 1 8 7 , 6 @ @
S H A R E D _ L I B R A R Y = ' l i b [ $ ] 1 . s o '
S T A T I C _ L I B R A R Y = ' l i b [ $ ] 1 . a '
O B J _ S U F F I X = ' . o '
- E X E _ S U F F I X = ' '
i f t e s t " x $ O P E N J D K _ T A R G E T _ O S " = x m a c o s x ; t h e n
# F o r f u l l s t a t i c b u i l d s , w e ' r e o v e r l o a d i n g t h e S H A R E D _ L I B R A R Y
# v a r i a b l e s i n o r d e r t o l i m i t t h e a m o u n t o f c h a n g e s r e q u i r e d .
@ @ - 2 1 2 , 7 + 2 1 0 , 6 @ @
A C _ S U B S T ( S H A R E D _ L I B R A R Y )
A C _ S U B S T ( S T A T I C _ L I B R A R Y )
A C _ S U B S T ( O B J _ S U F F I X )
- A C _ S U B S T ( E X E _ S U F F I X )
] )
# D e t e r m i n e w h i c h t o o l c h a i n t y p e t o u s e , a n d m a k e s u r e i t i s v a l i d f o r t h i s
@ @ - 2 8 1 , 1 3 + 2 7 8 , 1 3 @ @
T O O L C H A I N _ C C _ B I N A R Y _ c l a n g = " c l a n g "
T O O L C H A I N _ C C _ B I N A R Y _ g c c = " g c c "
- T O O L C H A I N _ C C _ B I N A R Y _ m i c r o s o f t = " c l $ E X E C U T A B L E _ S U F F I X "
+ T O O L C H A I N _ C C _ B I N A R Y _ m i c r o s o f t = " c l $ E X E _ S U F F I X "
T O O L C H A I N _ C C _ B I N A R Y _ s o l s t u d i o = " c c "
T O O L C H A I N _ C C _ B I N A R Y _ x l c = " x l c _ r "
T O O L C H A I N _ C X X _ B I N A R Y _ c l a n g = " c l a n g + + "
T O O L C H A I N _ C X X _ B I N A R Y _ g c c = " g + + "
- T O O L C H A I N _ C X X _ B I N A R Y _ m i c r o s o f t = " c l $ E X E C U T A B L E _ S U F F I X "
+ T O O L C H A I N _ C X X _ B I N A R Y _ m i c r o s o f t = " c l $ E X E _ S U F F I X "
T O O L C H A I N _ C X X _ B I N A R Y _ s o l s t u d i o = " C C "
T O O L C H A I N _ C X X _ B I N A R Y _ x l c = " x l C _ r "
@ @ - 7 0 6 , 7 + 7 0 3 , 7 @ @
# I n t h e M i c r o s o f t t o o l c h a i n w e h a v e a s e p a r a t e L D c o m m a n d " l i n k " .
# M a k e s u r e w e r e j e c t / u s r / b i n / l i n k ( a s d e t e r m i n e d i n C Y G W I N _ L I N K ) , w h i c h i s
# a c y g w i n p r o g r a m f o r s o m e t h i n g c o m p l e t e l y d i f f e r e n t .
- A C _ C H E C K _ P R O G ( [ L D ] , [ l i n k . e x e ] , [ l i n k . e x e ] , , , [ $ C Y G W I N _ L I N K ] )
+ A C _ C H E C K _ P R O G ( [ L D ] , [ l i n k $ E X E _ S U F F I X ] , [ l i n k $ E X E _ S U F F I X ] , , , [ $ C Y G W I N _ L I N K ] )
B A S I C _ F I X U P _ E X E C U T A B L E ( L D )
# V e r i f y t h a t w e i n d e e d s u c c e e d e d w i t h t h i s t r i c k .
A C _ M S G _ C H E C K I N G ( [ i f t h e f o u n d l i n k . e x e i s a c t u a l l y t h e V i s u a l S t u d i o l i n k e r ] )
@ @ - 7 5 8 , 7 + 7 5 5 , 7 @ @
#
i f t e s t " x $ T O O L C H A I N _ T Y P E " = x m i c r o s o f t ; t h e n
# T h e c o r r e s p o n d i n g a r t o o l i s l i b . e x e ( u s e d t o c r e a t e s t a t i c l i b r a r i e s )
- A C _ C H E C K _ P R O G ( [ A R ] , [ l i b . e x e ] , [ l i b . e x e ] , , , )
+ A C _ C H E C K _ P R O G ( [ A R ] , [ l i b $ E X E _ S U F F I X ] , [ l i b $ E X E _ S U F F I X ] , , , )
e l i f t e s t " x $ T O O L C H A I N _ T Y P E " = x g c c ; t h e n
B A S I C _ C H E C K _ T O O L S ( A R , a r g c c - a r )
e l s e
@ @ - 7 8 2 , 1 2 + 7 7 9 , 1 2 @ @
f i
i f t e s t " x $ T O O L C H A I N _ T Y P E " = x m i c r o s o f t ; t h e n
- A C _ C H E C K _ P R O G ( [ M T ] , [ m t . e x e ] , [ m t . e x e ] , , , [ / u s r / b i n / m t ] )
+ A C _ C H E C K _ P R O G ( [ M T ] , [ m t $ E X E _ S U F F I X ] , [ m t $ E X E _ S U F F I X ] , , , [ / u s r / b i n / m t ] )
B A S I C _ F I X U P _ E X E C U T A B L E ( M T )
# S e t u p t h e r e s o u r c e c o m p i l e r ( R C )
- A C _ C H E C K _ P R O G ( [ R C ] , [ r c . e x e ] , [ r c . e x e ] , , , [ / u s r / b i n / r c ] )
+ A C _ C H E C K _ P R O G ( [ R C ] , [ r c $ E X E _ S U F F I X ] , [ r c $ E X E _ S U F F I X ] , , , [ / u s r / b i n / r c ] )
B A S I C _ F I X U P _ E X E C U T A B L E ( R C )
- A C _ C H E C K _ P R O G ( [ D U M P B I N ] , [ d u m p b i n . e x e ] , [ d u m p b i n . e x e ] , , , )
+ A C _ C H E C K _ P R O G ( [ D U M P B I N ] , [ d u m p b i n $ E X E _ S U F F I X ] , [ d u m p b i n $ E X E _ S U F F I X ] , , , )
B A S I C _ F I X U P _ E X E C U T A B L E ( D U M P B I N )
# W e n e e d t o c h e c k f o r ' m s b u i l d . e x e ' b e c a u s e a t t h e p l a c e w h e r e w e e x p e c t t o
# f i n d ' m s b u i l d . e x e ' t h e r e ' s a l s o a d i r e c t o r y c a l l e d ' m s b u i l d ' a n d c o n f i g u r e
@ @ - 7 9 6 , 7 + 7 9 3 , 7 @ @
# N o t i c e t h a t w e i n t e n t i o n a l l y d o n ' t f i x u p t h e p a t h t o M S B U I L D b e c a u s e w e
# w i l l c a l l i t i n a D O S s h e l l d u r i n g f r e e t y p e d e t e c t i o n o n W i n d o w s ( s e e
# ' L I B _ S E T U P _ F R E E T Y P E ' i n " l i b r a r i e s . m 4 "
- A C _ C H E C K _ P R O G ( [ M S B U I L D ] , [ m s b u i l d . e x e ] , [ m s b u i l d . e x e ] , , , )
+ A C _ C H E C K _ P R O G ( [ M S B U I L D ] , [ m s b u i l d $ E X E _ S U F F I X ] , [ m s b u i l d $ E X E _ S U F F I X ] , , , )
f i
i f t e s t " x $ O P E N J D K _ T A R G E T _ O S " = x s o l a r i s ; t h e n
More information about the build-dev
mailing list