Hi,

My 32bit builds on Windows were failing since quite a while and I
finally had some minutes to look into that.

See prior discussion here:
http://mail.openjdk.java.net/pipermail/build-dev/2018-March/021150.html

My output used to look like this:

checking if fixpath.exe works... yes
POSSIBLE_MSVC_DLL /cygdrive/c/Program
POSSIBLE_MSVC_DLL Files
POSSIBLE_MSVC_DLL (x86)/Microsoft
POSSIBLE_MSVC_DLL Visual
POSSIBLE_MSVC_DLL Studio
POSSIBLE_MSVC_DLL 12.0/VC/redist/x64/Microsoft.VC120.CRT/msvcr120.dll
configure: Found msvcr120.dll at
/cygdrive/c/Windows/system32/msvcr120.dll using well-known location in
SYSTEMROOT

So basically, build does not correctly search for msvcr120.dll in
"/cygdrive/c/Program Files (x86)/Microsoft Visual Studio
12.0/VC/redist/x86/Microsoft.VC120.CRT/msvcr120.dll" - instead, it
fails and falls back to the system default
"/cygdrive/c/Windows/system32/msvcr120.dll". That dll is a 64bit dll,
and so configure fails.

Note that 64bit build shows exactly the same behaviour! Only there it
works by accident, since the default
/cygdrive/c/Windows/system32/msvcr120.dll it finds happens to be a
64bit library too, so configure succeeds.

Part of the problem is TOOLCHAIN_SETUP_MSVC_DLL in
toolchain_windows.m4. We use a bash for loop to iterate thru a list of
one or more files, but that for expression should be quoted.

If I make this fix:

--- a/make/autoconf/toolchain_windows.m4        Mon Apr 23 18:04:17 2018 -0700
+++ b/make/autoconf/toolchain_windows.m4        Wed May 02 18:38:04 2018 +0200
@@ -556,7 +556,7 @@
         fi
       fi
       # In case any of the above finds more than one file, loop over them.
-      for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
+      for possible_msvc_dll in "$POSSIBLE_MSVC_DLL"; do
         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
         TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
             [well-known location in VCINSTALLDIR])


the 32bit configure correctly sets the msvcrt dll:

POSSIBLE_MSVC_DLL /cygdrive/c/Program Files (x86)/Microsoft Visual
Studio 12.0/VC/redist/x86/Microsoft.VC120.CRT/msvcr120.dll
configure: Found msvcr120.dll at /cygdrive/c/Program Files
(x86)/Microsoft Visual Studio
12.0/VC/redist/x86/Microsoft.VC120.CRT/msvcr120.dll using well-known
location in VCINSTALLDIR
checking found msvcr120.dll architecture... ok

and I can start the build, but I get follow up errors:

...
Creating hotspot/variant-server/tools/adlc/adlc.exe from 13 file(s)
Compiling 2 files for BUILD_JVMTI_TOOLS
make[3]: *** No rule to make target '/cygdrive/c/Program', needed by
'/cygdrive/c/mine/projects/openjdk/jdk-jdk/output-fastdebug-32/support/modules_libs/java.base/Program'.
Stop.
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [make/Main.gmk:165: java.base-copy] Error 2
make[2]: *** Waiting for unfinished jobs....

I stopped looking at that point, but to me it looks like the build
cannot survive msvcrt.dll locations with spaces in them.

Kind Regards, Thomas

Reply via email to