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

[mechglue] Static Linking - Circular Dependency



Hi,

I want to be able to statically link with heimdal mechglue-branch. I
actually had it working for a long time. Then I just did a distclean
and rebuild and realized I have circular Makefile.am dependencies. Is
there a libtool guru out there that can recommend a method for resolving
the circular dependency? It would be a really nice feature if we could
statically link.

Heres the layout for those of you who may not have looked at the mechglue
branch yet:

  lib/gssapi/
    libmech_krb5
  lib/spnego/
    libspnego_krb5
  lib/mechglue
    libgssapi

The problem is that libgssapi needs libmech_spnego and libmech_spnego
needs libgsspi. At least it does for static linking. In the original
mechglue-branch package the libgssapi Makefile.am does NOT have a
dependency on libmech_spnego because libgssapi dlopens the libraries
that it needs and there's no problem.

To statically link however I modified mechglue/g_initialize.c to call
gss_spnego_initialize call immediately after the gss_krb5_initialize
call and commented out the gss_dynamic_initialize call. Then I added
a libgssapi dependency on libmech_spnego and somehow managed to do
things in the right sequence to actually build cleanly. I guess somehow
I managed to recreate the libgssapi.la file without rebuilding the whole
thing. But now I can't reproduce the process.

Any ideas? If you can't tell I'm struggling with the build tools :-/

Thanks,
Mike