RFR: JDK-8215445: Enable building for Windows in WSL (original) (raw)
Erik Joelsson erik.joelsson at oracle.com
Fri Dec 21 09:57:27 UTC 2018
- Previous message (by thread): RFR: JDK-8215445: Enable building for Windows in WSL
- Next message (by thread): RFR: JDK-8215445: Enable building for Windows in WSL
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
Here is an updated webrev: http://cr.openjdk.java.net/~erikj/8215445/webrev.03/
I updated the build doc.
- require 1809
- Changed to say the drive must be mounted case-insensitive
- Reordered the WSL and Cygwin sections since Cygwin is still the main supported environment
I also changed Images.gmk to use fixpath when creating the CDS archive.
Regarding DEBUG_FIXPATH, I agree that it's rarely used, and I used the technique Magnus described myself, but I think it makes sense to keep it there by default in WSLENV. It just makes it simpler. We may add more to this list down the line.
/Erik
On 2018-12-20 20:05, Andrew Luo wrote:
Hi Magnus, For DEBUGFIXPATH, I added it to WSLENV so that users can set DEBUGFIXPATH when running make to get the debug output from fixpath. It doesn’t turn it on by default, only if you do, for example, “DEBUGFIXPATH=1 make”. Otherwise, if we leave it out, that environment variable won’t get propagated from WSL to Win32 so it might confuse users who don’t know they have to add it to WSLENV. But if you think it should be removed anyways, I am not against it. We solved the extra output by adding code to fixpath to set Path to FIXPATHPATH. That part of toolchain.m4 occurs before FIXPATH is even built, so it does need that extra filtering still. Thanks, -Andrew *From:*Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com> Sent: Thursday, December 20, 2018 10:55 AM To: Erik Joelsson <erik.joelsson at oracle.com>; build-dev <build-dev at openjdk.java.net>; Andrew Luo <andrewluotechnologies at outlook.com> Subject: Re: RFR: JDK-8215445: Enable building for Windows in WSL On 2018-12-20 13:47, Erik Joelsson wrote: Hello, Thanks to huge help from Andrew Luo, we now have a patch that adds support for building OpenJDK for Windows using WSL as the Unix layer instead of Cygwin. I have made some adjustments, mostly to keep it working in Cygwin. I have also run it through some testing, mostly to make sure there are no regressions to the current Cygwin support. This includes a COMPARE run which showed no regressions as well as comparing a WSL and Cygwin build, which showed no unexpected differences. I'm happy to see that on my Windows Workstation, the time to run "make bundles" is considerably faster in WSL, about 8m40s compared to 12m55s. That's really good news!
It should be noted that testing is still not fully supported. We will likely need to adjust some tests to work correctly in WSL and it's also possible that jtreg will also need adjustments. (For internal Oracle developers, Jib does not support WSL yet) Bug: https://bugs.openjdk.java.net/browse/JDK-8215445 Webrev: http://cr.openjdk.java.net/~erikj/8215445/webrev.02/index.html A few remarks: * In the documentation: (either by setting the individual +directory as case insensitive using fsutil This should probably read something like "all individual directories in the source code tree", since it is not enough to modify the top level directory (case sensitivity flag is not inherited). * In Images.gmk, I still believe the proper solution is to use FIXPATH, instead of EXESUFFIX. * In spec.gmk.in: + export WSLENV:=$(WSLENV):FIXPATHPATH:DEBUGFIXPATH Maybe we don't need DEBUGFIXPATH? Leftover from a debug session? * In toolchain.m4, I think this is a left-over from an older version before the path rewriting: + COMPILERVERSIONOUTPUT=
"$COMPILER" 2>&1 | $GREP -v_ _'ERROR.*UtilTranslatePathList' | <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>H</mi><mi>E</mi><mi>A</mi><mi>D</mi><mo>−</mo><mi>n</mi><mn>1</mn><mi mathvariant="normal">∣</mi></mrow><annotation encoding="application/x-tex">HEAD -n 1 | </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal" style="margin-right:0.08125em;">H</span><span class="mord mathnormal" style="margin-right:0.05764em;">E</span><span class="mord mathnormal">A</span><span class="mord mathnormal" style="margin-right:0.02778em;">D</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">n</span><span class="mord">1∣</span></span></span></span>TR -d '\r'
(and a similar at line ~1000). Apart from these minor issues, the patch looks great! Fantastic work, Andrew and Erik! /Magnus/Erik
- Previous message (by thread): RFR: JDK-8215445: Enable building for Windows in WSL
- Next message (by thread): RFR: JDK-8215445: Enable building for Windows in WSL
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]