On Tue, 31 Mar 2026 22:27:00 GMT, Ashay Rane <[email protected]> wrote:

> Prior to this patch, both the build and the tests included several
> references to C:/.  References in the build assumed that Windows is
> installed on C:/, which causes the build to fail when Windows is
> installed on a different drive.  The references among tests assumed that
> the C:/ drive exists, which although mostly correct, is not guaranteed,
> making the tests fragile.
> 
> This patch fixes the build references to use the `SYSTEMROOT`
> environment variable, which points to the Windows installation path,
> instead of hardcoded references to C:/Windows.  This patch also updates
> tests to not use the presence of C:/ to detect Windows (instead relying
> on the output of `uname -s`) and to not assume that every Windows
> installation has a C:/.

Your change breaks the build experience on WSL.

It seems to be caused by the change on fixpath.sh and basic_tools.m4. On WSL, 
`uname -s` returns `Linux`, and sysroot should be started with `/mnt/<drive 
letter>`.

I saw following messages in config.log. It reports cl.exe could not found 
kernel32.lib.
(my PC is Japanese locale, sorry :) )

configure:109484: 
/mnt/d/github-forked/jdk/build/windows-x86_64-server-fastdebug/fixpath exec 
/mnt/c/p
rogra~1/micros~1/18/community/vc/tools/msvc/14.50.35717/bin/hostx64/x64/cl.exe  
 -I/mnt/c/progra~1/mic
ros~1/18/community/vc/tools/msvc/14.50.35717/include 
-I/mnt/c/progra~1/micros~1/18/community/vc/tools/
msvc/14.50.35717/atlmfc/include 
-I/mnt/c/progra~1/micros~1/18/community/vc/auxiliary/vs/include -I. -I
. -I. -I. -I. -I.   
-I/mnt/c/progra~1/micros~1/18/community/vc/tools/msvc/14.50.35717/include 
-I/mnt/c
/progra~1/micros~1/18/community/vc/tools/msvc/14.50.35717/atlmfc/include 
-I/mnt/c/progra~1/micros~1/18
/community/vc/auxiliary/vs/include -I. -I. -I. -I. -I. -I.  conftest.c  -link   
-libpath:/mnt/c/progra
~1/micros~1/18/community/vc/tools/msvc/14.50.35717/atlmfc/lib/x64 
-libpath:/mnt/c/progra~1/micros~1/18
/community/vc/tools/msvc/14.50.35717/lib/x64 -libpath:. -libpath:. -libpath:.  
>&5
conftest.c
Microsoft (R) Incremental Linker Version 14.50.35725.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:conftest.exe
-libpath:c:\progra~1\micros~1\18\community\vc\tools\msvc\14.50.35717\atlmfc\lib\x64
-libpath:c:\progra~1\micros~1\18\community\vc\tools\msvc\14.50.35717\lib\x64
-libpath:.
-libpath:.
-libpath:.
conftest.obj
LINK : fatal error LNK1104: ファイル 'kernel32.lib' を開くことができません。

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

Changes requested by ysuenaga (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/30523#pullrequestreview-4047796514

Reply via email to