bro build fails when pulled from git

Description

If a package is missing the configure step should find it.

I am getting this error on a fresh checkout:

git clone --recursive
cd bro
./configure --enable-debug

make[3]: Entering directory `/work/jpd/dyn/src/bro-fork/bro/build'
[ 20%] Building CXX object src/analyzer/protocol/bittorrent/CMakeFs/plugin-Bro-BitTorrent.dir/BitTorrent.cc.o
In file included from /work/jpd/dyn/src/bro-fork/bro/src/Net.h:12:0,
from /work/jpd/dyn/src/bro-fork/bro/src/RuleMatcher.h:15,
from /work/jpd/dyn/src/bro-fork/bro/src/Conn.h:13,
from /work/jpd/dyn/src/bro-fork/bro/src/analyzer/protocol/tcp/TCP.h:11,
from /work/jpd/dyn/src/bro-fork/bro/src/analyzer/protocol/bittorrent/BitTorrent.h:6,
from /work/jpd/dyn/src/bro-fork/bro/src/analyzer/protocol/bittorrent/BitTorrent.cc:3:
/work/jpd/dyn/src/bro-fork/bro/src/iosource/PktSrc.h: In constructor ‘iosource:ktSrc:roperties:roperties()’:
/work/jpd/dyn/src/bro-fork/bro/src/iosource/PktSrc.h:272:14: error: ‘PCAP_NETMASK_UNKNOWN’ was not declared in this scope
netmask = PCAP_NETMASK_UNKNOWN;

Environment

None

Activity

Show:
jdonnelly
January 28, 2015, 6:32 PM

root@dyn-x64-01:/work/jpd/dyn/src/bro-fork/bro# grep PCAP build/CMakeCache.txt
PCAP_INCLUDE_DIRATH=/usr/local/include
PCAP_LIBRARY:FILEPATH=/usr/local/lib/libpcap.a
PCAP_ROOT_DIRATH=/usr/local
//Details about finding PCAP
FIND_PACKAGE_MESSAGE_DETAILS_PCAP:INTERNAL=/usr/local/lib/libpcap.a/usr/local/include[v()]
HAVE_LIBPCAP_PCAP_FREECODE:INTERNAL=1
HAVE_PCAP_INT_H:INTERNAL=
//Test LIBPCAP_PCAP_COMPILE_NOPCAP_HAS_ERROR_PARAMETER
LIBPCAP_PCAP_COMPILE_NOPCAP_HAS_ERROR_PARAMETER:INTERNAL=
//Test LIBPCAP_PCAP_COMPILE_NOPCAP_NO_ERROR_PARAMETER
LIBPCAP_PCAP_COMPILE_NOPCAP_NO_ERROR_PARAMETER:INTERNAL=1
//ADVANCED property for variable: PCAP_INCLUDE_DIR
PCAP_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PCAP_LIBRARY
PCAP_LIBRARY-ADVANCED:INTERNAL=1
//Test PCAP_LINKS_SOLO
PCAP_LINKS_SOLO:INTERNAL=1
//ADVANCED property for variable: PCAP_ROOT_DIR
PCAP_ROOT_DIR-ADVANCED:INTERNAL=1

jdonnelly
January 28, 2015, 6:38 PM

Looks like it is picking up /usr/local

Jon Siwek
January 28, 2015, 6:45 PM

What version of libpcap is installed in /usr/local? I don't expect that came from the OS.

If it's actually the one you want, `./configure --with-pcap=/usr` should get it to use the standard one coming from the OS.

jdonnelly
January 28, 2015, 7:08 PM

removing /usr/local pcap files fixed it !

jdonnelly
January 28, 2015, 7:09 PM

using pcap installed from source ( in /usr/local/ ) was the problem.

Oops

Assignee

Unassigned

Reporter

jdonnelly

Labels

None

External issue ID

None

Components

Fix versions

Priority

Normal
Configure