Date: Mon, 24 Dec 2001 11:54:48 +0000 From: Rasputin <rasputin@submonkey.net> To: Hans Lambermont <hans@blender.nl> Cc: java@freebsd.org Subject: Re: JNI, -pthread vs -lc_r Message-ID: <20011224115448.A7117@shikima.mine.nu> In-Reply-To: <200112232058.VAA10405@www.blender.nl>; from hans@blender.nl on Sun, Dec 23, 2001 at 09:58:00PM %2B0100 References: <200112232058.VAA10405@www.blender.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
* Hans Lambermont <hans@blender.nl> [011223 21:05]: > 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" > 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 ?'. My educated guess would be the the JVM wasn't built with the -pthread flag - so Java doesn't recognize the symbols used by libGL. I'm not too hot on the ins and outs of C libraries or JNI, but I've seen the same error with things that I've tried to build against Mesa. [ Happy Christmas to all on list, incidentally. And thanks to 'Santa' Nate for the licensed JVM ;) ] -- Rasputin :: Jack of All Trades - Master of Nuns :: 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?20011224115448.A7117>