Can't open shared library: ../lib/libformat.sl (HP-UX)

Questions, suggestions, and answers for XnView on all Un*x platforms (Linux, HP-UX, AIX, ...)

Moderators: helmut, XnTriq, xnview

dipi

Can't open shared library: ../lib/libformat.sl (HP-UX)

Post by dipi »

Hi to all!

I have installed XnView 1.68 as in the Readme.txt under the directory /opt/xnview/ as all other programs in my HP-UX 11.11 system. It works fine when I run it from the directory /opt/xnview/bin.
However I would run it from e.g. my home dir the following error occurs:

Code: Select all

$ xnview
/usr/lib/dld.sl: Can't open shared library: ../lib/libformat.sl
/usr/lib/dld.sl: No such file or directory
ABORT instruction (core dumped)
Both PATH and SHLIB_PATH is set correctly and I have checked the environment variable LD_LIBRARY_PATH is also contains /opt/xnview/lib. But it seems to search for libformat only through the relative address. ../lib.
Is there any possibility to run this cool program conveniently from anywhere in the directory tree?

Thanks in advance.
User avatar
xnview
Author of XnView
Posts: 37751
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Can't open shared library: ../lib/libformat.sl (HP-UX)

Post by xnview »

dipi wrote:Hi to all!

I have installed XnView 1.68 as in the Readme.txt under the directory /opt/xnview/ as all other programs in my HP-UX 11.11 system. It works fine when I run it from the directory /opt/xnview/bin.
However I would run it from e.g. my home dir the following error occurs:

Code: Select all

$ xnview
/usr/lib/dld.sl: Can't open shared library: ../lib/libformat.sl
/usr/lib/dld.sl: No such file or directory
ABORT instruction (core dumped)
Both PATH and SHLIB_PATH is set correctly and I have checked the environment variable LD_LIBRARY_PATH is also contains /opt/xnview/lib. But it seems to search for libformat only through the relative address. ../lib.
Is there any possibility to run this cool program conveniently from anywhere in the directory tree?

Thanks in advance.
You have a good link libformat.sl?
Pierre.
dipi

Post by dipi »

You have a good link libformat.sl?
Yes, I have checked it.
It works fine running from its own directory, so this link works. The problem could be with the relative path ../lib/libformat. But I do not understand, why only the xnview could not find the lib through the LD_LIBRARY_PATH, this works well with the other programs (e.g. GSL, QT), and the dld.sl theoretically checks these paths.
dipi

Post by dipi »

I have tried to copy the directory lib to the parent directory of the current directory and of course xnview runs well, because it can find its ../lib directory.

dipi
User avatar
xnview
Author of XnView
Posts: 37751
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

dipi wrote:
You have a good link libformat.sl?
Yes, I have checked it.
It works fine running from its own directory, so this link works. The problem could be with the relative path ../lib/libformat. But I do not understand, why only the xnview could not find the lib through the LD_LIBRARY_PATH, this works well with the other programs (e.g. GSL, QT), and the dld.sl theoretically checks these paths.
Strange, if you have the path in your LD_LIBRARY_PATH????
Pierre.
dipi

Post by dipi »

Here is the proof:

Code: Select all

~$ echo $LD_LIBRARY_PATH
/usr/lib:/etc/opt/resmon/lib:/opt/graphics/phigs/lib:/opt/gsl/lib:/opt/qt/lib:/opt/xnview/lib
~$ xnview
/usr/lib/dld.sl: Can't open shared library: ../lib/libformat.sl
/usr/lib/dld.sl: No such file or directory
ABORT instruction (core dumped)

:?
Guest

Post by Guest »

And of course the path is existing:

Code: Select all

~$ ll /opt/xnview/lib/
total 3858
lrwxr-xr-x   1 root       sys             33 Dec  3 22:56 libformat.sl -> /opt/xnview/lib/libformat.sl.4.16
-rwxr-xr-x   1 root       sys        1961984 Dec  3 22:56 libformat.sl.4.16
:(
User avatar
Remi
Posts: 23
Joined: Mon May 24, 2004 5:08 pm
Location: France, Champagne

Re: Can't open shared library: ../lib/libformat.sl (HP-UX)

Post by Remi »

dipi wrote:I have installed XnView 1.68 as in the Readme.txt
Where did you find this version ? I only find the old 1.50
dipi wrote: under the directory /opt/xnview/ as all other programs in my HP-UX 11.11 system.
I can run it only when installed in the /usr/local tree.

Hope this can help.
User avatar
Remi
Posts: 23
Joined: Mon May 24, 2004 5:08 pm
Location: France, Champagne

OK for me.

Post by Remi »

1/ I found the 1.68 version on the site.

The page display 1.50 but archive contains the 1.68. I think we could wait until the release of version 1.74 to have the page corrected ;->>

2/ it's run fine for me using the install script (in the archive)

It's installed (like the old 1.50) under the /usr/local.

Cordialy.