Out of memory error during build

Hi,

I checked out the latest version out of svn today and I get a out of memory error during build (see below). I increased the memory but it still gives the error. Anyone else have this problem? This is on 64 bit linux suse. Javac is 1.6.0., could that be a problem?

This is the startup line in build.sh at the moment, I think that should be enough memory:

java -XX:MaxPermSize=512m -Xmx2g -Xms128m -jar $dir/core/lib/ant-launcher.jar -lib $JAVA_HOME/lib -lib $dir/core/lib -f $dir/all/build.xml $*

Thanks for any help!

Rien

Out of memory error:

rnentjes@linux:~/programming/jnode> ./build.sh x86_64
Buildfile: ./all/build.xml

prepare:

assemble-projects:

prepare:

compile:
[jnode.compile] Compiling 7825 source files to /home/rnentjes/programming/jnode/core/build/classes

[jnode.compile] The system is out of resources.
[jnode.compile] Consult the following stack trace for details.
[jnode.compile] java.lang.OutOfMemoryError: Java heap space
[jnode.compile] at com.sun.tools.javac.code.Scope$ImportScope.makeEntry(Scope.java:385)
[jnode.compile] at com.sun.tools.javac.code.Scope.enter(Scope.java:196)
[jnode.compile] at com.sun.tools.javac.comp.MemberEnter$2.importFrom(MemberEnter.java:198)
[jnode.compile] at com.sun.tools.javac.comp.MemberEnter$2.enterAnnotation(MemberEnter.java:203)
[jnode.compile] at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:95)
[jnode.compile] at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:87)
[jnode.compile] at com.sun.tools.javac.comp.Enter.complete(Enter.java:472)
[jnode.compile] at com.sun.tools.javac.comp.Enter.main(Enter.java:429)
[jnode.compile] at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819)
[jnode.compile] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
[jnode.compile] at com.sun.tools.javac.main.Main.compile(Main.java:353)
[jnode.compile] at com.sun.tools.javac.main.Main.compile(Main.java:279)
[jnode.compile] at com.sun.tools.javac.main.Main.compile(Main.java:270)
[jnode.compile] at com.sun.tools.javac.Main.compile(Main.java:69)
[jnode.compile] at com.sun.tools.javac.Main.main(Main.java:54)

I had the same problem

I had the same problem recently : I think it's due to the integration of openjdk (a work in progress) which make JNode build consume more memory.

Like you, I also first tried to modify build.sh but it's only changing the memory given to ant itself but not for the javac task since it's done in another vm.
In JNode, to modify the memory given to javac task, you have to change the file all/lib/jnode.xml :
- in the file, search for string "jnode.compile"
- inside the tag, modify "memoryMaximumSize" attribute (it's only usefull if "fork" attribute is "on", otherwise modifying build.sh is enough)

Fabien

my blog (in english and french)

I'm bouncing off this at the

I'm bouncing off this at the moment with the current trunk build.sh and all/lib/jnode.xml

The build failed with heap out of memory at xmx/xms 1024m and memoryMaximumSize="1024m" during core module compile.

With all at 1536m the build fails at:
/JNode/all/build-x86.xml:155: java.io.IOException: Cannot run program "nasm": java.io.IOException: error=12, Cannot allocate memory

With sun java 1.6.06 & ubuntu 8 x64
Does this seem right? >1.5Gb to build?

64bit needs more Ram

Hi Brett,

I need >=1,5GB Ram to build, too. This is a 64bit "problem" as the jvm needs more Ram than in 32bit mode.

Oops, installing nasm

Oops, installing nasm helped.

I can build, but atm it takes >1024m set in /JNode/all/build-x86.xml

That did it

Thx!