[gnutls-dev] gnutls versioning again

Simon Josefsson simon at josefsson.org
Sun Feb 4 12:59:05 CET 2007


I'm copying the list on this, since I'd appreciate wider discussion.

Pavlov Konstantin <thresh at immo.ru> writes:

> Another problem i recognized is the lack of real symbol versioning in 
> libgnutls:
> GNUTLS_1_3
> {
>   global: _gnutls*; gnutls*; _E_*;
>   local: *;
> };
>
> I made a new .version file for 1.6.1 release, it looks like :
> GNUTLS_1_3
> {
>   global: _gnutls*; gnutls*; _E_*;
> };
>
> GNUTLS_1_6_1 {
>     global:
>         gnutls_transport_set_errno;
>         gnutls_transport_set_global_errno;
>         local:  *;
> };
>
>
> What do you think about it ?

I've re-read the relevant parts of Drepper's DSO howto to refresh my
memory on this, but still, I don't see what problem the above change
would fix.  Could you explain?

The only problem that I can think of that the above would solve if is
an application that uses e.g. gnutls_transport_set_errno was built
against 1.6.x or later is moved to a system which has an older
libgnutls installed that doesn't have that symbol.  The application
will not work.

We can't protect against that, though, as far as I can see.  If an
application uses a new interface, he must make sure a library that
implements that interface is available.

Thus, my conclusion would be that, generally, adding new interface
doesn't require changes to the version script.

If we ever _change_ an ABI, rather than adding new ones, we definitely
need to use versioning on that symbol.  Then old applications get the
old behaviour and new applications get the new behaviour.  But I'm
trying to avoid changing ABIs because it is complex and confusing to
document and think about that situation.

All this said, I'm not an expert on DSO versioning, so I'd appreciate
comments on the reasoning in this post.

Thanks,
Simon




More information about the Gnutls-devel mailing list