[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [mechglue] Static Linking - Circular Dependency
On Thu, 27 Apr 2006 11:57:41 +0200
Gabor Gombas <firstname.lastname@example.org> wrote:
> 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.
The mech initialization calls are not inside libgssapi. They're in
libmech_krb5 and libmech_spnego.
But at any rate, I have mechglue working with static linking again. It
turns out the linking error was for a small program called test_cred
that was being compiled immediately after the libgssapi link and
because the commands are huge I didn't spot it until you forced me to
look closer. So libgssapi links just fine. I just commented out the
test_cred thing and added some $(LIB_spnego) dependencies to some of
the appl proggies. I'll post a diff later when I've tested everything
with a pristine mechglue-branch package.