JDK-8206006 : Build failed on Windows
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 11
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-06-28
  • Updated: 2018-07-11
  • Resolved: 2018-06-28
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 11 JDK 12
11 b20Fixed 12Fixed
Related Reports
Relates :  
Description
Building slowdebug on Windows:

    jib > t:\workspace\open\src\hotspot\share\jfr/recorder/service/jfrEvent.hpp(87): error C2872: 'JfrTicks': ambiguous symbol
    jib > t:\workspace\open\src\hotspot\share\jfr/utilities/jfrTime.hpp(30): note: could be 'TimeInstant<CounterRepresentation,FastUnorderedElapsedCounterSource> JfrTicks'
    jib > t:/workspace/open/test/hotspot/gtest/jfr/test_networkUtilization.cpp(64): note: or       ''anonymous-namespace'::JfrTicks'
    jib > t:\workspace\open\src\hotspot\share\jfr/recorder/service/jfrEvent.hpp(81): note: while compiling class template member function 'void JfrEvent<EventZStatisticsSampler>::commit(void)'
    jib > t:\workspace\build\windows-x64-slowdebug\hotspot\variant-server\gensrc\jfrfiles/jfrEventClasses.hpp(10064): note: see reference to function template instantiation 'void JfrEvent<EventZStatisticsSampler>::commit(void)' being compiled
    jib > t:\workspace\build\windows-x64-slowdebug\hotspot\variant-server\gensrc\jfrfiles/jfrEventClasses.hpp(10018): note: see reference to class template instantiation 'JfrEvent<EventZStatisticsSampler>' being compiled
    jib > t:\workspace\open\src\hotspot\share\jfr/recorder/service/jfrEvent.hpp(89): error C2872: 'JfrTicks': ambiguous symbol
    jib > t:\workspace\open\src\hotspot\share\jfr/utilities/jfrTime.hpp(30): note: could be 'TimeInstant<CounterRepresentation,FastUnorderedElapsedCounterSource> JfrTicks'
    jib > t:/workspace/open/test/hotspot/gtest/jfr/test_networkUtilization.cpp(64): note: or       '`anonymous-namespace'::JfrTicks'
    jib > lib/CompileGtest.gmk:58: recipe for target '/cygdrive/t/workspace/build/windows-x64-slowdebug/hotspot/variant-server/libjvm/gtest/objs/test_networkUtilization.obj' failed


Comments
The issue appears when building without precompiled headers, a similar issue occurred in JDK-8199312 where I've written a bit more about what happens. Would still be interesting to know if it's a bug or undefined behaviour though. The typedefs are needed unfortunately, they are what makes the code under test pick up the MockFastUnorderedElapsedCounterSource instead of the real implementation. But I think renaming the typedefs and resorting to the macro definition should work in this case as well, running that through mach5 now.
28-06-2018

Yes, the fix needs to go into both JDK 11 and JDK 12 before we can promote jdk-11+20 and jdk-12+1 respectively. I would prefer if the change is pushed to jdk/jdk asap and then backported to jdk/jdk11 as soon as the forked repo is created.
28-06-2018

This might be a 2-phase name lookup bug in Visual Studio, though it seems strange that something like that would only appear in slowdebug. (Which might be that VS still doesn't implement 2-phase name lookup? That's a new feature in VS2017, but I think is off by default and requires a compiler switch to enable?) However, it looks easy to fix. The "mock" typedefs for JfrTicks and JfrTickspan in test_networkUtilization.cpp don't seem to be used for anything at all interesting, and I think could just be deleted.
28-06-2018

Since it is still a promotion_blocker, I'm assuming that you'll still want the fix in JDK12 and JDK11... Don't know exactly how you want to do that...
28-06-2018

I made it a P1 as I thought it would block the JDK 11 fork, but it's not, so lowering to P2.
28-06-2018