RFR: 8257679: Improved unix compatibility layer in Windows build (winenv) [v2]
Jorn Vernee
jvernee at openjdk.java.net
Thu Dec 3 22:24:54 UTC 2020
On Thu, 3 Dec 2020 21:11:19 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Missed my last bugfix for fixpath.sh...
>
> Overall this is very nice. Some comments and questions inline.
Hey,
Since I often work on Windows I'm taking this for a spin, but the current patch fails during `configure` for me with:
configure: Using default toolchain microsoft (Microsoft Visual Studio)
configure: Found Visual Studio installation at /cygdrive/j/progra~2/micros~1/2019/community/ using --with-tools-dir
configure: Found Microsoft Visual Studio 2019
configure: Trying to extract Visual Studio environment variables for x86_64
configure: using /cygdrive/j/progra~2/micros~1/2019/community//vc/auxiliary/build/vcvarsx86_amd64.bat
configure: Setting extracted environment variables for x86_64
fixpath: failure: Directory containing path 'usr\local\bin' does not exist
checking that Visual Studio variables have been correctly extracted... ok
checking for cl... [not found]
configure: error: Could not find a C compiler.
configure exiting with result code 1
I think this is because I have my VS installation in a non-default directory passed to `--with-tools-dir`. This is the configure command:
bash configure \
--with-conf-name=windows-release \
--with-boot-jdk='/cygdrive/c/Program Files/Java/jdk-15' \
--with-jtreg=/cygdrive/h/libs/jtreg-5.1-b01/ \
--with-tools-dir='J:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools' \
--with-toolchain-version=2019 \
--with-jmh=/cygdrive/h/libs/jmh
(Note that `--with-tools-dir` requires a Windows path for some reason, otherwise configure complains that the VS installation is not valid).
---
Cross-compiling to Linux with WSL works with:
bash configure \
--build=x86_64-unknown-linux-gnu \
--host=x86_64-unknown-linux-gnu \
--with-jtreg=/mnt/h/libs/jtreg-5.1-b01 \
--with-conf-name=linux-release \
--with-boot-jdk=/usr/lib/jvm/jdk-15 \
--with-jmh=/mnt/h/libs/jmh
But trying to configure for Windows on WSL with:
bash configure \
--with-conf-name=windows-release-wsl \
--with-boot-jdk='/mnt/c/Program Files/Java/jdk-15' \
--with-jtreg=/mnt/h/libs/jtreg-5.1-b01/ \
--with-tools-dir='J:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools' \
--with-toolchain-version=2019 \
--with-jmh=/mnt/h/libs/jmh
Fails with:
configure: Found potential Boot JDK using configure arguments
configure: Potential Boot JDK found at /mnt/c/Program Files/Java/jdk-15 is not a working JDK; ignoring
configure: Output from java -version was: /mnt/h/cygwin64/home/Jorn/cygwin-projects-new/git-jdk2/build/.configure-support/generated-configure.sh: line 56895: -version: command not found
configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK
configure exiting with result code 1
This is not a configuration I normally use though. Since I've had problems with WSL I usually use Cygwin, so the configure command might not be right (am I missing a target platform flag here? According to the build docs Windows is the default).
-------------
PR: https://git.openjdk.java.net/jdk/pull/1597
More information about the hotspot-compiler-dev
mailing list