[24365] 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 (Mike Friedman)
Sun Jul 31 15:17:18 2005

Date: Sun, 31 Jul 2005 12:16:20 -0700 (PDT)
From: Mike Friedman <mikef@ack.berkeley.edu>
To: Russ Allbery <rra@stanford.edu>
In-Reply-To: <874qaa4yd9.fsf@windlord.stanford.edu>
Message-ID: <20050731120937.W22464@malcolm.berkeley.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
cc: kerberos@mit.edu
Errors-To: kerberos-bounces@mit.edu

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 31 Jul 2005 at 11:35 (-0700), Russ Allbery wrote:

>> Here's the Makefile I use to build my program:
>
>> krb5ver:
>>  	gcc -Wall -c -I/usr/local/kerberos/include krb5ver.c
>>  	gcc -o krb5ver krb5ver.o  -L/usr/local/kerberos/lib -lk5crypto -lkrb5 -lcom_err
>
> If you install libraries in a non-standard location that the dynamic 
> linker doesn't know about, you have to encode the path to the libraries 
> into the binary.  Adding -R/usr/local/kerberos/lib will probably fix the 
> problem.

Russ,

Thanks, that fixed it!  I must say, I didn't even know about the -R option 
to gcc and can't find it in the gcc man page.  What does -R do anyway?

I had just assumed that the '-L/usr/local/kerberos/lib' would be 
sufficient to tell the linker where to find the libraries.  Why did only 
libk5crypto have a problem and not, for example, libkrb5?

(My knowledge about linking is clearly inadequate).

Thanks again.

Mike

_____________________________________________________________________
Mike Friedman                   System and Network Security
mikef@ack.Berkeley.EDU          2484 Shattuck Avenue
1-510-642-1410                  University of California at Berkeley
http://ack.Berkeley.EDU/~mikef  http://security.berkeley.edu
_____________________________________________________________________

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBQu0jiK0bf1iNr4mCEQLbngCgg1DINvnK6cyVnMouyojG1v1z1QcAn0hb
vtB/gshqU1KzA+KeUb7ZJJyF
=rUAV
-----END PGP SIGNATURE-----
________________________________________________
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