9 messages in net.java.dev.jna.usersRe: Pointer.initIDs UnsatisfiedLinkError
FromSent OnAttachments
Wayne MeissnerMay 9, 2007 10:10 pm 
Timothy WallMay 10, 2007 5:26 am 
Ricky Ng-AdamMay 10, 2007 6:40 am 
Timothy WallMay 10, 2007 6:55 am 
Wayne MeissnerMay 10, 2007 6:58 am 
Timothy WallMay 10, 2007 7:09 am 
Wayne MeissnerMay 10, 2007 7:46 am 
Timothy WallMay 10, 2007 8:37 am 
Wayne MeissnerMay 10, 2007 5:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Pointer.initIDs UnsatisfiedLinkErrorActions...
From:Wayne Meissner (wmei@gmail.com)
Date:May 9, 2007 10:10:40 pm
List:net.java.dev.jna.users

Timothy Wall wrote:

On May 8, 2007, at 10:56 AM, Patrick Wright wrote:

Hi

I did some checking and it turns out that you only get library symlinks on ubuntu when you install the developer packages. Which means that most programs that depend on dlopen will break on ubuntu if you don't have the dev packages installed.

What "dev" packages? (I know "dev" is used to distinguish some packages, but are you referring to any in particular?)

X11 and libc are the ones I've run into. Most development packages have a 'dev' suffix, and include header files and debug versions of libraries. On ubuntu, apparently they are also the only ones that include a symlink from libXXX.so to libXXX.so.N. Since dlopen looks for an explicit name, it won't find libXXX.so.N without the symlink, resulting in the UnsatisfiedLinkError.

On my ubuntu install (7.04), /usr/lib/libc.so isn't a symlink, it is a LD script - and it still fails to find the library. However, telling it to use libc.so.6 directly works fine.

We could probably tweak Function.findPath() to explicitly fallback to libfoo.so.* if libfoo.so isn't found. A bit mucky, but better to fix it in JNA if possible than have it not work for end-users because they don't have something installed.