[vtk-developers] VTK 5-4-0 compatibility

Darren Weber darren.weber.lists at gmail.com
Tue May 12 15:00:52 EDT 2009


On Sun, May 10, 2009 at 10:32 PM, Steve M. Robbins <steve at sumost.ca> wrote:

> Hi,
>
>
> On Tue, Apr 28, 2009 at 10:09:52AM -0400, David Cole wrote:
> > There are some API changes from VTK 5.2 to 5.4... Although there are not
> > many, I would still say the current dylib compatibility settings are
> > correct. The 5.4 dylibs cannot be loaded by a program built against 5.2
> and
> > work flawlessly.
> >
> > Some VTK 5.4 API changes are explicitly listed here:
> > http://www.vtk.org/Wiki/VTK_5.4_Release_Planning
> >
> > And I would guess there are a handful of others that are simply not
> listed
> > anywhere, but would take source code analysis to uncover...
> >
> > The dylib properties are set by the code in VTK's CMakeLists.txt that
> looks
> > like this:
> >
> > # Append the library version information to the library target
> > # properties.  A parent project may set its own properties and/or may
> > # block this.
> > IF(NOT VTK_NO_LIBRARY_VERSION)
> >   SET(VTK_LIBRARY_PROPERTIES ${VTK_LIBRARY_PROPERTIES}
> >     VERSION "${VTK_VERSION}"
> >     SOVERSION "${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}"
> >     )
> > ENDIF(NOT VTK_NO_LIBRARY_VERSION)
> >
> > The library VERSION property is the source of the dylib versions...
>
> On unix/linux, SOVERSION is used to set ABI version.  Does
> "-compatibility_version" indicate the ABI version or API version?  If
> the former, then shouldn't it be set from SOVERSION rather than
> VERSION?
>
> Assuming we're talking about ABI (Application *Binary* Interface)
> version rather than API, recall that there are many ways to break
> binary compatibility even when API compatibility is maintained;
> e.g. add an instance variable to a class.  It's tough to audit for
> such changes, hence the conservative settings in CMakeLists.
>
> Regards,
> -Steve
>
>
This document is helpful:
http://developer.apple.com/DOCUMENTATION/DeveloperTools/Conceptual/DynamicLibraries/index.html

See also:
http://people.redhat.com/drepper/goodpractice.pdf
http://people.redhat.com/drepper/dsohowto.pdf

I am not entirely clear on whether -compatibility_version applies to ABI or
API.  I was thinking API.  See the doc above for tips about exporting
symbols (that controls the ABI?).

The apple.com document indicates that -compatibility_version is not checked
for shared libs opened dynamically at run-time with dlopen; it does apply to
dynamically linked libs.

Regards,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20090512/def16e03/attachment.html>


More information about the vtk-developers mailing list