Why shared libraries have version numbers (was: the sorry saga ...)

David Collier-Brown davec-b at rogers.com
Tue Jul 7 14:42:02 GMT 2009

  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. 

  At some time convent to them, they change to the new
API calls and the new library, test it and continue.

  This is entirely consistent with what Tridge is doing:
I've bumped versions of apptrace(8) code with wild
abandon, and the consumers of it don't care, until
such time as they chose to upgrade and get a change
database (a flat file containing sed and m4 scripts)
from me and do the upgrade.

  This is nothing new: it dates back to Multics, where
I learned it at about the time Unix v7 was coming out.
See also http://www.multicians.org/stachour.html and


tridge at samba.org wrote:
> Hi Andrew,
>  > I think Volker is right, that given we can easily (for some definition
>  > of easily) avoid changing the ABI, then it's an easier way out of this
>  > mess.
> The whole argument of not changing the ABI is based on saving our
> 'users'. As I have demonstrated, all of our users are completely
> broken whatever happens. All of them mix in static and dynamic
> versions of talloc. The only place it is a bit saner is in debian
> experimental, and the whole point of experimental is that it breaks
> all the time - it offers no promises whatsoever.
> There is nothing I can do to fix that. There is no point in taking on
> an extra maintainence burden for zero benefit, and I fundamentally
> reject the idea of the core of Samba taking on extra maintainence
> burdens like this due to the needs of the shared libs. That approach
> will lead to us drowning in ABI hacks very quickly.
>  > This is more than just a cleanup of possible memory leaks, isn't it?
> right - it is fixing a fundamental bug in the talloc API. Keeping the
> old semantics for the existing 'users' is the approach Simo has
> taken. I don't _want_ the old semantics to be kept, as they are
> broken.
> The 'users' need to recompile anyway, as they are all mixing static
> and dynamic linking. At least with a soname bump they get a warning
> from the linker if there is some lib they use that is not recompiled.
> So no, I am not going to accept this patch from Simo. I still want him
> to revert his patch. If he doesn't then I will revert it instead.
> Cheers, Tridge

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