On Mon, 4 Jul 2022 03:56:03 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:

> configure failed as following when I run it on WSL 1.
> 
> 
> checking for version string... 20-internal-adhoc.yasuenag.jdk
> configure: Found potential Boot JDK using configure arguments
> configure: The command for java_to_test, which resolves as 
> "/mnt/d/java/jdk-18/bin/java", can not be found.
> configure: error: Cannot locate /mnt/d/java/jdk-18/bin/java
> configure exiting with result code 1
> 
> 
> fixpath.sh would attempt to add ".exe" (e.g. "java" -> "java.exe") if 
> `wslpath -w" failed (returns non-zero value). However it returns zero even if 
> the path does not exist in recent WSL (v0.61.4 at least).
> 
> WSL v0.60.0.0
> 
> $ wslpath -w silver-bullet
> wslpath: silver-bullet: No such file or directory
> $ echo $?
> 1
> 
> 
> WSL v0.61.4.0
> 
> $ wslpath -w silver-bullet
> silver-bullet
> $ echo $?
> 0
> 
> 
> We should add ".exe" at the tail of path regardless of return value from 
> wslpath.

Configure has been working fine for WSL1 for many years now. Do you have any 
idea what is different in your environment?

The "fixpath" solution is a finicky thing, and any changes to it needs 
extensive testing on all supported windows environments. Ideally, I'd like to 
avoid any changes at all to it, since it's quite battle proven by now. 

Has WSL never worked for you? Did it stop working at a certain JDK version? Or 
after an upgrade of WSL/Windows?

Ah, sorry, now I understand what you are saying. Since `wslpath` has become 
more permissive in v0.61.4.0, we can't rely on it to complain if the path is 
missing `.exe`. Makes sense.

-------------

PR: https://git.openjdk.org/jdk/pull/9357

Reply via email to