[PATCH] Support for building using WSL (Windows Subsystem for Linux) on Windows (original) (raw)

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Fri Dec 14 19:16:16 UTC 2018


On 2018-12-14 20:05, Andrew Luo wrote:

Odd, it builds fine on my system. Did you sync down the code on Windows or WSL, and to a Windows or WSL directory? My code actually lives in Windows under /mnt/c/... And the build directory too, I presume..? It looked on Erik's path that it was Windows, d:\erik\jdk-wsl\build...

Can the Windows tools (e.g. cl.exe) even reach files in a WSL directory?

/Magnus

I believe there is a difference (regarding case sensitivity) depending on if you are on a Windows filesystem or a WSL filesystem. Thanks, -Andrew -----Original Message----- From: Erik Joelsson <erik.joelsson at oracle.com> Sent: Friday, December 14, 2018 10:42 AM To: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>; Andrew Luo <andrewluotechnologies at outlook.com> Cc: build-dev at openjdk.java.net Subject: Re: [PATCH] Support for building using WSL (Windows Subsystem for Linux) on Windows

On 2018-12-14 10:28, Magnus Ihse Bursie wrote:

On 2018-12-14 19:23, Erik Joelsson wrote: Hello,

I took your patch for a spin, and configure passes, but I get the same build error I got with my patch: fatal error C1083: Cannot open compiler intermediate file: 'd:\erik\jdk-wsl\build\windows-x8664-server-release\hotspot\variant-server\libjvm\objs\buildlibjvm.pch': No such file or directory This is repeated for every C++ file in Hotspot. I see two issues here. First of all, I need to figure out why the compiler will not find the file, which is clearly there. Second, why isn't this failure picked up by make? Somewhere the return value of cl.exe is disappearing. Can you build without errors if you disable PCH? Also, a wild guess: can it be related to file permissions? Can you read the file properly from both WSL and Windows? It is readable, but it could be something with case. The file is actually called BUILDLIBJVM.pch, but that is also how it's given to the compiler command line. Here is the output from DEBUGFIXPATH: Compiling adx86expand.cpp (for jvm.dll) fixpath input line >-wsl\build\windows-x8664-server-release\configure-support\bin\fixpath.exe -w /mnt/c/PROGRA2/MICROS1/2017/PROFES1/VC/Tools/MSVC/14161.270/bin/Hostx86/x64/cl.exe -showIncludes -Fp/mnt/d/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/libjvm/objs/BUILDLIBJVM.pch -Yuprecompiled.hpp -D_STDCFORMATMACROS -D_STDCLIMITMACROS -D_STDCCONSTANTMACROS -DNOMINMAX -DWIN32LEANANDMEAN -nologo -MD -MP -DWINDOWS -DWIN32 -DJNIIMPLEMENTATION -W3 -DVMLITTLEENDIAN -DLP64=1 -DPRODUCT -DTARGETARCHx86 -DINCLUDESUFFIXOS=windows -DINCLUDESUFFIXCPU=x86 -DINCLUDESUFFIXCOMPILER=visCPP -DTARGETCOMPILERvisCPP -DAMD64 "-DHOTSPOTLIBARCH="amd64"" -DCOMPILER1 -DCOMPILER2 -DINCLUDEZGC=0 -I/mnt/d/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/gensrc/adfiles -I/mnt/d/erik/jdk-wsl/closed/src/hotspot/share -I/mnt/d/erik/jdk-wsl/open/src/hotspot/share -I/mnt/d/erik/jdk-wsl/open/src/hotspot/os/windows -I/mnt/d/erik/jdk-wsl/open/src/hotspot/cpu/x86 -I/mnt/d/erik/jdk-wsl/open/src/hotspot/oscpu/windowsx86 -I/mnt/d/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/gensrc -I/mnt/d/erik/jdk-wsl/open/src/hotspot/share/precompiled -I/mnt/d/erik/jdk-wsl/open/src/hotspot/share/include -I/mnt/d/erik/jdk-wsl/open/src/hotspot/os/windows/include -I/mnt/d/erik/jdk-wsl/build/windows-x8664-server-release/support/modulesinclude/java.base -I/mnt/d/erik/jdk-wsl/build/windows-x8664-server-release/support/modulesinclude/java.base/win32 -I/mnt/d/erik/jdk-wsl/open/src/java.base/share/native/libjimage -Z7 -d2Zi+ -wd4800 -WX -I/mnt/c/PROGRA2/MICROS1/2017/PROFES1/VC/Tools/MSVC/14161.270/atlmfc/include -I/mnt/c/PROGRA2/MICROS1/2017/PROFES1/VC/Tools/MSVC/14161.270/include -I/mnt/c/PROGRA2/WI3CF21/10/Include/1001771.0/ucrt -I/mnt/c/PROGRA2/WI3CF21/10/Include/1001771.0/shared -I/mnt/c/PROGRA2/WI3CF21/10/Include/1001771.0/um -I/mnt/c/PROGRA2/WI3CF21/10/Include/1001771.0/winrt -I/mnt/c/PROGRA2/WI3CF21/10/Include/1001771.0/cppwinrt -O2 -Oy- "-DTHISFILE=""" -c -Fo/mnt/d/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/libjvm/objs/adx86expand.obj /mnt/d/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/gensrc/adfiles/adx86expand.cpp<_ _fixpath using wsl mode, with path list:_ _fixpath converted line_ _>c:/PROGRA2/MICROS1/2017/PROFES1/VC/Tools/MSVC/14161.270/bin/Hostx86/x64/cl.exe -showIncludes -Fpd:/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/libjvm/objs/BUILDLIBJVM.pch -Yuprecompiled.hpp -D_STDCFORMATMACROS -D_STDCLIMITMACROS -D_STDCCONSTANTMACROS -DNOMINMAX -DWIN32LEANANDMEAN -nologo -MD -MP -DWINDOWS -DWIN32 -DJNIIMPLEMENTATION -W3 -DVMLITTLEENDIAN -DLP64=1 -DPRODUCT -DTARGETARCHx86 -DINCLUDESUFFIXOS=windows -DINCLUDESUFFIXCPU=x86 -DINCLUDESUFFIXCOMPILER=visCPP -DTARGETCOMPILERvisCPP -DAMD64 "-DHOTSPOTLIBARCH="amd64"" -DCOMPILER1 -DCOMPILER2 -DINCLUDEZGC=0 -Id:/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/gensrc/adfiles -Id:/erik/jdk-wsl/closed/src/hotspot/share -Id:/erik/jdk-wsl/open/src/hotspot/share -Id:/erik/jdk-wsl/open/src/hotspot/os/windows -Id:/erik/jdk-wsl/open/src/hotspot/cpu/x86 -Id:/erik/jdk-wsl/open/src/hotspot/oscpu/windowsx86 -Id:/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/gensrc -Id:/erik/jdk-wsl/open/src/hotspot/share/precompiled -Id:/erik/jdk-wsl/open/src/hotspot/share/include -Id:/erik/jdk-wsl/open/src/hotspot/os/windows/include -Id:/erik/jdk-wsl/build/windows-x8664-server-release/support/modulesinclude/java.base -Id:/erik/jdk-wsl/build/windows-x8664-server-release/support/modulesinclude/java.base/win32 -Id:/erik/jdk-wsl/open/src/java.base/share/native/libjimage -Z7 -d2Zi+ -wd4800 -WX -Ic:/PROGRA2/MICROS1/2017/PROFES1/VC/Tools/MSVC/14161.270/atlmfc/include -Ic:/PROGRA2/MICROS1/2017/PROFES1/VC/Tools/MSVC/14161.270/include -Ic:/PROGRA2/WI3CF21/10/Include/1001771.0/ucrt -Ic:/PROGRA2/WI3CF21/10/Include/1001771.0/shared -Ic:/PROGRA2/WI3CF21/10/Include/1001771.0/um -Ic:/PROGRA2/WI3CF21/10/Include/1001771.0/winrt -Ic:/PROGRA2/WI3CF21/10/Include/1001771.0/cppwinrt -O2 -Oy- "-DTHISFILE=""" -c -Fod:/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/libjvm/objs/adx86expand.obj d:/erik/jdk-wsl/build/windows-x8664-server-release/hotspot/variant-server/gensrc/adfiles/adx86expand.cpp< An interesting note is that make is rebuilding the pch file on every invocation so it too has trouble finding the file. /Erik



More information about the build-dev mailing list