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:
 > Marco Trudel wrote:
 > > 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?
 > > 
 > > [snip]
 > > 
 > > PS: I'll try to compile a static GCJ with ecj.jar on a machine with 10gb 
 > > swap. I'll report if that works...
 > 
 > So, I tried the compilation on another machine with the mentioned 10gb 
 > swap. The same command also fails but with a different message:
 > 
 > gcj: Internal error: Segmenation fault (program jc1)

OK.  Run the compilation in gdb and see where the SEGV happens.

 > It still has over 8gb free RAM. I then run that failing command with a 
 > gcj from a complete compilation (one I built without ecj.jar) and it 
 > works without a problem. So it seems that for static compilation, the 
 > generated gcj is not yet ready for compiling ecj.jar or is missing some 
 > arguments. That would also explain why you can compile it manually.

I used the generated gcj.  Worked for me.

 > Shall I fill in a bugreport? I assume this is not highest priority ;-)

You can, but realistically speaking it'll be me that fixes it, and if
I can't duplicate the problem I can't fix it.

 > BTW,l there are more problems with compiling ecj.jar for 
 > cross-compiling. Creating a host-linux, target-windows GCJ will create a 
 > ecj.exe what is definitely the wrong thing to do.

It's the right thing to do.  You have to build the ecj.exe for
GNU/Linux as a separate step when building the GNU/Linux native
compiler.  If you don't want ecj.exe for the target, don't include
ecj.jar in the build tree.

Andrew.


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