This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compilation problems with ecj.jar


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]