JDK 9 and Kulla builds failing on OS X

Ben Evans benjamin.john.evans at gmail.com
Tue Aug 4 08:48:06 UTC 2015


Hi,

The current tip of jdk9/dev and kulla/dev appear to be broken on Mac 10.9.

Running make images gives ~61 errors, all of the form:

/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CMSBitMap.java:77:
error: reference to VirtualSpace is ambiguous
  public VirtualSpace virtualSpace() {
         ^
  both class sun.jvm.hotspot.runtime.VirtualSpace in
sun.jvm.hotspot.runtime and class sun.jvm.hotspot.memory.VirtualSpace
in sun.jvm.hotspot.memory match
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CompactibleFreeListSpace.java:38:
error: reference to CompactibleSpace is ambiguous
public class CompactibleFreeListSpace extends CompactibleSpace {
                                              ^
  both class sun.jvm.hotspot.memory.CompactibleSpace in
sun.jvm.hotspot.memory and class
sun.jvm.hotspot.gc.shared.CompactibleSpace in
sun.jvm.hotspot.gc.shared match
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/shared/Generation.java:184:
error: reference to VirtualSpace is ambiguous
  protected VirtualSpace virtualSpace() {
            ^
  both class sun.jvm.hotspot.runtime.VirtualSpace in
sun.jvm.hotspot.runtime and class sun.jvm.hotspot.memory.VirtualSpace
in sun.jvm.hotspot.memory match
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java:396:
error: reference to SpaceClosure is ambiguous
  private class LiveRegionsCollector implements SpaceClosure {
                                                ^
  both interface sun.jvm.hotspot.memory.SpaceClosure in
sun.jvm.hotspot.memory and interface
sun.jvm.hotspot.gc.shared.SpaceClosure in sun.jvm.hotspot.gc.shared
match
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java:401:
error: reference to Space is ambiguous
     public void doSpace(Space s) {
                         ^
  both class sun.jvm.hotspot.memory.Space in sun.jvm.hotspot.memory
and class sun.jvm.hotspot.gc.shared.Space in sun.jvm.hotspot.gc.shared
match
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java:208:
error: reference to Generation is ambiguous
   private void printGen(Generation gen) {
                         ^
  both class sun.jvm.hotspot.memory.Generation in
sun.jvm.hotspot.memory and class sun.jvm.hotspot.gc.shared.Generation
in sun.jvm.hotspot.gc.shared match

or:

/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CompactibleFreeListSpace.java:84:
error: cannot find symbol
                                 collectorField.getValue(addr));
                                                         ^
  symbol:   variable addr
  location: class CompactibleFreeListSpace
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CompactibleFreeListSpace.java:88:
error: cannot find symbol
     return capacity() - used0();
            ^
  symbol:   method capacity()
  location: class CompactibleFreeListSpace
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CompactibleFreeListSpace.java:92:
error: cannot find symbol
     return capacity() - free();
            ^
  symbol:   method capacity()
  location: class CompactibleFreeListSpace
/Users/boxcat/projects/openjdk/kulla/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms/CompactibleFreeListSpace.java:108:
error: cannot find symbol
      Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() );
                    ^
  symbol:   variable addr
  location: class CompactibleFreeListSpace

In my jdk9 repo, my current hg tip is:

$ hg tip
changeset:   1599:a74d1574da34
tag:         tip
user:        naoto
date:        Mon Aug 03 21:49:23 2015 -0700
summary:     8129881: JDK-8008577 breaks Nashorn test

This was from a clean build. I've also verified it by a completely
clean download and starting from scratch, and also used both 8u25 and
a build of JDK 9 mainline as the boot JDK. Same result in each case.

It looks as though it might be a clash of imports caused by overly
broad imports and some files changing internal packages.

For example, this change to CMSBitMap.java (in
hotspot/agent/src/share/classes/sun/jvm/hotspot/gc/cms) seems to
resolve the ambiguity for that one file:

$ diff -u CMSBitMap.java.dst CMSBitMap.java
--- CMSBitMap.java.dst    2015-07-07 14:52:20.000000000 +0100
+++ CMSBitMap.java    2015-07-07 15:02:23.000000000 +0100
@@ -27,8 +27,10 @@
 import java.io.*;
 import java.util.*;
 import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.memory.*;
-import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.memory.VirtualSpace;
+import sun.jvm.hotspot.runtime.VM;
+import sun.jvm.hotspot.runtime.VMObject;
+import sun.jvm.hotspot.runtime.VMObjectFactory;
 import sun.jvm.hotspot.types.*;
 import sun.jvm.hotspot.utilities.*;

$ make images > comp.out 2> comp.err
$ grep -n CMSBitMap comp.err

Any ideas? Happy to provide additional information as needed. Also,
somewhat concerned that binaries have been produced for JDK 9 betas,
which may indicate a fragility of the current build used to produce
betas.

Thanks,

Ben



More information about the build-dev mailing list