RFR: 8355697: Create windows devkit on wsl and msys2 [v2]

Frederic Thevenet fthevenet at openjdk.org
Mon Apr 28 16:21:49 UTC 2025


On Mon, 28 Apr 2025 13:34:29 GMT, kuaiwei <duke at openjdk.org> wrote:

>> The patch fix error when creating devkit on wsl/msys2 .
>> * Msys2 can be supported like cygwin
>> * In wsl, it can not test path name in windows format, like `if [ -d "d:/VisualStuio"]` . The path must be converted as linux style before testing.
>> * In msys2, `cmd.exe /c` doesn't work because "/c" is converted as "c:", it can be work around with `cmd.exe //c`. see https://superuser.com/questions/526736/how-to-run-internal-cmd-command-from-the-msys-shell
>> 
>> I tested it with win10 + wsl/msys2 + VisualStudio 2022(17.13.6)
>
> kuaiwei has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Get SDK_INSTALL_DIR from enviroment variable

**Please note that this is not a formal review, as I am not an OpenJDK reviewer.**

`createWindowsDevkit.sh` will fail to run when MSYS2 is started under any other environment[1] other than "MSYS" (i.e. `MINGW64`, `UCRT64`, `CLANG64`, etc...), because for all other env, `uname -r` will return `MINGW64_NT-10.0-26100` instead of `MSYS_NT-10.0-26100` which throws off the cygwin/msys2/wsl detection.

Is this deliberate, so as to ensure only the MSYS environment is supported for this feature, or an oversight?

Cheers!

[1] https://www.msys2.org/docs/environments/

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

PR Comment: https://git.openjdk.org/jdk/pull/24916#issuecomment-2835796879


More information about the build-dev mailing list