TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:9630] libs



On Nov 01, 1999, ryan goldberg <rgoldber@d.umn.edu> wrote:
> I run into this problem quite a few times.  I want to install something,
> and it wants libfoo.so.1, and I've got libfoo.so.2.  The ./configure
> script fails, (or make sometimes) or the rpm balks.  

For good reason.  A bumped version number like this typically means that
signiicant changes have been made to the library, including changes to
the API.  If you try to intermix libraries with application code they
weren't meant for, you're asking for a segfault as soon as the
application calls into the library at the wrong place.  Ldconfig is
protecting you.  (c:

As an aside, the libtool info docs go into some detail about library
versioning (which is not equivalent to application versioning!).  Each
time you make the tiniest change in a library, you should bump the micro
version; if you add a function, but don't remove any, you should
increment the minor version; and if you take away any functions at all,
you should bump the major version:

 e.g. libfoo.1.15.4

Or something like that.  The latest version of a library will typically
be symlinked to an abbreviated version, e.g. libfoo.1.15.4 -> libfoo.1.  
Install programs take care of this for you.  If you try to do it by
hand, you'll likely get your system into a confused, crash-prone state.

> I've tried using
> symlinks "ln -s libfoo.so.2 libfoo.so.1" and of course then running
> ldconfig.  This never works. 

You can safely install both versions of the library, libfoo.so.1 and
libfoo.so.2.  Ldconfig will sort out the differences for you.

HTH,
John