[FFmpeg-devel] incorrect compatibility_version of libpostproc.dylib (libav*.dylib too?) on OS X

Hanspeter Niederstrasser fink
Thu Oct 14 15:18:12 CEST 2010

At some point between ffmpeg-0.4-20071217 and ffmpeg-0.5 (I know this 
was a long time ago, but the issue persists through svn tip), 
libpostprocess.dylib went from having a compatability_version of 51.1.0 
to 51.0.0 (which is being set by libpostproc/postprocess.h).  On OS X, 
this will break packages that used to link to old libpostprocess.dylib 
because on OS X, the compat_version of the shared library is hardcoded 
into the linking program, and so this appears as a downgrade and dyld 
will complain.  postprocess.h indicates that LIBPOSTPROC_VERSION_MINOR 
has been bumped to 2 for a while now, but this appears to not be being 
used to set compat_version inside the shared library file.

In fact, it looks like $LIBMAJOR is the only thing being used to set 
compat_version on OS X (based on my reading of config.mak), but this is 
only currently affecting libpostproc.dylib because all the other libav* 
have bumped their major version in the meantime (51.1.0 < 52.0.0).  Can 
a fix be done on libpostproc?  Or would it be useful to add $LIBMINOR 
(or change to $LIBVERSION) to the linker flags (SHFLAGS) in config.mak? 
  Or would this break future updates going forward...?

Below is the output of otool -L on libpostproc.dylib from the various 
versions mentioned:
otool -L libpostproc.51.1.0.dylib (from 0.4-20071217):
     /sw/lib/libpostproc.51.dylib (compatibility version 51.1.0, current 
version 51.1.0)

otool -L /sw/lib/libpostproc.51.dylib (from 0.6):
     /sw/lib/libpostproc.51.dylib (compatibility version 51.0.0, current 
version 51.2.0)

otool -L /src/ffmpeg/build/libpostproc/libpostproc.51.dylib (from svn tip):
     /usr/local/lib/libpostproc.dylib (compatibility version 51.0.0, 
current version 51.2.0)


More information about the ffmpeg-devel mailing list