Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2001 21:58:00 +0100 (CET)
From:      Hans Lambermont <hans@blender.nl>
To:        freebsd-java@FreeBSD.ORG
Subject:   RE: JNI, -pthread vs -lc_r
Message-ID:  <200112232058.VAA10405@www.blender.nl>

next in thread | raw e-mail | index | archive | help
Joe wrote:
> Hans Lambermont writes:
>  > Linking a JNI .so with only -pthread seems insufficient. I get:
>  >     Exception in thread "main" java.lang.UnsatisfiedLinkError:
>  >     libblenderssr.so:
>  >     /usr/X11R6/lib/libGL.so.1: Undefined symbol "pthread_getspecific"
> 
> What exactly do you mean by "linking a JNI .so"?  Are you trying to
> produce a .so file or are you trying to produce an executable image?
> Are you using an existing .so produced by the port or are you trying to
> create your own?  It makes a huge difference in the answer.

Sorry that I was not clear. I created my own .so file and access
it from java by using the JNI.

When not using java, running the program (with the c main() still present)
the program runs fine (linking with -pthread).

When creating the shared object however (and removing the c main() function),
-pthread is not enough at runtime. -lc_r is also required.

My question is 'why is this ?'.

-- 
Hans

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112232058.VAA10405>