Problem building an API program against 1.4.1

Douglas E. Engert deengert at anl.gov
Tue Aug 2 09:41:48 EDT 2005



Russ Allbery wrote:
> Ken Hornstein <kenh at cmf.nrl.navy.mil> writes:
> 
> 
>>Presumably krb5-config won't output -R on platforms if the compiler
>>doesn't understand it, right?  I'm just saying that I've never noticed
>>this to be a problem in practice (although judging by what I've seen in
>>people's krb5-config scripts, I appear to be the ONLY one who actually
>>uses them for their intended purpose :-/).
> 
> 

The krb5-config in 1.4.1 will use the RPATH_FLAG as set from configure.
So if you use the same compiler and linker as used to built the krb5 libs
it should be able to handle "-R" or the "-Wl,-rpath -Wl,"


> Well, it's fairly new, and a lot of the Kerberos software out there hasn't
> really changed its Autoconf macros in eons.  That being said, I really
> should start using it with the next release of all of my various Kerberos
> apps.
> 

I did make one change in this area which makes it much easier when building,
so that the -L used during building, does not have to match the -R
that would be used when in production. The environment variable
KRB5INAFS can be set to point to the location of the libs duing building.

FOr example whien building OpenSSH, setting
KRB5INAFS="/afs/my.cell/build.appls/krb5-1.4.1/@sys"

With the prefix set to /krb5 will cause:
./krb5-config --libs
-L/afs/my.cell/build.appls/krb5-1.4.1/@sys/krb5/lib -R/krb5/lib
   -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lsocket -lnsl


--- ,krb5-config.in     Thu Dec 16 15:28:13 2004
+++ krb5-config.in      Tue May 24 12:56:11 2005
@@ -29,8 +29,9 @@

  prefix=@prefix@
  exec_prefix=@exec_prefix@
-includedir=@includedir@
-libdir=@libdir@
+includedir=${KRB5INAFS}@includedir@
+libdir=${KRB5INAFS}@libdir@
+rlibdir=@libdir@
  CC_LINK='@CC_LINK@'
  KRB4_LIB=@KRB4_LIB@
  DES425_LIB=@DES425_LIB@
@@ -174,7 +175,7 @@
      # Ugly gross hack for our build tree
      lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
             -e 's/\$(PURE)//' \
-           -e 's#\$(PROG_RPATH)#'$libdir'#' \
+           -e 's#\$(PROG_RPATH)#'$rlibdir'#' \
             -e 's#\$(PROG_LIBPATH)#-L'$libdir'#' \
             -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
             -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \





-- 

  Douglas E. Engert  <DEEngert at anl.gov>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444


More information about the Kerberos mailing list