[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change lib version numbers?

On Fri, 03 Nov 2006 09:49:17 +1100
Brian May <bam@snoopy.apana.org.au> wrote:

> >>>>> "Michael" == Michael B Allen <Michael> writes:
>     Michael> I'm still having symbol clash problems when dlopen'd modules use different
>     Michael> versions of Heimdal. I have explored Love's suggestion of renaming all
>     Michael> exported functions via make-protos.pl and I'll continue to explore that
>     Michael> option but it seems I would need to do that for every exported function
>     Michael> of every library (e.g. libasn1 has 1200 functions).
> Do you mean you want to dlopen different versions of Heimdal within
> the one application?

My PHP module is linked with my custom mechglue-branch version of
Heimdal. PHP modules are dlopend per usual. If another extension like
ldap.so or pgsql.so uses libkrb5 symbols symbol clashing can occur.

> If so, changing the version numbers will not help, the symbol names
> will remain the same and continue to clash.

I sort of figured that but I wasn't sure. Actually right now I statically
link my custom Heimdal and about a dozen other libs into one big shared
library and then dynamically link the PHP module with that. So the library
name is totally different and therefore I orginally had doubts about
version number changes. But I'm despirate. I need to figure this out.

> The only solution is to use versioned symbol names, such as used in
> the Debian heimdal package (so that the MIT libraries don't clash with
> the Heimdal libraries even if linked in the same library, possibly via
> standards such as PAM, NSS, libnss-ldap, etc).
> If you want me to send you the diff against 0.7.2, let me know.

Yes! Symbol versioning, that's what I need. Please send me your patch.

I modified make-protos.pl to add a prefix to all the libkrb5 functions but
I stupidly only did the public functions. After I started to think that
I would basically need to change *every* exported symbol from every library
in Heimdal (krb5, gssapi, roken, hcrypto, etc) to guarantee consistency.

I'm very curious to see how you are doing symbol versioning. I was
thinking of using objdump to get all symbols and someone insert #defines
into the headers. Hopefully your solution is more elegant.


Michael B Allen
PHP Active Directory SSO