Bug 4630 - RLS java client cannot load libaries through JNI on Mac
: RLS java client cannot load libaries through JNI on Mac
Status: RESOLVED WONTFIX
: Replica Location
RLS
: development
: Macintosh MacOS
: P3 normal
: ---
Assigned To:
:
:
: 3253
:
  Show dependency treegraph
 
Reported: 2006-07-31 05:23 by
Modified: 2008-01-29 22:25 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-07-31 05:23:28
This is with RLS from 4.0.2 patched slightly with bug 3253 patches and a couple
of (hopefully irrelevant) others.

I see this:

$ vds-plan helloworld.dax 
Couldn't find flavor gcc32dbgpthr
Couldn't find flavor gcc32dbg
Couldn't find flavor gcc32pthr
Couldn't find flavor gcc32
Exception in thread "main" java.lang.UnsatisfiedLinkError: init
        at org.globus.replica.rls.RLSClient.init(Native Method)
        at org.globus.replica.rls.RLSClient.<clinit>(RLSClient.java:862)
        at org.griphyn.cPlanner.rls.RLSQuery.<init>(RLSQuery.java:143)
        at org.griphyn.cPlanner.engine.RLSEngine.<init>(RLSEngine.java:244)

Turns out that in java on mac, libraries that are to be System.loadLibraried
need to have a .jnilib rather than .dylib extension (.dylib is the extension
for some other kind of dynamically loadable library; .so still seems to be used
for plain old shared libraries). So I typed this:

$ ln -s
/Users/benc/work/gt-4.0.2/lib/libglobus_rls_client_jni_gcc32dbgpthr.dylib
/Users/benc/work/gt-4.0.2/lib/libglobus_rls_client_jni_gcc32dbgpthr.jnilib

and it works now.

The above ln hack is probably not the correct way to fix -- instead the build
process should probably be using the correct name in the first place.

Here's an (out-of-date) note about such:
http://developer.apple.com/documentation/Java/Conceptual/Java131Development/overview/chapter_2_section_5.html#//apple_ref/doc/uid/TP30000705-TPXREF114
------- Comment #1 From 2006-07-31 06:00:05 -------
I also forgot to mention that I had to set

   export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH

(perhaps that should be done in globus-user-env.(c)sh)
------- Comment #2 From 2006-11-07 14:01:21 -------
This was on OS X 10.3, right?
------- Comment #3 From 2006-11-07 17:25:08 -------
no, 10.4.y (I don't recall the particular version of y that I was using at time
of report)
------- Comment #4 From 2008-01-29 22:25:35 -------
This bug is fixed by using the new RLS Client Java API in trunk (to be released
in GT 4.2)