1 msggcc-4.2-20080116 is now available
1 msgA Toast My Love
21 msgpowercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os c...
2 msgSegmented Register file Implementation
1 msgThe Dance of Love
1 msgOur Love Will Last
1 msgNew ICE on gcc.dg/pr34233.c for MIPS...
1 msggcc-4.1-20080114 is now available
2 msgSimple language project...
8 msgRant and proposal about bitfield semantics in o...
1 msgStack based / zero operand CPU - ZPU
1 msgLargest supplier of P i a n M e d s
1 msgListing of radiologists and 34 more specialties
1 msgdynamic attribute

jc1 out of memory error gcc 4.2.2 Linux 64-bit OS
\ Harpal Grover (13 Jan 2008)
. \ Andrew Haley (14 Jan 2008)
. . \ Harpal Grover (15 Jan 2008)
. . . \ Andrew Haley (15 Jan 2008)
. \ Harpal Grover (17 Jan 2008)

11 msgHow to stop gcc from not calling noinline funct...
1 msggcc-4.3-20080111 is now available
1 msgalo
4 msgIs it possible to import a gimple file into gcc...
1 msgIs it possible to import a gimple file into gcc...
Subject:Re: jc1 out of memory error gcc 4.2.2 Linux 64-bit OS
Group:Gcc
From:Harpal Grover
Date:17 Jan 2008


> > I am trying to compile a java app. I don't have the script in front of
> > me that i am using because I am at a client's office right now. The
> > jist of
> > the command line is as follows:
> >
> > gcj -O -fjni -s -main=main.App --classpath=x1.jar x2.jar x3.jar x4.jar
> > x5.jar x6.jar x7.jar x8.jar -o scln.exe class1.java class2.java
> > class3.java ... class125.java -ly -ldz
>
> This is very likely to cause out of memory errors. This will probably
> work better:
>
> gcj -c -O -fjni --classpath=x1.jar x2.jar
> gcj -c -O -fjni --classpath=x1.jar x3.jar
> gcj -c -O -fjni --classpath=x1.jar x4.jar
>
> And link them all together at the end.


Thanks to everyone for their kind help and advice. I tried Andrew's
advice out as noted above, and it worked! I was finally able to
generate a windows executable on 64 bit processors . On another note,
I had to process all my classes as class files and not as java files
for this to work. There is one last issue, of which I have a feeling
may not be a big issue. When I double click on my executable, I get
the following stacktrace printed out to a command prompt window:

Exception in thread "main" java.lang.NoClassDefFoundError: main.App
at java.lang.Class.initializeClass(/datal/gcc/gcc/gcc/libgcc2.c:0)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Listener no
t found in gnu.gcj.runtime.SystemClassLoader{urls=[file:.\], parent=gnu.gcj.runt
ime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(/datal/gcc/gcc/libjava/java/net/URLClass
Loader.java:1080)
at java.lang.ClassLoader.loadClass(/datal/gcc/gcc/libjava/java/lang/ClassLoad
er.java:351)
at java.lang.ClassLoader.loadClass(/datal/gcc/gcc/libjava/java/lang/ClassLoad
er.java:295)
at java.lang.VMClassLoader.defineClass(/datal/gcc/gcc/libjava/classpath/java/
io/Writer.java:187)
at java.lang.ClassLoader.defineClass(/datal/gcc/gcc/libjava/java/lang/ClassLo
ader.java:483)
at java.security.SecureClassLoader.defineClass(/datal/gcc/gcc/libjava/classpa
th/java/security/SecureClassLoader.java:108)
at java.net.URLClassLoader.findClass(/datal/gcc/gcc/libjava/java/net/URLClass
Loader.java:1171)
at java.lang.ClassLoader.loadClass(/datal/gcc/gcc/libjava/java/lang/ClassLoad
er.java:351)
at java.lang.ClassLoader.loadClass(/datal/gcc/gcc/libjava/java/lang/ClassLoad
er.java:295)
at java.lang.Class.initializeClass(/datal/gcc/gcc/gcc/libgcc2.c:0)

It looks like it is not able to find or load the swt library i use for
my app. I have compiled, and linked the swt jar to the executable, and
the corresponding swt dll is in the same directory where my executable
is located. The following line below is used to generate my
executable:

gcj -O -fjni -findirect-dispatch "--classpath=
C:/lib/x1.jar;C:/lib/x2.jar" --main=main.App -o scnlm.exe y1.class
y2.class -LC:/projects/java/TSCN/Desktop/3232 -lswt -lswt-win32-3232

Note all of the jars have been compiled into libswt, including swt.jar

--
Harpal Grover
President
Harpal Grover Consulting Inc


© 2004-2008 readlist.com