public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* undefined symbol __gcj_personality_v0
@ 2010-04-12 17:08 Keith
  2010-04-12 17:31 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Keith @ 2010-04-12 17:08 UTC (permalink / raw)
  To: java

The Windows version compiles but does not do anything when I run it. No 
error messages show up and nothing is logged and no window appears. main 
starts out with

  public static void main(String[] args) throws Exception
  {
    Display display = null;
   
    System.out.println("Starting main");

but I do not see any message. I do see the message under Eclipse and the 
other AOT compiler.

I am at a loss for what to do next so I am creating a linux->Windows 
cross compile for my java/jni program, I am first trying to get a good 
working compile under linux.

When I run the program under Eclipse I get:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/keith/jprojects/pps/build/libunikey.so:
/home/keith/jprojects/pps/build/libunikey.so: undefined symbol:
__gcj_personality_v0
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)

unikey.so is a library compiled with
gcc 4.4.3 (just downloaded and compiled) on linux

Reading specs from /usr/lib/gcc/i486-slackware-linux/4.3.3/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.3.3/configure --prefix=/usr --libdir=/usr/lib
--enable-shared --enable-bootstrap
--enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix
--enable-checking=release --with-system-zlib
--disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp
--with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux
--build=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.3.3 (GCC)

Linux linux1 2.6.30.5 #1 SMP PREEMPT Fri Aug 21 11:41:31 EDT 2009 i686
Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz GenuineIntel GNU/Linux

Compile line is:

gcc -ldl -fPIC -rdynamic
-Wl,--version-script=/usr/local/src/gcc-4.4.3/libjava/libgcj.ver -fPIC
-L/usr/local/lib -I/usr/local/include
-I/usr/local/bin/jdk1.6.0_19/include
-I/usr/local/bin/jdk1.6.0_19/include/linux -I. -c unikey.cpp -o unikey.o

 gcc -ldl -fPIC -rdynamic
-Wl,--version-script=/usr/local/src/gcc-4.4.3/libjava/libgcj.ver -shared
-Wl,-soname,libunikey.so -o libunikey.so unikey.o

Whether -rdynamic and/or -Wl,--version-script is there seems to make no
difference.

I am running the program under Eclipse SDK Version 3.5.2 Build id: 
M20100211-1343 (just downloaded)
and java 1.6.0_19 (just downloaded)

Do I need to recompile something or alter a parameter?




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: undefined symbol __gcj_personality_v0
  2010-04-12 17:08 undefined symbol __gcj_personality_v0 Keith
@ 2010-04-12 17:31 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2010-04-12 17:31 UTC (permalink / raw)
  To: Keith; +Cc: java

On 04/12/2010 06:08 PM, Keith wrote:
> The Windows version compiles but does not do anything when I run it. No
> error messages show up and nothing is logged and no window appears. main
> starts out with
> 
>  public static void main(String[] args) throws Exception
>  {
>    Display display = null;
>      System.out.println("Starting main");
> 
> but I do not see any message. I do see the message under Eclipse and the
> other AOT compiler.
> 
> I am at a loss for what to do next so I am creating a linux->Windows
> cross compile for my java/jni program, I am first trying to get a good
> working compile under linux.

Hard to say what is the cause, but there is no way you're going to get
much further without using gdb.

Did you run the libgcj test suite?

Andrew.


> When I run the program under Eclipse I get:
> 
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> /home/keith/jprojects/pps/build/libunikey.so:
> /home/keith/jprojects/pps/build/libunikey.so: undefined symbol:
> __gcj_personality_v0
>    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> 
> unikey.so is a library compiled with
> gcc 4.4.3 (just downloaded and compiled) on linux
> 
> Reading specs from /usr/lib/gcc/i486-slackware-linux/4.3.3/specs
> Target: i486-slackware-linux
> Configured with: ../gcc-4.3.3/configure --prefix=/usr --libdir=/usr/lib
> --enable-shared --enable-bootstrap
> --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix
> --enable-checking=release --with-system-zlib
> --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp
> --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux
> --build=i486-slackware-linux --host=i486-slackware-linux
> Thread model: posix
> gcc version 4.3.3 (GCC)
> 
> Linux linux1 2.6.30.5 #1 SMP PREEMPT Fri Aug 21 11:41:31 EDT 2009 i686
> Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz GenuineIntel GNU/Linux
> 
> Compile line is:
> 
> gcc -ldl -fPIC -rdynamic
> -Wl,--version-script=/usr/local/src/gcc-4.4.3/libjava/libgcj.ver -fPIC
> -L/usr/local/lib -I/usr/local/include
> -I/usr/local/bin/jdk1.6.0_19/include
> -I/usr/local/bin/jdk1.6.0_19/include/linux -I. -c unikey.cpp -o unikey.o
> 
> gcc -ldl -fPIC -rdynamic
> -Wl,--version-script=/usr/local/src/gcc-4.4.3/libjava/libgcj.ver -shared
> -Wl,-soname,libunikey.so -o libunikey.so unikey.o
> 
> Whether -rdynamic and/or -Wl,--version-script is there seems to make no
> difference.
> 
> I am running the program under Eclipse SDK Version 3.5.2 Build id:
> M20100211-1343 (just downloaded)
> and java 1.6.0_19 (just downloaded)
> 
> Do I need to recompile something or alter a parameter?
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-12 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-12 17:08 undefined symbol __gcj_personality_v0 Keith
2010-04-12 17:31 ` Andrew Haley

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