On Fri, 8 Jan 2021 07:34:03 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:
>> I ran configure script on WSL 1, but it failed as below: >> >> $ bash configure --enable-debug --with-boot-jdk=/mnt/d/Java/jdk-15.0.1 >> >> : >> >> configure: Found potential Boot JDK using configure arguments >> configure: The command for java_to_test, which resolves as >> "/mnt/d/Java/jdk-15.0.1/bin/java", can not be found. >> configure: error: Cannot locate /mnt/d/Java/jdk-15.0.1/bin/java >> configure exiting with result code 1 >> >> `fixpath.sh` attempts to run `$PATHTOOL` with `.exe` if it fails with >> original path, but `.exe` would not be added even if `$path.exe` exists. > >> Sorry but how does this: >> >> winpath="$($PATHTOOL -w "$path.exe" 2>/dev/null)" >> >> not add the .exe extension? > > Yes, but `$path` is finally to use, not `$winpath`. > https://github.com/openjdk/jdk/blob/712014c5956cf74982531d212b03460843e4e5b6/make/scripts/fixpath.sh#L165-L166 > > > Sorry but how does this: > > > winpath="$($PATHTOOL -w "$path.exe" 2>/dev/null)" > > > not add the .exe extension? > > > > > > Yes, but `$path` is finally to use, not `$winpath`. > > https://github.com/openjdk/jdk/blob/712014c5956cf74982531d212b03460843e4e5b6/make/scripts/fixpath.sh#L165-L166 > > Exactly my point. Shouldn't this: > > # Make it lower case > path="$(echo "$path" | tr [:upper:] [:lower:])" > > be: > > # Make it lower case > path="$(echo "$winpath" | tr [:upper:] [:lower:])" > > ? No, `path` points unix path, on the other hand, `winpath` points windows path. For example: * path * /mnt/c/java/jdk-15.0.1/bin/java.exe * winpath * C:\Java\jdk-15.0.1\bin\java.exe However I think we can simplify this change based on `winpath`. How about new change? ------------- PR: https://git.openjdk.java.net/jdk/pull/1889