My brain is already fried or I wouldn't be in this fix:-) Don't
apologize. 
I think there must be something wrong with the way I built libpcap. I
used the following:

export
PATH=/opt/SUNWspro/bin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/local/bin
make distclean
export CFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
export LD_LIBRARY_PATH=/usr/local/lib
export CC=cc
./configure 
make shared

When I run ldd on the shared library object this produces I get no
output:

# ls -l libpcap.so.0.9.5 
-rwxr-xr-x 1 root root 232562 Feb 22 14:51 libpcap.so.0.9.5
[EMAIL PROTECTED] /apps/freeware/installed/libpcap-0.9.5
 # ldd libpcap.so.0.9.5 
[EMAIL PROTECTED] /apps/freeware/installed/libpcap-0.9.5

I think the output of file looks OK:

# file libpcap.so.0.9.5 
libpcap.so.0.9.5:       ELF 32-bit MSB dynamic lib SPARC32PLUS Version
1, V8+ Required, dynamically linked, not stripped

Shouldn't the ldd command show something?

-Jim 

-----Original Message-----
From: Noyes, Christopher A. [mailto:[EMAIL PROTECTED] 
Sent: February 22, 2007 2:50 PM
To: Lane, Jim
Subject: RE: [Ntop] problem compiling ntop 3.2 on Solaris 10

Please forgive me if this is a dumb question (afternoons tend to fry my
brain), but you did actually compile libpcap from source (using make
shared), right?  Because simply renaming libpcap.a will not work.  I
noticed
from your note below just now that when you did ls -l
/usr/local/lib/libpcap.* you didn't show both the shared and static
library.

-CN

-----Original Message-----
From: Lane, Jim [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 22, 2007 2:40 PM
To: Noyes, Christopher A.
Cc: [email protected]
Subject: RE: [Ntop] problem compiling ntop 3.2 on Solaris 10


I'd already thought of that:

# crle

Configuration file [version 4]: /var/ld/ld.config  
  Default Library Path (ELF):   /lib:/usr/lib:/usr/local/lib
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system
default)

Command line:
  crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/local/lib


-Jim

-----Original Message-----
From: Noyes, Christopher A. [mailto:[EMAIL PROTECTED] 
Sent: February 22, 2007 2:38 PM
To: Lane, Jim
Subject: RE: [Ntop] problem compiling ntop 3.2 on Solaris 10

Don't use LD_LIBRARY_PATH; use crle

/usr/local/lib and (usually) /usr/local/ssl/lib should be in there.  

So you would have to something like crle -l
/usr/local/lib:/usr/local/ssl/lib:/usr/lib:/lib (add more if you have
stuff
in /opt/sfw)

-CN


-----Original Message-----
From: Lane, Jim [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 22, 2007 2:33 PM
To: Noyes, Christopher A.
Cc: [email protected]
Subject: RE: [Ntop] problem compiling ntop 3.2 on Solaris 10


CN: well, that has changed the error but still no dice. I have a shared
library as follows:

# ls -l /usr/local/lib/libpcap.*
-rwxr-xr-x 1 root root 232562 Feb 22 12:43
/usr/local/lib/libpcap.so.0.9.5

When I run the configure script now I'm getting errors as follows:

configure:24362: checking for pcap_open_live in -lpcap
configure:24392: gcc -o conftest -g -O2 -I/usr/local/include -Wshadow
-Wpointer-arith -Wmissing-prototypes -Wmissing-declarat
ions -Wnested-externs  -fPIC -DPIC  -DSOLARIS -I/usr/local/include
-L/usr/local/lib conftest.c -lpcap   -lpcap >&5
ld: fatal: library -lpcap: not found
ld: fatal: library -lpcap: not found
ld: fatal: File processing errors. No output written to conftest

Should the -lpcap flag be pointing to my shared library? Do I need to
set LD_LIBRARY_PATH or anything like that? 

-Jim

-----Original Message-----
From: Noyes, Christopher A. [mailto:[EMAIL PROTECTED] 
Sent: February 22, 2007 2:21 PM
To: Lane, Jim
Subject: RE: [Ntop] problem compiling ntop 3.2 on Solaris 10

You need a shared library, not a static one for NTOP (libpcap.0.9.5.so
for
example).  Compile libpcap from source but instead of doing "make" do a
"make shared".  After that is done and you've done a "make install",
you'll
need to manually copy the shared library (the .so file) to
/usr/local/lib.

-CN


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Lane, Jim
Sent: Thursday, February 22, 2007 1:12 PM
To: [email protected]
Subject: [Ntop] problem compiling ntop 3.2 on Solaris 10


Hi, All 

I'm having troubles trying to compile ntop 3.2 on Solaris 10. It doesn't
want to work with any version of libpcap I've been able to install. When
I run the configure script I get error messages as follows:

checking for pcap... 
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking net/bpf.h usability... yes
checking net/bpf.h presence... yes
checking for net/bpf.h... yes
checking pcap-bpf.h usability... yes
checking pcap-bpf.h presence... yes
checking for pcap-bpf.h... yes
checking for pcap_open_live in -lpcap... no
checking for pcap_findalldevs in -lpcap... no

*******************************************************************
*
* ERROR: pcap header, bpf or library routines are missing
*           (yes means it was found, no means it was not found)
*
*              pcap.h...yes
*              net/bpf.h...yes
*              pcap-bpf.h...yes
*              pcap_open_live() in -lpcap...no
*              pcap_findalldevs() in -lpcap...no
*
*  (One of the bpf files is required, but either will do)
*
*>>> No way to proceed.
*
*???     1. Install libpcap (http://www.tcpdump.org/)
*???    and Rerun ./configure
*???  or 2. Use the --with-pcap-root= option

It does the same thing using using both gcc and the Sun Studio 11
compiler, both GNU ld and Sun's ld. I've tried both 0.9.4 and 0.9.5 of
libpcap both compiled from source and binaries from sunfreeware.com. 

I looked in the config.log file and I see error messages as follows:

configure:24392: gcc -o conftest -g -I/usr/local/include
-I/usr/local/include -g -Wshadow -Wpointer-arith -Wmissing-prototype
s -Wmissing-declarations -Wnested-externs  -fPIC -DPIC  -DSOLARIS
-I/usr/local/include -I/usr/local/include -L/usr/local/lib
-L/usr/local/lib -L/usr/local/lib conftest.c -lpcap   -lpcap >&5
Undefined                       first referenced
 symbol                             in file
getservbyname
/usr/local/lib/libpcap.a(nametoaddr.o)
ether_hostton
/usr/local/lib/libpcap.a(nametoaddr.o)
gethostbyname
/usr/local/lib/libpcap.a(nametoaddr.o)
socket                              /usr/local/lib/libpcap.a(inet.o)
getprotobyname
/usr/local/lib/libpcap.a(nametoaddr.o)
getnetbyname
/usr/local/lib/libpcap.a(nametoaddr.o)
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status

The environment I'm using to do the configure is as follows:

export PATH=/usr/local/bin:/usr/bin:/usr/sfw/bin:/usr/ccs/bin
export CFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
export LD_LIBRARY_PATH=/usr/local/lib
export CC=gcc
..../configure --with-pcap-root=/usr/local --enable-static-plugins

I'm sure I'm doing something wrong here, if only I knew what that was. 

Regards,

-Jim
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to