[24392] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Problem building an API program against 1.4.1

daemon@ATHENA.MIT.EDU (Douglas E. Engert)
Tue Aug 2 09:46:36 2005

Message-ID: <42EF781C.3080304@anl.gov>
Date: Tue, 02 Aug 2005 08:41:48 -0500
From: "Douglas E. Engert" <deengert@anl.gov>
MIME-Version: 1.0
To: Russ Allbery <rra@stanford.edu>
In-Reply-To: <87zms1cj1r.fsf@windlord.stanford.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
cc: kerberos@mit.edu
Errors-To: kerberos-bounces@mit.edu



Russ Allbery wrote:
> Ken Hornstein <kenh@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@anl.gov>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post