Skip Menu |
 

Date: Sat, 27 Feb 2010 19:50:20 -0500
Subject: login.c:(.text+0x281): undefined reference to `crypt
From: steve paesani <spaesani@gmail.com>
To: krb5-bugs@mit.edu
make error:
login.c:(.text+0x281): undefined reference to `crypt

I've tried modifying the Makefile where the code in question is 'cclinked':
-L./lib
no success
-l:/usr/local/lib/libcrypto.so
no success
-l:/usr/local/lib/libcrypto.a
no success
-l/usr/local/lib
redundant, yes. no success.

I would need some help identifying which library needs to be linked.

ps
login.c refers to crypt with two different signatures:
char* crypt();
and 
... crypt(args....);
this passes compilation yet I don't know what affect, if any, this has on linking. If someone could give me a heads up on the two different crypt references in login.c that would be nice, thanks.

Thanks,
Steve
Subject: Re: [krbdev.mit.edu #6671] login.c:(.text+0x281): undefined reference to `crypt
From: Ken Raeburn <raeburn@MIT.EDU>
Date: Mon, 1 Mar 2010 10:01:21 -0500
To: rt@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.1KiB
On Mar 1, 2010, at 04:18, steve paesani via RT wrote:
Show quoted text
> make error:
> login.c:(.text+0x281): undefined reference to `crypt
>
> I've tried modifying the Makefile where the code in question is 'cclinked':
> -L./lib
> no success
> -l:/usr/local/lib/libcrypto.so
> no success
> -l:/usr/local/lib/libcrypto.a
> no success
> -l/usr/local/lib
> redundant, yes. no success.
>
> I would need some help identifying which library needs to be linked.
>
> ps
> login.c refers to crypt with two different signatures:
> char* crypt();
> and
> ... crypt(args....);
> this passes compilation yet I don't know what affect, if any, this has on
> linking. If someone could give me a heads up on the two different crypt
> references in login.c that would be nice, thanks.

The crypt function is the traditional way of generating the hashed-password strings in /etc/passwd (or, these days, /etc/shadow). It's used in login.c to allow logins based on local passwords in addition to Kerberos passwords. Usually that function is in the standard C library; you don't say what type of OS you're on, but perhaps it's in another library there?

Ken


--
Ken Raeburn / raeburn@mit.edu / no longer at MIT Kerberos Consortium
No response from requestor; probably an OS configuration issue.