JDK-8236110 : Windows (MSVC 2013) build failures after JDK-8233299
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14,15
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-17
  • Updated: 2020-01-31
  • Resolved: 2019-12-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14 JDK 15
14 b29Fixed 15Fixed
Related Reports
Relates :  
Description
On older MSVC 2013, build fails with:

c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(76) : error C2059: syntax error : 'identifier'
c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(77) : error C2059: syntax error : 'identifier'
make[3]: *** [lib/CompileJvm.gmk:178: /cygdrive/c/cygwin64/home/windows/worker/jdkX-windows/build/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/ad_x86.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(76) : error C2059: syntax error : 'identifier'
c:\cygwin64\home\windows\worker\jdkX-windows\build\src\hotspot\share\gc/z/zMarkStack.hpp(77) : error C2059: syntax error : 'identifier'

It concerns ZCACHE_ALIGNED. Dropping ZCACHE_ALIGNED from those lines makes the build failed later:

Building target 'images' in configuration 'windows-x86_64-server-release'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(35) : error C2059: syntax error : '<L_TYPE_raw>'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(35) : error C2238: unexpected token(s) preceding ';'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(37) : error C2059: syntax error : '<L_TYPE_raw>'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(37) : error C2238: unexpected token(s) preceding ';'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(42) : error C2146: syntax error : missing ';' before identifier 'VirtualAlloc2'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(42) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(44) : error C2146: syntax error : missing ';' before identifier 'MapViewOfFile3'
c:\Work\jdk-jdk14\src\hotspot\os\windows\gc/z/zSyscall_windows.hpp(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

The obvious workaround is --with-jvm-features=-zgc, which is unfortunate.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk14/rev/ca3387704361 User: stefank Date: 2019-12-19 13:23:21 +0000
19-12-2019

RFR for turning off ZGC on older SDKs: https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2019-December/028202.html
18-12-2019

As you mention, you build with an older MSVC. The following lists what we in Oracle build with: https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms It doesn't explicitly list the platforms for JDK 14. I'll ask around regarding that. There has been some discussion whether we should automatically turn of ZGC when the windows binaries are compiled with older SDKs.
18-12-2019