You can't get away from it, because crypt() is used to store the passwords
in ntop_pw.db...

the 1st test is the basic library set, then it tests -lc (libc.so) and
then -lcrypt (libcrypt.so).

[bstrauss@tigger ntop-current]$ gcc -o x -g -O2 -pipe x.c -ldl
/tmp/cc8G58rB.o: In function `main':
/home/ntop/ntop-current/x.c:17: undefined reference to `crypt'
collect2: ld returned 1 exit status

[bstrauss@tigger ntop-current]$ gcc -o x -g -O2 -pipe x.c -ldl -lc
/tmp/cc0ScRkS.o: In function `main':
/home/ntop/ntop-current/x.c:17: undefined reference to `crypt'
collect2: ld returned 1 exit status

[bstrauss@tigger ntop-current]$ gcc -o x -g -O2 -pipe x.c -ldl -lcrypt

**success**

(Assuming Linux), ld looks in the "trusted" libraries, /usr/lib and /lib
followed by whatever is specified in the /etc/ld.so.conf files - check the
man pages on ld.so and ldconfig...

It *sounds* like you don't have crypt configured properly...

Now in my case, libcrypt.so is actually a link to libcrypto:

[bstrauss@tigger ntop-current]$ ls -l /usr/lib/libcrypt*
-rw-r--r--    1 root     root       114706 Apr  2 10:43 /usr/lib/libcrypt.a
-rw-r--r--    1 root     root      1475000 Sep  7  2001 /usr/lib/libcrypto.a
lrwxrwxrwx    1 root     root           29 Feb 11 02:01
/usr/lib/libcrypto.so -> ../../lib/libcrypto.so.0.9.6b
-rw-r--r--    1 root     root       115038 Apr  2 10:43
/usr/lib/libcrypt_p.a
lrwxrwxrwx    1 root     root           23 Apr 25 17:00
/usr/lib/libcrypt.so -> ../../lib/libcrypt.so.1
[bstrauss@tigger ntop-current]$ ls -l /lib/libcrypt*
-rwxr-xr-x    1 root     root        85143 Apr  2 10:43
/lib/libcrypt-2.2.4.so
-rwxr-xr-x    1 root     root       918752 Sep  7  2001
/lib/libcrypto.so.0.9.6b
lrwxrwxrwx    1 root     root           19 Feb 11 01:18
/lib/libcrypto.so.2 -> libcrypto.so.0.9.6b
lrwxrwxrwx    1 root     root           17 Apr 25 17:00
/lib/libcrypt.so.1 -> libcrypt-2.2.4.so
[bstrauss@tigger ntop-current]$

So, check your files - do the ls -l, not just a find - perhaps you have a
bad link??

-----Burton


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Fenn
Rider
Sent: Thursday, June 06, 2002 1:15 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [Ntop] configure script cannot find crypt


Here is what I get:

[root@chaos ntop]# find / -name *libcrypt*
/usr/lib/libcrypto.so.0
/usr/lib/libcrypto.so.0.9.6
/usr/lib/libcrypt.a
/usr/lib/libcrypt.so
/usr/src/usr/lib/libcrypt.a
/lib/libcrypt-2.2.4.so
/lib/libcrypt.so.1
[root@chaos ntop]# ldd /usr/lib/libcrypt.so
        libc.so.6 => /lib/libc.so.6 (0x4001c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

The crypt.h file is under /usr/include/

The configure script is finding the crypt.h file, apparently, then failing
at the first crypt check, and also the second and third, before exiting. The
results of those check in config.log look like the text below (not sure what
information here will point me in the right direction). the script was also
not able to find my libncurses without the --enable-curses option. Is there
a similar option for crypt?

configure:3744: checking for crypt
configure:3772: gcc -o conftest -g -O2 -pipe   conftest.c -ldl  1>&5
/root/tmp/ccgSefrD.o: In function `main':
/usr/src/ntop/configure:3766: undefined reference to `crypt'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3749 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char crypt(); below.  */
#include <assert.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() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_crypt) || defined (__stub___crypt)
choke me
#else
crypt();
#endif

; return 0; }
configure:3790: checking for crypt in -lc
configure:3809: gcc -o conftest -g -O2 -pipe   conftest.c -lc  -ldl  1>&5
/root/tmp/cc9HNeIL.o: In function `main':
/usr/src/ntop/configure:3805: undefined reference to `crypt'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3798 "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:3835: checking for crypt in -lcrypt
configure:3854: gcc -o conftest -g -O2 -pipe   conftest.c -lcrypt
-L/usr/lib/mysql -lmysqlclient -ldl  1>&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 3843 "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; }

-----Original Message-----
From: Burton M. Strauss III [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 10:59 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [Ntop] configure script cannot find crypt


It means that in the set of include libraries it couldn't find the
definition of the function crypt.

confdefs.h is created by ./configure instead of trying to put it all on the
command line.  It's the precursor to config.h - no worries

Look in config.log to see WHICH test for crypt blew up - it tries to find it
in a couple of (usual) places. E.g.:

configure:4046: checking for crypt
configure:4092: checking for crypt in -lc
configure:4137: checking for crypt in -lcrypt

Where/how did you install it?

With me, it looks like it's in two places (one of which is bogus):

[bstrauss@tigger ntop-current]$ locate libcrypt
/usr/lib/libcrypt.a
/usr/lib/libcrypt.so
/usr/lib/libcrypto.a
/usr/lib/libcrypto.so
/usr/lib/libcrypt_p.a
/lib/libcrypt-2.2.4.so
/lib/libcrypt.so.1
/lib/libcrypto.so.0.9.6b
/lib/libcrypto.so.2
[bstrauss@tigger ntop-current]$ ldd /usr/lib/libcrypt.so
        libc.so.6 => /lib/i686/libc.so.6 (0x40027000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[bstrauss@tigger ntop-current]$




-----Burton




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Fenn
Rider
Sent: Thursday, June 06, 2002 11:42 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [Ntop] configure script cannot find crypt


Hi, and thanks for responding.

My crypt.h appears to be in place. I found the exact problem in this mailing
list archive from 1 year ago. The suggested solution was to install glibc
with the glibc-crypt add-on. I tried that, to no avail. The config.log shows
the following:

configure:3744: checking for crypt
configure:3772: gcc -o conftest -g -O2 -pipe   conftest.c -ldl  1>&5
/root/tmp/ccuPQkPb.o: In function `main':
/usr/src/ntop/configure:3766: undefined reference to `crypt'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3749 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char crypt(); below.  */
#include <assert.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();

I am not sure what it means by an undefined reference to crypt. Any
suggestions?

-----Original Message-----
From: Burton M. Strauss III [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 1:45 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [Ntop] configure script cannot find crypt


Look in config.log to see what ./configure found when looking for crypt -
could be you're missing the header files (often those are in a -devel rpm if
you're running RedHat)

-----Burton



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Fenn
Rider
Sent: Wednesday, June 05, 2002 3:04 PM
To: '[EMAIL PROTECTED]'
Subject: [Ntop] configure script cannot find crypt


I am trying to install ntop, and the configure script cannot seem to find
the crypt library. I think I have it installed. Doing a find on *crypt*
shows this:

/usr/lib/libcrypto.so.0
/usr/lib/libcrypto.so.0.9.6
/usr/lib/libcrypt.a
/usr/lib/libcrypt.so
/lib/libcrypt-2.2.4.so
/lib/libcrypt.so.1

Do I need something else?

Fenn Rider
Director of IT
BridgePath, Inc
463 Bryant Street, 2nd Floor
San Francisco, CA 94107
Ph: 415-946-6003   Fax: 415-946-6001
[EMAIL PROTECTED]
<http://www.bridgepath.com/>

The BridgePath Exchange helps staffing firms reduce unfilled job orders and
unplaced candidates


_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop

Reply via email to