[Ffmpeg-devel] versions, ABIs and sonames

Dan Villiom Podlaski Christiansen danchr
Sat Jul 23 14:00:00 CEST 2005


On 23/07/05, Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
> 
> would there be some interrest in having nice standard a.b.c versions for each
> lib (libavformat, libavcodec, libpostproc)?
> so that an increase of
> c means no binary compatibility breakage
> b means backward compatibility (added function, ...)
> a means no compatibility (function removial, ...)
> 
> and just to clarify, yes for cvs not the yearly releases, the later would be
> pointless as they always break compatiblity entirely
> 
> 
> if theres some interrest then ill change the meaning of the current
> LIBAV*_BUILD number from integer to aabbcc 3 element version vector or do we
> need more then 100 of each?

This would be very useful for the Darwin port. The patch is more or
less complete, apart from this issue, which I believe ought to be
resolved first.

About numbering and convention, the Darwin linker has two options
which are used to achieve what you describe. I've pasted the relevant
portion of the manual page below for reference. Also, for Darwin, B
and C can be no higher than 255.

I'd suggest treating it as three numbers instead, A, B and C, and then
have the library version be A.B.C. I'd suggest setting the
compatibility version to A.B.0 and have the hard-coded library name be
e.g. libavwhatever.A.dylib. This should achieve the semantics you
describe, and fit nicely with usual Darwin conventions.

- Dan


---
>From libtool(1):

       -compatibility_version number
              For  a  dynamic  shared library this specifies the compatibility
              version number of the library.  When a library is used the  com-
              patibility  version  is  checked  and  if  the user's version is
              greater that the library's version, an error message is  printed
              and  the using program exits.  The format of number is X[.Y[.Z]]
              where X must be a positive non-zero number less than or equal to
              65535,  and  .Y  and .Z are optional and if present must be non-
              negative numbers less than or equal to  255.   If  this  is  not
              specified  then it has a value of 0 and no checking is done when
              the library is used.

       -current_version number
              For dynamic shared library files this specifies the current ver-
              sion  number  of the library.  The program using the library can
              obtain the current version of the  library  programmatically  to
              determine exactly which version of the library it is using.  The
              format of number is X[.Y[.Z]] where X must be  a  positive  non-
              zero  number  less  than  or  equal  to 65535, and .Y and .Z are
              optional and if present must be non-negative numbers  less  than
              or  equal  to 255.  If this is not specified then it has a value
              of 0.





More information about the ffmpeg-devel mailing list