I am getting so much conflicting information about this, both on SE and other tutorials. Most people seem to think the so version is a semantic version. Then others correct them saying it must conform to libtools conventions, and go on to implicitly assume or imply that the -version-info C:R:A
numbers passed to libtools create files named libfoo.so.C.R.A
. But I don't see anywhere in the libtools manual that explicitly states how the files are named, and that doesn't match the behavior that I'm seeing.
I'm building a third party package (gdal), and during the build process, it calls libtool --mode=link -version-info 25:4:5 <many other arguments>
, however the so files left in .libs after the build have version libgdal.20.5.4.
I tried with a couple other versions of the same library, and they all seem to follow the same pattern. When you call libtools you pass in current:revision:age, and it generates libfoo.so.current-age.age.revision
. This results in an soname of libfoo.so.current-age
that is always the minimum version that the library is compatible with, not the maximum as other posts suggest.
I did this testing on both RHEL 7 and Debian 10.
Is this how things are supposed to work? Is this library doing something weird? Is there any place that documents this authoritatively, or at least correctly?