Chris: thanks for getting back to me but I think I'm going to give up on
ntop. It can't possibly be worth the amount of grief it's putting me
through. Every other open source package out there I can just
configure/make/make install and that's it. 

This morning I installed binutils and re-did a "make shared" for
libpcap. However I'm still getting the same errors from the ntop
configure even if I specify -with-gnu-ld. 

configure:24435: checking for pcap_findalldevs in -lpcap
configure:24465: 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 -L/usr/local/lib -L/usr/local/lib conf
test.c -lpcap   -lpcap >&5
Undefined                       first referenced
 symbol                             in file
getservbyname                       /usr/local/lib/libpcap.so
ether_hostton                       /usr/local/lib/libpcap.so
gethostbyname                       /usr/local/lib/libpcap.so
socket                              /usr/local/lib/libpcap.so
getprotobyname                      /usr/local/lib/libpcap.so
getnetbyname                        /usr/local/lib/libpcap.so
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status 

I notice in the configure output the following:

checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no 

which tends to suggest that -with-gnu-ld isn't really doing anything. 

Perhaps somebody will sort out this dog's breakfast in due course:-) 

Thanks for you help.

-Jim

-----Original Message-----
From: Noyes, Christopher A. [mailto:[EMAIL PROTECTED] 
Sent: March 14, 2007 3:15 PM
To: Lane, Jim; Noyes, Christopher A.
Cc: [email protected]
Subject: RE: [Ntop] problem compiling ntop 3.2 on Solaris 10

Hello,

  Sorry for the late reply; kinda lost track of this email.
I've just setup a sunfire v210 with solaris 10.  I installed (from
sunfreeware.com) gcc 3.4.6, flex, bison, make, sed, etc.
I tried to build the shared libpcap library using Sun's LD and got the
error
you had below.  I built GNU's binary utilities from source (v2.11) and
tried
to do a 'make shared' for libpcap and it worked.  I tested this library
with
NTOPv3.2 and it works fine.  
On my Solaris 9 box I found that I did indeed have GNU LD on there
(which I
must have installed after getting the error below).
Not sure where you got with this but hopefully things will work out.

-Chris Noyes
 

-----Original Message-----
From: Lane, Jim [mailto:[EMAIL PROTECTED]
Sent: Friday, February 23, 2007 7:21 AM
To: Noyes, Christopher A.
Cc: [email protected]
Subject: RE: [Ntop] problem compiling ntop 3.2 on Solaris 10


OK, I've tried libpcap as per your suggestion and now I'm getting errors
as follows: 

ld -shared -o libpcap.so.`cat VERSION` pcap-dlpi.o fad-glifc.o pcap.o
inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o
bpf_filter.o bpf_image.o bpf_dump.o  scanner.o grammar.o version.o 
ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
make: *** [libpcap.so] Error 1

I'm not sure what this -h is or where it's coming from. Sun's ld doesn't
seem to like it. GNU ld takes it but produces the bogus shared library
(ie. no ldd output) mentioned earlier. 

Are you doing this on Solaris 10? I wonder if that makes a difference. 

-Jim

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

OK, not sure where all your software is (I don't use Sun Studio).  I
have
all the non solaris stuff under /usr/local.
My path is set as
/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/bin:/usr/sbin
This way I am sure the only the GNU tools are used (except for ld; I use
the
sun one with gcc 3.4.6).
To build libpcap I did:  ./configure
make shared
make install
cp libpcap.so.0.9.5 /usr/local/lib
ln -s /usr/local/lib/libpcap.so.0.9.5 /usr/local/lib/libpcap.so


I am using gcc 3.4.6
libtool 1.5
gnu sed
gnu pkg-config
the core utils from sunfreeware.com


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


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