Do we need to bump the shared library version for 2.4.0?

Simon Josefsson simon at josefsson.org
Tue May 27 14:52:18 CEST 2008


Andreas Metzler <ametzler at downhill.at.eu.org> writes:

> Is (or has it ever been in > 2.2.0) gnutls-extra useable on its own?

No, you need to call gnutls_global_init() in -lgnutls before
gnutls-extra is useful.  Further, libgnutls-extra links to libgnutls.

> I.e. is there a cause to be made for anything only linking against
> gnutls-extra directly but not against libgnutls main? If correct usage
> of gnutls-extra requires linking/dlopening libgnutls I think there is
> strong case for 3.

You can't use libgnutls-extra without libgnutls.  The only function in
libgnutls-extra that doesn't require earlier calls to functions in
libgnutls is gnutls_extra_check_version.  That function will continue to
work fine, and doesn't even require initialization of libgnutls or
libgnutls-extra.

However, technically I'm not sure that is sufficient.  The rules when to
increment the shared library version is to do it when you remove a
symbol from a library.  And we have removed symbols from
libgnutls-extra.  What is unclear to me is whether it is safe to assume
no problem will happen because libgnutls-extra links to libgnutls, and
libgnutls contains the old symbols.

> Packagers generally would slightly also prefer 2 over 1. The problem
> you noted is easily avoided for packages, since co-installion of
> the different libraries can be prevented by using package
> dependencies/conflicts. For Debian packages specifically, 2 would create
> a problem since I currenly do not track packages using libgnutls-extra
> separately. - Therefore anything linking against it would be broken
> until rebuilt. - I am only mentioning this for completeness sake, I
> do not think Debian-specic issues should be an important point.

I don't think we as upstream can rely on this.  We need to work portably
for people that install both gnutls 2.2.x and gnutls 2.4.x manually.  So
the problem I described is valid, and I don't see a way to avoid it.
This leads to choosing 1.

> PS: I you bump so names, please also bump symbol versioning.

Why is that necessary?  I think we have discussed this before (for the
2.2.x abi break) but eventually decided not to increment the versioning.

/Simon





More information about the Gnutls-devel mailing list