Dynamic Libraries (was: Linking problems)

From: Uwe Lienig <Uwe.Lienig_at_fif.mw.htw-dresden.de>
Date: Fri, 23 Mar 2001 11:51:43 +0100

Hi managers,

days ago I asked for help regarding linking problems. The SUMMARY
stated, that there was a libjpeg.so in /usr/shlib. This lib does
interfere with the requested libjpeg.{a,so} in /usr/local/lib.

After knowing that I now ran into the following issue:

I did a nm on /usr/shlib/libjpeg.so, which is (as I guess) a helper for
java written by COMPAQ to support jpeg in java ( if I'm wrong, please
correct me). This libjpeg does not comprise the routines present in
libjpeg from the IJG, currently version 6b (62.0.0). This one compiles
very well, even shared libs are supported. In fact, these two libjpegs
seem to share only the name libjpeg !!

This is basically not the problem, the libs are installed in different
paths. But things go worse, if a program is started which has only a
shared object defined by name without a path. Then the loader will
decide which lib to use, and will find /usr/shlib before /usr/local/lib.
The prog will fail due to unresolved symbols.

One solution might be, setting LD_LIBRARY_PATH globally to search for
lib first in /usr/local/lib and the the default path. But this might
break java due to a libjpeg from IJG, which is not the right lib (java
stuff is missing).

Then, installing programs which are using libjpeg from IJG should
installed using a wrapper, i.e. xv is a script that sets LD_LIBRARY_PATH
and exec's xv.bin or something. This is some overhead and is somehow an
extra thing to to for admins ...

Well, at the end: What have you done to come around this problem ??

TIA
Received on Fri Mar 23 2001 - 10:52:57 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT