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:
 > > Marco Trudel writes:
 > >  > Andrew Haley wrote:
 > >  > > Marco Trudel writes:
 > >  > > 
 > >  > >  > I get this error while compiling the current GCJ trunk:
 > >  > >  > 
 > >  > >  > org/eclipse/jdt/core/compiler/CharOperation.java: In class 
 > >  > >  > 'org.eclipse.jdt.core.compiler.CharOperation':
 > >  > >  > org/eclipse/jdt/core/compiler/CharOperation.java: In method 
 > >  > >  > 'org.eclipse.jdt.core.compiler.CharOperation.<clinit>()':
 > >  > >  > org/eclipse/jdt/core/compiler/CharOperation.java:0: internal compiler 
 > >  > >  > error: Segmentation fault
 > >  > >  > 
 > >  > >  > This is a class from the ecj.jar I downloaded. Is that ecj.jar work in 
 > >  > >  > progress? Should I update it frequently? Does it work for others?
 > >  > >  > 
 > >  > >  > I configure with:
 > >  > >  > configure --prefix=/home/Marco/Desktop/compile-lin-lin/gcc-XYZXYZ-lin 
 > >  > >  > --build=`/usr/local/src/gcc/config.guess` --host=i686-pc-linux-gnu 
 > >  > >  > --target=i686-pc-linux-gnu --enable-languages=c,c++,java --enable-libgcj 
 > >  > >  > --with-gnu-as --with-gnu-ld --disable-nls --disable-debug 
 > >  > >  > --disable-shared --disable-checking --enable-threads=posix 
 > >  > >  > --disable-win32-registry 
 > >  > >  > --with-gmp=/home/Marco/Desktop/compile-lin-lin/gmp-out 
 > >  > >  > --with-mpfr=/home/Marco/Desktop/compile-lin-lin/mpfr-out
 > >  > > 
 > >  > > Please tell us exactly what command is being executed when you get
 > >  > > this error.
 > >  > 
 > >  > Sorry, I intended to minimize the output but of course I cut too much 
 > >  > away. Here you go with the whole one:
 > > 
 > > Something to do with --disable-shared, I suspect.  The build is
 > > statically compiling ecj1; dynamic builds don't do that, interpreting
 > > instead.
 > 
 > But this is intended this way and ok?

Yes.

 > > 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.  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.

Andrew.


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