undefined reference to `crypt'

Pekka Viitasaari pjviitasaari at hotmail.com
Fri Jan 26 09:19:06 PST 2001


Hello everyone!

This is my first posting to this newsgroup.  LFS rocks!  I spent a year 
trying to do this kind of thing on my own and finally found this 
place...thank God!

166 Intel Pentium System with Caldera 2.2

Anyway, my first problem is to do with compiling sh-utils as follows:

gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I.. -I. 
-I../lib -I../intl    -g -O2 -c stty.c
gcc  -g -O2   -o stty  stty.o ../lib/libsu.a
rm -f groups groups-t
sed \
  -e 's!@''bindir''@!/usr/local/bin!' \
  -e 's/@''GNU_PACKAGE''@/GNU sh-utils/' \
  -e 's/@''VERSION''@/2.0/' groups.sh > groups-t
chmod +x groups-t
mv groups-t groups
rm -f nohup nohup-t
sed \
  -e 's!@''bindir''@!/usr/local/bin!' \
  -e 's/@''GNU_PACKAGE''@/GNU sh-utils/' \
  -e 's/@''VERSION''@/2.0/' nohup.sh > nohup-t
chmod +x nohup-t
mv nohup-t nohup
gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I.. -I. 
-I../lib -I../intl    -g -O2 -c su.c
gcc  -g -O2   -o su  su.o ../lib/libsu.a
su.o: In function `correct_password':
/mnt/lfs/usr/src/sh-utils-2.0/src/su.c:296: undefined reference to `crypt'
make[2]: *** [su] Error 1
make[2]: Leaving directory `/mnt/lfs/usr/src/sh-utils-2.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/lfs/usr/src/sh-utils-2.0'
make: *** [all-recursive-am] Error 2
[root at noname sh-utils-2.0]# cd /mnt/cdrom

The confiure script comes up like this:
configure:10299: checking for getspnam
configure:10328: gcc -o conftest -g -O2   conftest.c  1>&5
configure:10360: checking for library containing crypt
configure:10379: gcc -o conftest -g -O2   conftest.c  1>&5
/tmp/ccSGUuLe.o: In function `main':
/mnt/lfs/usr/src/sh-utils-2.0/configure:10375: undefined reference to 
`crypt'
configure: failed program was:
#line 10368 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char crypt();

int main() {
crypt()
; return 0; }
configure:10402: gcc -o conftest -g -O2   conftest.c -lufc   1>&5
/usr/i386-linux/bin/ld: cannot open -lufc: No such file or directory
configure: failed program was:
#line 10391 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char crypt();

int main() {
crypt()
; return 0; }
configure:10402: gcc -o conftest -g -O2   conftest.c -lcrypt   1>&5
/usr/i386-linux/bin/ld: cannot open -lcrypt: No such file or directory
configure: failed program was:
#line 10391 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char crypt();

int main() {
crypt()
; return 0; }
configure:10434: checking for inline
configure:10448: gcc -c -g -O2  conftest.c 1>&5

The crypt header is on my normal system but the library is not and I cannot 
find any RPMs with the crypt libraries.  Does this mean I have to 
compile/install glibc2 onto my normal system?  Or, is there a way I can use 
the crypt library that is part of the LFS system so far?  Any suggestions 
would be greatly appreciated.

Best Regards, Peter
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list