Ethereal-dev: Re: [Ethereal-dev] Re: Experimental Heimdal-Kerberos detection

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Fri, 19 Mar 2004 00:17:31 +0100
On Thu, Mar 18, 2004 at 09:51:32PM +0000, Pia Sahlberg wrote:
> CVS --with-krb5 does not work at all for me.
> 
> It gives me
> "checking for krb5-config... checking whether to use kerberos/heimdal... yes
> checking for krb5-config... /bin/krb5-config

so the krb5-config file is present

> checking krb5.h usability... yes
> checking krb5.h presence... yes
> checking for krb5.h... yes

The include is present.

> checking for krb5_kt_resolve in -lkrb5... no

Unfortunately, the output of this command is misleading in many (but not
all) cases: This messages meanst that *something* during compiling *or
linking* the test program went wrong. In this case, config.log shows that
the linking stage was the culprit.

> heimdal not found - disabling dissection for some kerberos data in packet 
> decodi
> ng

>From looking at the config.log, it seems to me that krb5-config --libs returns
the following:
-L/usr/heimdal/lib -lkrb5 -lasn1 -lcrypto -lroken -lcrypt 
Please add -lresolv to the list of libraries returned by the krb5-config files
and test again.

> Happiness ensues, It adds the heimdal -L and -l directives MULTIPLE times
> to the build command .
> This cause libfool to ling the SHARED LIBRARY for libethereal multiple times
> with the kerberos libs.
> It also tries to link the shared lib rary with THE STATIC .a versions of 
> therse liobs.
> MULTIPLE TIMES.

I currently do not have a clear idea what is going wrong and am too tired to
look into my build logs to see if something similar happens on my system -
but as it works for me it probably doesn't happen - hmm,m ok, I looked it up.
Yes, the result of krb5-config --libs appears twice during linking stage.
But obviously identical and in the form of -lresolv. I have no idea why it
would try to link against the static version. Can you please send me the
two lines whrere the linking is done (the libtool and the real gcc line)?
It may be, that it is a fault of the build process or it may be a fault of the
redhat tools/libs (the provided .la files for some libs perhaps?).

Hmm, even better: please send the following:
The output of your configure command, the resulting config.log,
the log of make (just run it again after letting it run to the
error to be as short as possbile) and the krb5-config file.
Also: Which version of Redhat are you using? From the config.log
it looks like you are using heimdal 0.6, which is the same version
that I am using. Also, which versions of automake, autoconf and
libtool are you using?

> Should LIBETHEREAL really really link with the kerberos libs?
> shouldnt only the resulting executables be linked with it?

Yes. Ideally we need to link libethereal with all the libs it needs.
The main binaries of ethereal and tethereal should only link against
libethereal and the libs they use directly (ignoring wiretap for now).

> running configure without   --with-krb5  and configuring it manually 
> afterwards still work.

Which linking and include changes do you make to which files?

I'll try to find out why the flags are added twice tomorrow (unless
someone beats me to it).

Ciao
      Jörg

-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.