On Sat, May 18, 2013 at 05:17:58PM +0200, Gerd Pokorra wrote: > Hello, > > how did you fix the build of NQP for the JVM? > > I have the same problem that you reported in an other email.
As I said in the e-mail: > Am Freitag, den 17.05.2013, 08:28 +0100 schrieb Nicholas Clark: > > So I can build Rakudo for the JVM no problem on a rather beefy server. > > When I tried it on a desktop with 2GB it fails: > > > > $ java > > -Xbootclasspath/a:.:/home/nick/Perl/rakudo/nqp/install/nqp-runtime.jar:/home/nick/Perl/rakudo/nqp/install/asm-4.1.jar:/home/nick/Perl/rakudo/nqp/install/jline-1.0.jar:rakudo-runtime.jar > > -cp /home/nick/Perl/rakudo/nqp/install perl6 --setting=NULL --optimize=3 > > --target=classfile --stagestats --output=CORE.setting.class > > src/gen/CORE.setting > > A bit of Googling reveals that the heap space can be altered with -Xmx, and > > it seems that I can get the current value like this: > > > > $ java -XshowSettings > > VM settings: > > Max. Heap Size (Estimated): 592.00M > > Ergonomics Machine Class: server > > Using VM: OpenJDK 64-Bit Server VM > > > > [snip lots more exciting information] > > > > > > So, boosting it to a gig works: > > > > $ java -Xmx1024m > > -Xbootclasspath/a:.:/home/nick/Perl/rakudo/nqp/install/nqp-runtime.jar:/home/nick/Perl/rakudo/nqp/install/asm-4.1.jar:/home/nick/Perl/rakudo/nqp/install/jline-1.0.jar:rakudo-runtime.jar > > -cp /home/nick/Perl/rakudo/nqp/install perl6 --setting=NULL --optimize=3 > > --target=classfile --stagestats --output=CORE.setting.class > > src/gen/CORE.setting ^^^^^^^^^ Manually re-running that command that failed, adding the -Xmx1024m flag to set the heap size to 1024 megabytes. I guess I could have edited the Makefile (or even the thing that generates the Makefile), but it was easiest to re-run that command by hand, then re-run make, which carried on from the next step needed. I don't know if -Xmx1024m is a sensible thing to commit. Particularly as it's probably the wrong number for a 32 bit system. Nicholas Clark