Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: NTop: Users

Ntop make fails with undefined reference to pcap_parse

 

 

NTop users RSS feed   Index | Next | Previous | View Threaded


chj at chj

Jul 30, 2009, 5:11 PM

Post #1 of 6 (2544 views)
Permalink
Ntop make fails with undefined reference to pcap_parse

Hi ntop! This is my first post, I hope this is on topic!

I have a small problem with "make" with ntop on a Debian 5.0.2 with
PF_RING. The solution might very well be trivial, but I just can't figure
out why it fails.

First, for installation advice for PF_RING, I've loosely followed this
link (As the howto above is a bit old, I use libpcap1.0 instead of
0.9.4.):

http://www.bjou.de/blog/2006/12/advanced-packet-capturing-howto-pf_ring-napi-and-extended-libpcap-on-debian-sarge/

After completing the PF_RING part and booting into the new kernel, PF_RING
seems to be installed correct:

# ./pfcount –i eth1
#
# =========================
# Absolute Stats: [328930 pkts rcvd][0 pkts dropped]
# Total Pkts=328930/Dropped=0.0 %
# 328930 pkts - 247229098 bytes [25108.2 pkt/sec - 150.97 Mbit/sec]
# =========================
# Actual Stats: 23337 pkts [1003.7 ms][23250.0 pkt/sec]
# =========================

And as the howto specifies, I find both ring and pcap in ldconfig:

# ldconfig -v |grep pfring
# libpfring.so.0.9.4 -> libpfring.so.0.9.4

# ldconfig -v |grep pcap
# libpcap.so.1.0.0 -> libpcap.so.1.0.0

So far so good!

For ntop install, I do the following:

# ./autogen.sh --noconfig
# ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib
-lpfring -lpcap -lpthread"
# make
# make install

(note that the howto does not include the -lpthread, but without this
string, configure fails)

./configure works without any warnings or errors, but when I try "make",
it faults after a few seconds with the following, please see pasted output
below:

### start paste ###

root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/
-L/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs/ -lGeoIP -L/usr/local/lib
-lpfring -lpcap -lpthread -L/usr/local/lib -L/opt/local/lib -o ntop
ntop-main.o ntop-admin.o libntopreport.la libntop.la
-L/root/ntop-3.3.10/lua-5.1.4/src -llua -lpthread -lcrypt -lc -lssl
-lcrypto -lrrd_th -levent -lgdbm -lz -L/usr/local/lib -lpcap

gcc -g -O2 -I/usr/local/include -I/opt/local/include -Wshadow
-Wpointer-arith -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -fPIC -DPIC -I/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/ -o
.libs/ntop ntop-main.o ntop-admin.o
-L/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs/
/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs//libGeoIP.so -L/usr/local/lib
-lpfring -L/opt/local/lib ./.libs/libntopreport.so ./.libs/libntop.so
-L/root/ntop-3.3.10/lua-5.1.4/src -llua -lpthread -lcrypt -lc -lssl
-lcrypto /usr/lib/librrd_th.so -levent /usr/lib/libgdbm.so -lz -lpcap

./.libs/libntop.so: undefined reference to `pcap_parse'
collect2: ld returned 1 exit status
make[2]: *** [ntop] Error 1
make[2]: Leaving directory `/root/ntop-3.3.10'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ntop-3.3.10'
make: *** [all] Error 2

### stop paste ###

The file .libs/libntop.so is a binary, but I assume it reads the
.libs/libntop.la that has the following text regarding "pcap_parse":

### start paste ###

# Directory that this library needs to be installed in:
libdir='/usr/local/lib'
relink_command="(cd /root/ntop-3.3.10; /bin/sh ./libtool --tag=CC
--mode=relink gcc -g -O2 -I/usr/local/include -I/opt/local/include
-Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -fPIC -DPIC -I/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/
-release 3.3.10 -export-dynamic
-L/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs/ -lGeoIP -L/usr/local/lib
-lpfring -lpcap -lpthread -L/usr/local/lib -L/opt/local/lib -o libntop.la
-rpath /usr/local/lib address.lo argv.lo dataFormat.lo fcUtils.lo
globals-core.lo hash.lo iface.lo initialize.lo l7.lo leaks.lo ntop.lo
pbuf.lo database.lo plugin.lo prefs.lo protocols.lo sessions.lo term.lo
util.lo utildl.lo traffic.lo vendor.lo version.lo ntop_darwin.lo
-L/root/ntop-3.3.10/lua-5.1.4/src -llua -lpthread -lcrypt -lc -lssl
-lcrypto -lrrd_th -levent -lgdbm -lz -L/usr/local/lib @inst_prefix_dir@)"

### stop paste ###

I can't find any good links on this issue, the only problem I might guess
is that libpfring and libpcap is different versions, but I could find no
information about this being a problem.

Any ideas or advice would be greatly appriciated.

Thanks!

--
Christian Jacobsen

_______________________________________________
Ntop mailing list
Ntop [at] unipi
http://listgateway.unipi.it/mailman/listinfo/ntop


Ggatten at waddell

Jul 30, 2009, 5:21 PM

Post #2 of 6 (2449 views)
Permalink
Re: Ntop make fails with undefined reference to pcap_parse [In reply to]

Good question, and sounds like you've done some work. Have you tried to build without pfring and just use libpcap? I'd be curious to see if it works.

----- Original Message -----
From: ntop-bounces [at] unipi <ntop-bounces [at] unipi>
To: ntop [at] unipi <ntop [at] unipi>
Sent: Thu Jul 30 19:11:19 2009
Subject: [Ntop] Ntop make fails with undefined reference to pcap_parse

Hi ntop! This is my first post, I hope this is on topic!

I have a small problem with "make" with ntop on a Debian 5.0.2 with
PF_RING. The solution might very well be trivial, but I just can't figure
out why it fails.

First, for installation advice for PF_RING, I've loosely followed this
link (As the howto above is a bit old, I use libpcap1.0 instead of
0.9.4.):

http://www.bjou.de/blog/2006/12/advanced-packet-capturing-howto-pf_ring-napi-and-extended-libpcap-on-debian-sarge/

After completing the PF_RING part and booting into the new kernel, PF_RING
seems to be installed correct:

# ./pfcount –i eth1
#
# =========================
# Absolute Stats: [328930 pkts rcvd][0 pkts dropped]
# Total Pkts=328930/Dropped=0.0 %
# 328930 pkts - 247229098 bytes [25108.2 pkt/sec - 150.97 Mbit/sec]
# =========================
# Actual Stats: 23337 pkts [1003.7 ms][23250.0 pkt/sec]
# =========================

And as the howto specifies, I find both ring and pcap in ldconfig:

# ldconfig -v |grep pfring
# libpfring.so.0.9.4 -> libpfring.so.0.9.4

# ldconfig -v |grep pcap
# libpcap.so.1.0.0 -> libpcap.so.1.0.0

So far so good!

For ntop install, I do the following:

# ./autogen.sh --noconfig
# ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib
-lpfring -lpcap -lpthread"
# make
# make install

(note that the howto does not include the -lpthread, but without this
string, configure fails)

./configure works without any warnings or errors, but when I try "make",
it faults after a few seconds with the following, please see pasted output
below:

### start paste ###

root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/
-L/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs/ -lGeoIP -L/usr/local/lib
-lpfring -lpcap -lpthread -L/usr/local/lib -L/opt/local/lib -o ntop
ntop-main.o ntop-admin.o libntopreport.la libntop.la
-L/root/ntop-3.3.10/lua-5.1.4/src -llua -lpthread -lcrypt -lc -lssl
-lcrypto -lrrd_th -levent -lgdbm -lz -L/usr/local/lib -lpcap

gcc -g -O2 -I/usr/local/include -I/opt/local/include -Wshadow
-Wpointer-arith -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -fPIC -DPIC -I/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/ -o
.libs/ntop ntop-main.o ntop-admin.o
-L/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs/
/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs//libGeoIP.so -L/usr/local/lib
-lpfring -L/opt/local/lib ./.libs/libntopreport.so ./.libs/libntop.so
-L/root/ntop-3.3.10/lua-5.1.4/src -llua -lpthread -lcrypt -lc -lssl
-lcrypto /usr/lib/librrd_th.so -levent /usr/lib/libgdbm.so -lz -lpcap

./.libs/libntop.so: undefined reference to `pcap_parse'
collect2: ld returned 1 exit status
make[2]: *** [ntop] Error 1
make[2]: Leaving directory `/root/ntop-3.3.10'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ntop-3.3.10'
make: *** [all] Error 2

### stop paste ###

The file .libs/libntop.so is a binary, but I assume it reads the
.libs/libntop.la that has the following text regarding "pcap_parse":

### start paste ###

# Directory that this library needs to be installed in:
libdir='/usr/local/lib'
relink_command="(cd /root/ntop-3.3.10; /bin/sh ./libtool --tag=CC
--mode=relink gcc -g -O2 -I/usr/local/include -I/opt/local/include
-Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -fPIC -DPIC -I/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/
-release 3.3.10 -export-dynamic
-L/root/ntop-3.3.10/GeoIP-1.4.6/libGeoIP/.libs/ -lGeoIP -L/usr/local/lib
-lpfring -lpcap -lpthread -L/usr/local/lib -L/opt/local/lib -o libntop.la
-rpath /usr/local/lib address.lo argv.lo dataFormat.lo fcUtils.lo
globals-core.lo hash.lo iface.lo initialize.lo l7.lo leaks.lo ntop.lo
pbuf.lo database.lo plugin.lo prefs.lo protocols.lo sessions.lo term.lo
util.lo utildl.lo traffic.lo vendor.lo version.lo ntop_darwin.lo
-L/root/ntop-3.3.10/lua-5.1.4/src -llua -lpthread -lcrypt -lc -lssl
-lcrypto -lrrd_th -levent -lgdbm -lz -L/usr/local/lib @inst_prefix_dir@)"

### stop paste ###

I can't find any good links on this issue, the only problem I might guess
is that libpfring and libpcap is different versions, but I could find no
information about this being a problem.

Any ideas or advice would be greatly appriciated.

Thanks!

--
Christian Jacobsen

_______________________________________________
Ntop mailing list
Ntop [at] unipi
http://listgateway.unipi.it/mailman/listinfo/ntop





<font size="1">
<div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in'>
</div>
"This email is intended to be reviewed by only the intended recipient
and may contain information that is privileged and/or confidential.
If you are not the intended recipient, you are hereby notified that
any review, use, dissemination, disclosure or copying of this email
and its attachments, if any, is strictly prohibited. If you have
received this email in error, please immediately notify the sender by
return email and delete this email from your system."
</font>


chj at chj

Jul 30, 2009, 6:05 PM

Post #3 of 6 (2434 views)
Permalink
Re: Ntop make fails with undefined reference to pcap_parse [In reply to]

> Good question, and sounds like you've done some work. Have you tried to
> build without pfring and just use libpcap? I'd be curious to see if it
> works.


Thank you for your reply!

I hope I didn't misunderstand, I tried now to configure with these settings:

# ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib
-lpfring -lpcap -lpthread"

and simply just

# ./configure

But unfortunately it still fails with the same error as before:

# ./.libs/libntop.so: undefined reference to `pcap_parse'
# collect2: ld returned 1 exit status
# make[2]: *** [ntop] Error 1
# make[2]: Leaving directory `/root/ntop-3.3.10'
# make[1]: *** [all-recursive] Error 1
# make[1]: Leaving directory `/root/ntop-3.3.10'
# make: *** [all] Error 2



Again, thanks for all help



--
Christian Jacobsen


_______________________________________________
Ntop mailing list
Ntop [at] unipi
http://listgateway.unipi.it/mailman/listinfo/ntop


Ggatten at waddell

Jul 30, 2009, 6:14 PM

Post #4 of 6 (2449 views)
Permalink
Re: Ntop make fails with undefined reference to pcap_parse [In reply to]

Hmmmm. What OS? Sometimes there build issues on the less popular OS's such as BSD and Solaris, but flavors of Linux are usually ok.

Maybe try fetching the source again and simply run autogen.sh with no args. Try build from scratch with no args, except of course the one required for your OS, like rrdtool dir.

----- Original Message -----
From: ntop-bounces [at] unipi <ntop-bounces [at] unipi>
To: ntop [at] unipi <ntop [at] unipi>
Sent: Thu Jul 30 20:05:55 2009
Subject: Re: [Ntop] Ntop make fails with undefined reference to pcap_parse

> Good question, and sounds like you've done some work. Have you tried to
> build without pfring and just use libpcap? I'd be curious to see if it
> works.


Thank you for your reply!

I hope I didn't misunderstand, I tried now to configure with these settings:

# ./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib
-lpfring -lpcap -lpthread"

and simply just

# ./configure

But unfortunately it still fails with the same error as before:

# ./.libs/libntop.so: undefined reference to `pcap_parse'
# collect2: ld returned 1 exit status
# make[2]: *** [ntop] Error 1
# make[2]: Leaving directory `/root/ntop-3.3.10'
# make[1]: *** [all-recursive] Error 1
# make[1]: Leaving directory `/root/ntop-3.3.10'
# make: *** [all] Error 2



Again, thanks for all help



--
Christian Jacobsen


_______________________________________________
Ntop mailing list
Ntop [at] unipi
http://listgateway.unipi.it/mailman/listinfo/ntop





<font size="1">
<div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in'>
</div>
"This email is intended to be reviewed by only the intended recipient
and may contain information that is privileged and/or confidential.
If you are not the intended recipient, you are hereby notified that
any review, use, dissemination, disclosure or copying of this email
and its attachments, if any, is strictly prohibited. If you have
received this email in error, please immediately notify the sender by
return email and delete this email from your system."
</font>


chj at chj

Jul 30, 2009, 8:48 PM

Post #5 of 6 (2448 views)
Permalink
Re: Ntop make fails with undefined reference to pcap_parse [In reply to]

> Hmmmm. What OS? Sometimes there build issues on the less popular OS's such
> as BSD and Solaris, but flavors of Linux are usually ok.
>
> Maybe try fetching the source again and simply run autogen.sh with no
> args. Try build from scratch with no args, except of course the one
> required for your OS, like rrdtool dir.

Debian 5.0.2

However, I now see that I do get the same error when I try to compile
snort, so I guess that I should probably try to redo the operation from
scratch.

I'll make sure to keep pcap and pf_ring at the same version number this time.

Thanks again! :-)

--
Christian Jacobsen


_______________________________________________
Ntop mailing list
Ntop [at] unipi
http://listgateway.unipi.it/mailman/listinfo/ntop


chj at chj

Jul 31, 2009, 8:04 PM

Post #6 of 6 (2445 views)
Permalink
Re: Ntop make fails with undefined reference to pcap_parse [In reply to]

>> Hmmmm. What OS? Sometimes there build issues on the less popular OS's
>> such
>> as BSD and Solaris, but flavors of Linux are usually ok.
>>
>> Maybe try fetching the source again and simply run autogen.sh with no
>> args. Try build from scratch with no args, except of course the one
>> required for your OS, like rrdtool dir.
>
> Debian 5.0.2
>
> However, I now see that I do get the same error when I try to compile
> snort, so I guess that I should probably try to redo the operation from
> scratch.

Success; I re-installed Debian and re-did everything and now it works --
clearly I must have typo'd something somewhere.

Thanks again :-)

--
Christian Jacobsen


_______________________________________________
Ntop mailing list
Ntop [at] unipi
http://listgateway.unipi.it/mailman/listinfo/ntop

NTop users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.