compilation problems with ecj.jar

Andrew Haley aph@redhat.com
Mon Jan 15 19:44:00 GMT 2007


Marco Trudel writes:
 > Andrew Haley wrote:
 > > [snip]
 > > 
 > > > > Nevertheless, this command does work for me, producing ecjx. It needs
 > > > > a lot of memory to compile, though. Perhaps you're running out of
 > > > > memory.
 > > > 
 > > > Yes, I think you're right. I tried a couple of times and sometimes got 
 > > > "virtual memory exhausted: Cannot allocate memory", even if I removed 
 > > > optimization. How much RAM do you have? I have 1gb RAM and 2gb swap. I'm 
 > > > somewhat surprised that that's not enough or at least not enough without 
 > > > optimization...
 > > 
 > > The compilation process peaks at about 1.5G of RAM on my system.
 > 
 > Strange, how can it then be that 3gb are not enough on mine?
I have no idea.
 > > This really only bites on --disable-shared builds. To fix this
 > > you can either split the compilation into parts or replace ecjx
 > > with a simple shell script that launches ecj.
 > 
 > The second one seems interesting. Can you explain that further? I have 
 > no background knowledge of ecj. I would assume that you mean this:
 > - Compile gcj without the ecj.jar in the source dir (works)
 > - Create a script that launches ecj.jar, name it ecj and put it into the 
 > dir of gcj
 > - gcj will call it automatically for .java source input
 > 
 > Is this more or less correct?
Yes. The script will be something as simple as
exec gij -classpath <wherever> org.eclipse.jdt.internal.compiler.batch.GCCMain $*
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /