Why shared libraries have version numbers

David Collier-Brown davec-b at rogers.com
Tue Jul 7 15:56:10 GMT 2009

Volker Lendecke wrote:
> On Tue, Jul 07, 2009 at 10:42:02AM -0400, David Collier-Brown wrote:
>>   The purpose of shared library version numbers is to allow
>> controlled, continuous change.  The implementer of
>> the called functions produces a new implementation with
>> some changed APIs or ABIs, but the consumers of the
>> old API/ABI continue to work without change. 
> How do you cope with a program that requires version .2 that
> also links in a library that requires version .1?
> Volker
   You speak unkindly to the programmer (;-))

  Joking aside, if the program in question is very large, like
samba itself, you might have to use a tactic like running both
samba 3 and as cooperating processes.  If it's smaller, I'd try
backing out to the previous version by looking in old GIT
versions and adding the old code back with #ifdefs.

  Having competing version suggests that either two people were
working at cross-purposes, or someone accidentally did only half
the job of upgrading to the new version.  This should fail utterly on
Solaris, by the way: if it doesn't could you tell me and I'll speak to
the ld.so developers, who used to be my office neighbors.


David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net           |                      -- Mark Twain
(416) 223-8968

More information about the samba-technical mailing list