RFR: 8335880: More troubleshooting tips around windows space in path

Chen Liang liach at openjdk.org
Tue Jul 16 20:59:55 UTC 2024


On Tue, 16 Jul 2024 20:46:44 GMT, SWinxy <duke at openjdk.org> wrote:

>> Context: https://mail.openjdk.org/pipermail/build-dev/2024-July/045586.html
>> 
>> People were confused on a few details around fixing windows space names, including:
>> 1. setshortname can report confusing error message when the directory is in use
>> 2. Many directories can have names set but only Microsoft Visual Studio and Windows Kits need them
>> 
>> Also adds some notes about `jdk` being the exploded image while `images/jdk` is the actual image.
>
> Does `configure` look for a particular short name for them to be? The documentation only says "Usually, it assumes those directories have short paths." The script didn't automatically detect the short paths for Microsoft Visual Studio nor Windows Kits unless manually specified in `--with-toolchain-path=`. I think mentioning that would be beneficial. Here's my attempt at a different copy, which includes even more detail:
> 
> The only directories required to have short paths are `Microsoft Visual Studio`
> (in `Program Files`) and `Windows Kits` (in `Program Files (x86)`); the rest of the
> "contains space" warnings from configure can be ignored. The directories'
> short paths can be set to, for example, `WINMVS~1` and `WINKIT~1`, respectively.
> Run `configure` with `--with-toolchain-path=/mnt/c/PROGRA~2/WINKIT~1/;
> /mnt/c/PROGRA~1/WINMVS~1`, or the short paths that you configured.
> (`PROGRA~1` is `Program Files`, and `PROGRA~2` is `Program Files (x86)`.)

@SWinxy I think configure first uses the explicit full path with spaces; it asks `cygpath` to convert the space path into the short form, as each directory can only have 1 short name. If you don't specify it, what's the error message? Like can't find VS in "well known locations"?

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

PR Comment: https://git.openjdk.org/jdk/pull/20197#issuecomment-2231815553


More information about the build-dev mailing list