PanoTools mailing list archive

Mailinglist:proj-imim
Sender:Paul D.
Date/Time:2000-Dec-01 17:22:27
Subject:Re: can't load libpano with jdk1.3

Thread:


proj-imim: Re: can't load libpano with jdk1.3 Paul D. 2000-Dec-01 17:22:27
Neil,

I've never used JDK1.3, and have no idea what may have changed
between JDK1.2.2 and JDK 1.3.x, but try using strace to see
if it's just a path problem.

In the example below, libpano12.so is located in the current
directory (i.e. "."), and I'm using the IBM JDK 1.1.8:

  > export LD_LIBRARY_PATH=.
  > strace -eopen,stat,access -f \
    java -classpath ptpicker.jar:/usr/jdk118/lib/classes.zip ptpicker >& foo

The first line makes sure that a program looks in the current directory
for shared libraries like libpano12.so.  The second line uses strace
to watch for system calls that java makes to open(), stat(), and access().
The third line is just a continuation of the first; it's the normal
command line you would have issued, but with the output redirected to
the file "foo".  "foo" will contain a log of most file accesses java
and its children are attempting.

Now look where java is searching for any "pano" libraries:

  > grep pano foo

[pid  1639] open("/usr/jdk118/lib/linux/native_threads/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./i686/mmx/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./i686/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./mmx/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/lib/i686/mmx/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/lib/i686/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/lib/mmx/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/lib/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/usr/lib/i686/mmx/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/usr/lib/i686/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/usr/lib/mmx/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("/usr/lib/libpano12.lib.so", O_RDONLY) = -1 ENOENT (No such file or directory)
libpano12.lib.so: cannot open shared object file: No such file or directory (libpano12.lib.so)
[pid  1639] open("/usr/jdk118/lib/linux/native_threads/libpano12.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./i686/mmx/libpano12.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./i686/libpano12.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./mmx/libpano12.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1639] open("./libpano12.so", O_RDONLY) = 9

The above shows the order in which java looked for the shared library
libpano12, using the open() system call.  Note that all but the last
open() returns a file handle of -1 (i.e. file not found).  The last
open() returns a file handle of 9; i.e. java found and loaded
"./libpano12.so".

If your log shows open() returning all -1's, then you have to set
your library path (LD_LIBRARY_PATH) appropriately or move libpano12.so
to a common location such as /usr/lib.  If java finds and loads
libpano12.so and still has problems, then the problem is more
serious.

Feel free to mail me the log privately, and I'll try to look at it
if/when I have the time.

Hope this helps.

-- Paul


On Fri, 1 Dec 2000, Neil Bomberger wrote:

| Hi all,
| 
|     I haven't seen this addressed on the mailing list, apologies if it has been.  I'm using PanoTools on RedHat
| Linux 6.2 (thanks to all those involved with compiling it for libc6), and ptpicker works fine with jdk1.2.2, but
| when I try to run it with jdk1.3, I get the error message
| 
|       Could not load library pano12
| 
| Again, I can use ptpicker using jdk1.2.2, so it's no real inconvenience to me, I just wanted to know if anyone
| else had experienced this, and if anyone knows what change might have occurred between jdk1.2 and jdk1.3 that
| might cause this.  This error occurs with both the jdk1.3 and jdk1.3.0_01 from Sun.
| 
| -Neil
| 



Next thread:

Previous thread:

back to search page