Uploaded image for project: 'JikesRVM'
  1. JikesRVM
  2. RVM-864

Build failure using IBM Java 6 SDK as host JVM on linux-ia32

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.1.0, 3.0.1
    • Fix Version/s: 3.1.1
    • Component/s: Infrastructure: Build
    • Labels:
      None
    • Environment:

      Linux (IBM OC). Intel Box.

      Description

      I am trying to build jikes RVM, using the following command:
      ant -Dhost.name=x86_64-linux -Dconfig.name=development

      And it fails (for both jikes 3.0.1 and 3.1.0), using different versions of java.

      build-bootimage:
      [echo] Building bootimage. Output redirected to : /local/jikesrvm-3.0.1/target/development_x86_64-linux/BootImageWriterOutput.txt
      [echo] MMTk properties = /local/jikesrvm-3.0.1/build/mmtk/default.properties
      [java] BootImageWriter: compiler arg: O2
      [java] Java Result: 1
      [echo] BootImageWriter: starting up
      [echo] BootImageCompiler: init (opt compiler)
      [echo] BootImageWriter: loading
      [echo] java.lang.NoClassDefFoundError: java.util.Collections$2
      [echo] at org.jikesrvm.classloader.BootstrapClassLoader.loadVMClass(BootstrapClassLoader.java:133)
      [echo] at org.jikesrvm.classloader.TypeReference.resolveInternal(TypeReference.java:788)
      [echo] at org.jikesrvm.classloader.TypeReference.resolve(TypeReference.java:762)
      [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWriter.createBootImageObjects(BootImageWriter.java:1300)
      [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWriter.main(BootImageWriter.java:897)
      [echo] Caused by: java.lang.VerifyError: java.util.Collections$ReverseComparator
      [echo] at com.ibm.oti.vm.VM.findClassOrNull(Native Method)
      [echo] at com.ibm.oti.vm.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:62)
      [echo] at java.lang.Class.forNameImpl(Native Method)
      [echo] at java.lang.Class.forName(Class.java:169)
      [echo] at org.jikesrvm.classloader.RVMType.createClassForType(RVMType.java:565)
      [echo] at org.jikesrvm.classloader.RVMType.<init>(RVMType.java:259)
      [echo] at org.jikesrvm.classloader.RVMClass.<init>(RVMClass.java:1176)
      [echo] at org.jikesrvm.classloader.RVMClass.readClass(RVMClass.java:1545)
      [echo] at org.jikesrvm.classloader.RVMClassLoader.defineClassInternal(RVMClassLoader.java:336)
      [echo] at org.jikesrvm.classloader.BootstrapClassLoader.loadVMClass(BootstrapClassLoader.java:120)
      [echo] ... 4 more
      [echo] Exception in thread "main" java.lang.Error:
      [echo] BootImageWriter: /local/jikesrvm-3.0.1/target/development_x86_64-linux/Primordials.txt contains a class named "Ljava/util/Collections$2;", but we can't find a class with that name: java.lang.NoClassDefFoundError: java.util.Collections$2
      [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWriterMessages.fail(BootImageWriterMessages.java:26)
      [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWriter.createBootImageObjects(BootImageWriter.java:1303)
      [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWriter.main(BootImageWriter.java:897)

      BUILD FAILED
      /local/nvk/t/jikesrvm-3.0.1/build.xml:1418: The following error occurred while executing this line:
      /local/nvk/t/jikesrvm-3.0.1/build.xml:1427: Failed to write bootimage.

      Total time: 2 minutes 0 seconds
      --------------------------
      This must be something straight forward (I hope). Can someone point at what I am missing?

        Attachments

          Activity

          Hide
          nvkrishna77 N V Krishna added a comment -

          I got this working - by setting JAVA_HOME in /etc/ant.conf.

          Krishna.

          Show
          nvkrishna77 N V Krishna added a comment - I got this working - by setting JAVA_HOME in /etc/ant.conf. Krishna.
          Hide
          dgrove David Grove added a comment -

          You probably need to pick up this: http://jikesrvm.svn.sourceforge.net/viewvc/jikesrvm?view=rev&revision=15710

          If you apply that patch, then you can build using IBM Java 6. Without that patch, you have to use IBM Java 5 (or HotSpot).

          Show
          dgrove David Grove added a comment - You probably need to pick up this: http://jikesrvm.svn.sourceforge.net/viewvc/jikesrvm?view=rev&revision=15710 If you apply that patch, then you can build using IBM Java 6. Without that patch, you have to use IBM Java 5 (or HotSpot).
          Show
          dgrove David Grove added a comment - fixed by http://jikesrvm.svn.sourceforge.net/viewvc/jikesrvm?view=rev&revision=15710 .
          Hide
          dgrove David Grove added a comment -

          Hi David,

          I ran into the same error while compiling Jikes. Can you tell me where to apply the patch that you have saide in this thread. It is not clear.

          Show
          dgrove David Grove added a comment - Hi David, I ran into the same error while compiling Jikes. Can you tell me where to apply the patch that you have saide in this thread. It is not clear.
          Hide
          ebrangs Erik Brangs added a comment -

          To apply the changes do the following:

          1. Open the file Classpath-0.97.2.txt in the build/primordials directory in your Jikes RVM directory.
          2. Delete the line Ljava/util/Collections$2; and save.

          This should solve your problem.

          PS: The version of Jikes RVM that you're using seems to be quite old. If you encounter additional problems, you could try using a more recent version (e.g. 3.1.2 or the soon-to-be-released 3.1.3).

          Show
          ebrangs Erik Brangs added a comment - To apply the changes do the following: Open the file Classpath-0.97.2.txt in the build/primordials directory in your Jikes RVM directory. Delete the line Ljava/util/Collections$2; and save. This should solve your problem. PS: The version of Jikes RVM that you're using seems to be quite old. If you encounter additional problems, you could try using a more recent version (e.g. 3.1.2 or the soon-to-be-released 3.1.3).
          Hide
          dgrove David Grove added a comment -

          Thanks, I have tried with 3.1.2 and with the Classpath file changed also.
          However there is no luck yet, I get the following error.

          [echo] Building bootimage. Output redirected to : /home/govind/softwares/jikesrvm-3.1.2/target/production_x86_64-linux/BootImageWriterOutput.txt
          [echo] MMTk properties = /home/govind/softwares/jikesrvm-3.1.2/build/mmtk/default.properties
          [java] BootImageWriter: compiler arg: O2
          [java] Java Result: 101
          [echo] BootImageCompiler: init (opt compiler)
          [echo] Compiler failure during compilation of < BootstrapCL, Ljava/util/logging/LogManager; >.checkAccess ()V
          [echo] java.lang.NullPointerException
          [echo] at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:54)
          [echo] at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38)
          [echo] at java.lang.reflect.Field.get(Field.java:372)
          [echo] at org.jikesrvm.compilers.opt.StaticFieldReader.getObjectStaticFieldValue(StaticFieldReader.java:313)
          [echo] at org.jikesrvm.compilers.opt.StaticFieldReader.getStaticFieldValue(StaticFieldReader.java:185)
          [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateFrom(BC2IR.java:1607)
          [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:380)
          [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:178)
          [echo] at org.jikesrvm.compilers.opt.bc2ir.ConvertBCtoHIR.perform(ConvertBCtoHIR.java:36)
          [echo] at org.jikesrvm.compilers.opt.driver.CompilerPhase.performPhase(CompilerPhase.java:205)
          [echo] at org.jikesrvm.compilers.opt.driver.OptimizationPlanAtomicElement.perform(OptimizationPlanAtomicElement.java:88)
          [echo] at org.jikesrvm.compilers.opt.driver.OptimizationPlanCompositeElement.perform(OptimizationPlanCompositeElement.java:143)
          [echo] at org.jikesrvm.compilers.opt.driver.CompilationPlan.execute(CompilationPlan.java:131)
          [echo] at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.compile(OptimizingCompiler.java:169)
          [echo] at org.jikesrvm.compilers.opt.driver.OptimizingBootImageCompiler.compileMethod(OptimizingBootImageCompiler.java:119)
          [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:75)
          [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:80)
          [echo] at org.jikesrvm.classloader.NormalMethod.genCode(NormalMethod.java:180)
          [echo] at org.jikesrvm.classloader.RVMMethod.compile(RVMMethod.java:729)
          [echo] at org.jikesrvm.classloader.RVMMethod.getCurrentEntryCodeArray(RVMMethod.java:713)
          [echo] at org.jikesrvm.classloader.RVMClass.instantiate(RVMClass.java:1436)
          [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWorker.run(BootImageWorker.java:44)
          [echo] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          [echo] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          [echo] at java.lang.Thread.run(Thread.java:722)
          [echo] Error compiling method: < BootstrapCL, Ljava/util/logging/LogManager; >.checkAccess ()V
          [echo] org.jikesrvm.compilers.opt.OptimizingCompilerException: ERROR produced in module:Compiler
          [echo] failure during compilation of < BootstrapCL, Ljava/util/logging/LogManager; >.checkAccess ()V
          [echo]
          [echo] at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.fail(OptimizingCompiler.java:264)
          [echo] at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.compile(OptimizingCompiler.java:183)
          [echo] at org.jikesrvm.compilers.opt.driver.OptimizingBootImageCompiler.compileMethod(OptimizingBootImageCompiler.java:119)
          [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:75)
          [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:80)
          [echo] at org.jikesrvm.classloader.NormalMethod.genCode(NormalMethod.java:180)
          [echo] at org.jikesrvm.classloader.RVMMethod.compile(RVMMethod.java:729)
          [echo] at org.jikesrvm.classloader.RVMMethod.getCurrentEntryCodeArray(RVMMethod.java:713)
          [echo] at org.jikesrvm.classloader.RVMClass.instantiate(RVMClass.java:1436)
          [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWorker.run(BootImageWorker.java:44)
          [echo] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          [echo] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          [echo] at java.lang.Thread.run(Thread.java:722)

          BUILD FAILED
          /home/govind/softwares/jikesrvm-3.1.2/build.xml:1542: The following error occurred while executing this line:
          /home/govind/softwares/jikesrvm-3.1.2/build.xml:1551: Failed to write bootimage.

          Show
          dgrove David Grove added a comment - Thanks, I have tried with 3.1.2 and with the Classpath file changed also. However there is no luck yet, I get the following error. [echo] Building bootimage. Output redirected to : /home/govind/softwares/jikesrvm-3.1.2/target/production_x86_64-linux/BootImageWriterOutput.txt [echo] MMTk properties = /home/govind/softwares/jikesrvm-3.1.2/build/mmtk/default.properties [java] BootImageWriter: compiler arg: O2 [java] Java Result: 101 [echo] BootImageCompiler: init (opt compiler) [echo] Compiler failure during compilation of < BootstrapCL, Ljava/util/logging/LogManager; >.checkAccess ()V [echo] java.lang.NullPointerException [echo] at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:54) [echo] at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38) [echo] at java.lang.reflect.Field.get(Field.java:372) [echo] at org.jikesrvm.compilers.opt.StaticFieldReader.getObjectStaticFieldValue(StaticFieldReader.java:313) [echo] at org.jikesrvm.compilers.opt.StaticFieldReader.getStaticFieldValue(StaticFieldReader.java:185) [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateFrom(BC2IR.java:1607) [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:380) [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:178) [echo] at org.jikesrvm.compilers.opt.bc2ir.ConvertBCtoHIR.perform(ConvertBCtoHIR.java:36) [echo] at org.jikesrvm.compilers.opt.driver.CompilerPhase.performPhase(CompilerPhase.java:205) [echo] at org.jikesrvm.compilers.opt.driver.OptimizationPlanAtomicElement.perform(OptimizationPlanAtomicElement.java:88) [echo] at org.jikesrvm.compilers.opt.driver.OptimizationPlanCompositeElement.perform(OptimizationPlanCompositeElement.java:143) [echo] at org.jikesrvm.compilers.opt.driver.CompilationPlan.execute(CompilationPlan.java:131) [echo] at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.compile(OptimizingCompiler.java:169) [echo] at org.jikesrvm.compilers.opt.driver.OptimizingBootImageCompiler.compileMethod(OptimizingBootImageCompiler.java:119) [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:75) [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:80) [echo] at org.jikesrvm.classloader.NormalMethod.genCode(NormalMethod.java:180) [echo] at org.jikesrvm.classloader.RVMMethod.compile(RVMMethod.java:729) [echo] at org.jikesrvm.classloader.RVMMethod.getCurrentEntryCodeArray(RVMMethod.java:713) [echo] at org.jikesrvm.classloader.RVMClass.instantiate(RVMClass.java:1436) [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWorker.run(BootImageWorker.java:44) [echo] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [echo] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [echo] at java.lang.Thread.run(Thread.java:722) [echo] Error compiling method: < BootstrapCL, Ljava/util/logging/LogManager; >.checkAccess ()V [echo] org.jikesrvm.compilers.opt.OptimizingCompilerException: ERROR produced in module:Compiler [echo] failure during compilation of < BootstrapCL, Ljava/util/logging/LogManager; >.checkAccess ()V [echo] [echo] at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.fail(OptimizingCompiler.java:264) [echo] at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.compile(OptimizingCompiler.java:183) [echo] at org.jikesrvm.compilers.opt.driver.OptimizingBootImageCompiler.compileMethod(OptimizingBootImageCompiler.java:119) [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:75) [echo] at org.jikesrvm.compilers.common.BootImageCompiler.compile(BootImageCompiler.java:80) [echo] at org.jikesrvm.classloader.NormalMethod.genCode(NormalMethod.java:180) [echo] at org.jikesrvm.classloader.RVMMethod.compile(RVMMethod.java:729) [echo] at org.jikesrvm.classloader.RVMMethod.getCurrentEntryCodeArray(RVMMethod.java:713) [echo] at org.jikesrvm.classloader.RVMClass.instantiate(RVMClass.java:1436) [echo] at org.jikesrvm.tools.bootImageWriter.BootImageWorker.run(BootImageWorker.java:44) [echo] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [echo] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [echo] at java.lang.Thread.run(Thread.java:722) BUILD FAILED /home/govind/softwares/jikesrvm-3.1.2/build.xml:1542: The following error occurred while executing this line: /home/govind/softwares/jikesrvm-3.1.2/build.xml:1551: Failed to write bootimage.
          Hide
          ebrangs Erik Brangs added a comment -

          Are you using an IBM VM to build Jikes RVM?

          The error that you just posted looks like RVM-1004 (which is fixed in the next release, i.e. 3.1.3). You can pick up a patch for 3.1.2 at http://old.nabble.com/Re%3A--rvm-research--Build-problem%3A-NPE-during-bootimage-writing-when-opt-compiling-LogManager.checkAccess-p34655321.html .

          Show
          ebrangs Erik Brangs added a comment - Are you using an IBM VM to build Jikes RVM? The error that you just posted looks like RVM-1004 (which is fixed in the next release, i.e. 3.1.3). You can pick up a patch for 3.1.2 at http://old.nabble.com/Re%3A--rvm-research--Build-problem%3A-NPE-during-bootimage-writing-when-opt-compiling-LogManager.checkAccess-p34655321.html .

            People

            • Assignee:
              dgrove David Grove
              Reporter:
              nvkrishna77 N V Krishna
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: