The rpm for 'libpcap' in RedHat Linux 6.0 and 5.2 has an
issue with header file locations. The man page for 'pcap'
clearly indicates "#include <pcap.h>" implying that the
file should be located in the standard include path.
The rpm installation places 'pcap.h' in /usr/include/pcap
directory, so the file isn't found. If you change your
source to "#include <pcap/pcap.h>" it still causes a
problem because 'pcap.h' has a line "#include <net/bpf.h>"
and that file can't be found.
Back in PowerTools 5.1, the libpcap rpm properly installed
pcap.h in /usr/include and bpf.h in /usr/include/net and
things worked fine (the way the authors intended).
There is no SRPM for libpcap (another issue) so I cannot
submit a patch to the SPEC file.
My recommeded resolution is that the rpm for 'libpcap' needs
to install all header files under the /usr/include tree,
and not create a new /usr/include/pcap directory to place
Tcpdump contains libpcap so I'm changing the component
When will there be a fixed libpcap package be made available?
Change whatever program you are compiling to include
"-I/usr/include/pcap" -- that will work no matter where
pcap.h ends up.
At the moment, I suspect the fix will be to change the documentation
and to install bpf.h in /usr/include/pcap as well ...
*** Bug 4173 has been marked as a duplicate of this bug. ***
This is technically NOT a net-tools bug report, but:
libpcap rpm does not have include files, libpcap-devel
does not exist and finally - libpcap entry is missing
from Bugzilla component selector on "enter Bug" page.
(It does exist on query page.)
tcpdump does not depend on libpcap rpm being installed -
it is apparently linked statically.
Wrong location for include files screwd up 'configure' script
for at least some programs, so "-I/usr/include/pcap" fix does not
So, my solution is to uninstall libpcap rpm and compile the thing
Your configuration problem is best resolved by doing
ln -s pcap/pcap.h
ln -s ../pcap/net/bpf.h net/bpf.h
Otherwise, adding -I/usr/include/pcap to the compile flags will find
pcap.h and net/bpf.h for the handful of programs that need to
compile against libpcap.
Commit pushed to master at https://github.com/openshift/openshift-docs
Merge pull request #3386 from bfallonf/maven_issue3368
Issue 3368 Commented out maven section