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

Re: [mechglue] Static Linking - Circular Dependency

On Wed, Apr 26, 2006 at 12:23:25PM -0400, Michael B Allen wrote:

> > AFAIK any program linking to libgssapi then will have to specify it
> > twice on the linker command line:
> > 	-lgssapi -lmech_krb5 -lmech_spnego -lgssapi
> Do you know from experience that this works? Aside from complicating the
> user linking process a litte, libgssapi needs to call gss_krb5_initialize
> and gss_spnego_initialize to install their mechanisms.

I haven't tried it but this should work on platforms with traditional
UNIX ld semantics. The first "-lgssapi" resolves GSSAPI references in
the application, then the mech libs resolve the mech initialization
calls inside libgssapi, then the second "-lgssapi" resolves GSSAPI
references inside the mech implementations.

Platforms with more advanced linker semantics (AIX comes to mind) do not
need the second "-lgssapi" because they can search the same archive
multiple times for missing symbols.


     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences