linux-l: ldd Ungereimtheit

thomsen at cs.tu-berlin.de thomsen at cs.tu-berlin.de
So Jul 12 01:26:30 CEST 1998


In message <1.5.4.32.19980710080311.0175ff40 at ctb.detewe.de>, Michael Wiedmann w
rites:
> Folgendes Problem harrt einer Loesung:
> 
[..]
> - Ein "ldd applikation" zeigt anschliessend:
> 
>   libxxx.so.1.39 -> /path/to/lib/libxxx.so.1.39
> 
> Das macht es Leuten schwierig bis unmoeglich dieses Binary zu benutzen,
> die lediglich eine aeltere - aber was die API angeht kompatible - Version 
> der Lib besitzen.
> 
> Welche Loesungen gibt es?
> ------------------------------------------------------------------------
 Beim Erstellen des Linkers kann mit der Option 'soname' eben diesen
setzen. 

 Aus der GCC-HOWTO:
--8<--

 To build libfoo.so as a shared library, the basic steps look like
  this:

       $ gcc -fPIC -c *.c
       $ gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o
       $ ln -s libfoo.so.1.0 libfoo.so.1
       $ ln -s libfoo.so.1 libfoo.so
       $ LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH

  This will generate a shared library called libfoo.so.1.0, and the
  appropriate links for ld (libfoo.so) and the dynamic loader
  (libfoo.so.1) to find it.  To test, we add the current directory to
  LD_LIBRARY_PATH.
-->8--

Guenther




Mehr Informationen über die Mailingliste linux-l