Skip to content

ABI Versioning

Sebastian Reimers edited this page Mar 13, 2022 · 6 revisions

https://github.com/baresip/re/blob/master/Makefile

ABI_CUR   := 0
ABI_REV   := 0
ABI_AGE   := 0

Here are a set of rules to help you update your library version information:

  • Update the version information only immediately before a public release of your software. More frequent updates are unnecessary, and only guarantee that the current interface number gets larger faster.
  • If the library source code has changed at all since the last update, then increment ABI_REV
  • If any interfaces have been added, removed, or changed since the last update, increment ABI_CUR, and set ABI_REV to 0.
  • If any interfaces have been added since the last public release, then increment ABI_AGE.
  • If any interfaces have been removed or changed since the last public release, then set ABI_AGE to 0.

The following explanation may help to understand the above rules a bit better: consider that there are three possible kinds of reactions from users of your library to changes in a shared library:

  • Programs using the previous version may use the new version as drop-in replacement, and programs using the new version can also work with the previous one. In other words, no recompiling nor relinking is needed. In this case, bump ABI_REV only, don’t touch ABI_CUR nor ABI_AGE.
  • Programs using the previous version may use the new version as drop-in replacement, but programs using the new version may use APIs not present in the previous one. In other words, a program linking against the new version may fail with “unresolved symbols” if linking against the old version at runtime: set ABI_REV to 0, bump ABI_CUR and ABI_AGE.
  • Programs may need to be changed, recompiled, and relinked in order to use the new version. Bump ABI_CUR, set ABI_REV and ABI_AGE to 0.

Source: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

Clone this wiki locally