Re: Building classpath with ecj

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Trevor Harmon wrote:
My understanding is that the latest release of classpath can be built using ecj. This is not working for me, however. My configure settings are:

--disable-dependency-tracking --disable-gtk-peer --disable-gconf-peer --disable-plugin --enable-jni --with-ecj-jar=<path to ecj.jar> --with-vm=java

But I get an error during build:

$ make
Making all in lib
true
top_builddir=.. top_srcdir=.. /bin/sh ./gen-classlist.sh standard
Adding java source files from srcdir '..'.
Adding java source files from VM directory ../vm/reference
ecj -warn:-deprecation,serial,unusedImport -J-Xmx768M -source 1.5 -target 1.5 -bootclasspath '' -classpath ../vm/reference:..:../external/w3c_dom:../external/sax:../external/relaxngDatatype:../external/jsr166:.:: -d . @classes
incorrect classpath:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:44)
    at java.lang.StringBuffer.<init>(StringBuffer.java:80)
    at java.io.StringWriter.<init>(StringWriter.java:33)
at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:475) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:430) at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:2697) at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1272)
    at org.eclipse.jdt.internal.compiler.batch.Main.main(Main.java:1016)
make[1]: *** [compile-classes] Error 1
make: *** [all-recursive] Error 1

This is with classpath 0.97.1, ecj 3.2.2, and Java 1.5.0_13 on Mac OS X 10.5.2.

I tried changing the memory option from "-J-Xmx768M" to "-J-Xmx2048M" but I still got the same error. Surely 2GB is a large enough ceiling for the build. And my machine has 4GB RAM, so I don't know why I'm running out of heap space. Any suggestions? Thanks,

Trevor



This problem is frequent when ecj is used together with CACAO or Sun's virtual machines that have the memory limit set. From the listing, your system seems configured to use the Sun's 1.5 jre to run the ecj compiler. This problem never occurs with default setup that uses gij, because gij has no such memory limitations but I am not sure if gij is available under Mac OS.

The ecj startup script does not respect the -J-X options. Check where is the script is with 'which ecj', then look into contents of that file. It is a text file in .sh format. The most straightforward way is to correct it manually, adding -J-Xmx768M at the place where the script invokes java virtual machine.

Good luck
Audrius





[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux