[OpenAFS] OpenAFS 1.4.0-rc8 Compile Error With Krb5 on OS 10.3

Ken Hornstein kenh@cmf.nrl.navy.mil
Thu, 20 Oct 2005 14:28:02 -0400

>configure:13395: checking for krb5_524_convert_creds
>configure:13445: cc -o conftest -g -O2  -I/usr/include  conftest.c  
>-L/usr/lib -Wl,-rpath -Wl,/usr/lib -lkrb5 -lk5crypto -lkrb5support 
>-lcom_err -lresolv >&5
>ld: unknown flag: -rpath

Dumb question time: where the heck did -Wl,-rpath come from?

>So I created a conftest.h and .c (from the configure script), and tried 
>removing the -rpath, but then it complained:
>ld: can't map file: /usr/lib ((os/kern) invalid argument)

I suspect that you left in -Wl,/usr/lib ... you need to remove that as well.

Here's what I think the issue is: Panther does not ship with a
krb5-config script, so configure can't automatically figure out what
the options are that you need to use to compile Kerberos.  Some people
like to put in code in autoconf that takes a stab at guessing the right
options you need to use to compile with Kerberos, but I have found
those work great at the location where they were developed, but
basically don't work for large numbers of people (they have never
worked right for me, and I don't think I have that strange of a
Kerberos setup).  So, my attitude is that if you don't have
krb5-config, you have to have half a clue and put in the right
configure options to compile with Kerberos.  That doesn't seem to be
happening, and it's got to be something you did because the autoconf code
won't insert options on it's own.

It looks like to me that you tried to take some KRB5LIBS or KRB5CFLAGS
arguments that worked fine on another operating system, like Linux, and
use them under MacOS X.  Don't do that.  I think you can get away on
OS X with just specifying KRB5LIBS="-lkrb5 -lk5crypto -lcom_err", assuming
that you don't get hit with some confusion between the Kerberos com_err
and the AFS com_err ... if you run into that, well, I can't help you,
because I don't know what the right answer is.