Bug 217794 - pcap-int.h of contrib/libpcap missing in /usr/include
Summary: pcap-int.h of contrib/libpcap missing in /usr/include
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-15 05:34 UTC by O. Hartmann
Modified: 2020-11-13 18:02 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2017-03-15 05:34:09 UTC
While trying to compile port 

security/dsniff

on a recent CURRENT (FreeBSD 12.0-CURRENT #18 r315187: Mon Mar 13 06:32:50 CET 2017 amd64) I ran into a compilation error due to a missing header file, see below.

I guess this PR is better with the main source list than ports, since taken from the error below, it's matter of the core system.

[...]
cc -O2 -pipe -O3  -fstack-protector -fno-strict-aliasing -D_BSD_SOURCE -DLIBNET_BSDISH_OS -DHAVE_SOCKADDR_SA_LEN -DDSNIFF_LIBDIR=\"/usr/local/lib/\" -I. -I/usr/local/include -I/usr/include/pcap -I/usr/local/include   -I/usr/local/include -c ./pcaputil.c
--- webmitm ---
cc -fstack-protector -o webmitm webmitm.o base64.o buf.o decode_http.o record.o -lrpcsvc  -L. -lmd -L/usr/local/lib -lnet  -lssl -lcrypto
--- webspy ---
cc -fstack-protector -o webspy webspy.o base64.o buf.o remote.o -lrpcsvc  -L. -lmd -L/usr/local/lib -lnids `pkg-config --libs gthread-2.0` -lpcap -L/usr/local/lib -lnet -L/usr/local/lib  -lSM -lICE -lXmu -lX11
--- pcaputil.o ---
./pcaputil.c:22:10: fatal error: '/usr/include/pcap-int.h' file not found
#include </usr/include/pcap-int.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** [pcaputil.o] Error code 1

make[2]: stopped in /usr/ports/security/dsniff/work/dsniff-2.4
1 error

make[2]: stopped in /usr/ports/security/dsniff/work/dsniff-2.4
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/dsniff
*** Error code 1

Stop.
make: stopped in /usr/ports/security/dsniff
root@freyja:/usr/ports/security/dsniff # find /usr -name pcap-int.h -print
/usr/obj/usr/src/tmp/usr/include/pcap-int.h
/usr/obj/usr/src/lib32/usr/include/pcap-int.h
/usr/src/contrib/libpcap/pcap-int.h
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2020-11-06 08:28:54 UTC
Hi,

Can you try this patch for /usr/src ?

Need to run:

make installincludes

afterwards.

--HPS

diff --git a/lib/libpcap/Makefile b/lib/libpcap/Makefile
index bec64e0d0df..4d6c9d105e5 100644
--- a/lib/libpcap/Makefile
+++ b/lib/libpcap/Makefile
@@ -30,6 +30,7 @@ SRCS= bpf_dump.c \
 # Old compatibility headers
 INCS=  fmtutils.h \
        pcap-bpf.h \
+       pcap-int.h \
        pcap-namedb.h \
        pcap-netmap.h \
        pcap.h
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2020-11-06 08:40:42 UTC
btw, I'm curious about the need of pcap-int.h header, currently security/dsniff can be built on 12.x without issue.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2020-11-06 16:54:33 UTC
Agreed. ports/net/libpcap doesn't install it either.

I'll test this in a clean jail to verify the OP's report.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2020-11-06 17:07:27 UTC
(In reply to O. Hartmann from comment #0)

ports/security/dsniff/files/patch-pcaputil.c did not apply. Could it be that your ports tree is corrupted?
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2020-11-06 17:10:05 UTC
I will take this PR.
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2020-11-06 17:34:54 UTC
I cannot reproduce this in a clean jail.

Please fetch a new copy of /usr/ports and try again.
Comment 7 Cy Schubert freebsd_committer freebsd_triage 2020-11-13 18:02:31 UTC
This is not a bug.