public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with converting a jar into a shared library with GCJ
@ 2009-06-23 13:22 David Michel
  0 siblings, 0 replies; only message in thread
From: David Michel @ 2009-06-23 13:22 UTC (permalink / raw)
  To: java

Hi all,

I'm trying to 'convert' a jar file into a shared library (.so file)
using gcj -shared -findirect-dispatch -fjni -fPIC with mixed
results... While it works very well for some cases, it doesn't work at
all sometimes.

For insance, for the jline project (), it works like a charm:

$ ls
jline-0.9.94.jar
$ gcj -O0 -g0  -shared -findirect-dispatch -fjni -fPIC -Bsymbolic
jline-0.9.94.jar -o libjline-0.9.94.so
$ ls
jline-0.9.94.jar  libjline-0.9.94.so


With the gnu getopt port for java
(http://www.urbanophile.com/arenn/coding/download.html), I get this
kind of error:

$ gcj -O0 -g0  -shared -findirect-dispatch -fjni -fPIC -Bsymbolic
java-getopt-1.0.13.jar -o libgetopt-1.0.13.so
GetoptDemo.java: In class 'GetoptDemo':
GetoptDemo.java: In method 'GetoptDemo.main(java.lang.String[])':
GetoptDemo.java:15: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

It also gives a similar error message when I try to do this with a
small java project that I wrote:

$ gcj -O0 -g0  -shared -findirect-dispatch -fjni -fPIC Consoleterm.jar
-o libconsoleterm.so
Consoleterm/Consoleterm.java: In class 'Consoleterm.Consoleterm':
Consoleterm/Consoleterm.java: In constructor '()':
Consoleterm/Consoleterm.java:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.


Any idea what the problem is ? I have no idea on how to tackle this....

Cheers,
David

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-23 13:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-23 13:22 Problem with converting a jar into a shared library with GCJ David Michel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).