Bug 260541

Summary: net/libpcap: Fails to build on 13-STABLE: bpf.h:71:8: error: redefinition of 'bpf_program'
Product: Ports & Packages Reporter: tech-lists
Component: Individual Port(s)Assignee: Renato Botelho <garga>
Status: Closed FIXED    
Severity: Affects Only Me CC: wcarson.bugzilla
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (garga)
koobs: merge-quarterly?
Hardware: amd64   
OS: Any   
URL: https://cloud.zyxst.net/~john/FreeBSD/amd64-stable/libpcap-1.10.1.log
Attachments:
Description Flags
poudriere build log none

Description tech-lists 2021-12-19 12:57:04 UTC
Hi,

for full log from poudriere testport, please see https://cloud.zyxst.net/~john/FreeBSD/amd64-stable/libpcap-1.10.1.log

net/libpcap fails here:

cc -fvisibility=hidden -O2 -pipe -march=haswell  -fstack-protector-strong -fno-strict-aliasing -fPIC  -fpic -I.  -DBUILDING_PCAP -Dpcap_EXPORTS -DHAVE_CON
FIG_H  -O2 -pipe -march=haswell  -fstack-protector-strong -fno-strict-aliasing -fPIC    -c scanner.c
In file included from grammar.y:102:
In file included from /usr/include/net/if_pflog.h:34:
/usr/include/net/bpf.h:71:8: error: redefinition of 'bpf_program'
struct bpf_program {
       ^
./pcap/bpf.h:117:8: note: previous definition is here
struct bpf_program {
       ^
In file included from grammar.y:102:
In file included from /usr/include/net/if_pflog.h:34:
/usr/include/net/bpf.h:364:8: error: redefinition of 'bpf_insn'
struct bpf_insn {
       ^
./pcap/bpf.h:245:8: note: previous definition is here
struct bpf_insn {
       ^
2 errors generated.
gmake[1]: *** [Makefile:542: grammar.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
./gencode.c:3586:7: error: use of undeclared identifier 'DLT_IEEE802_15_4_TAP'
        case DLT_IEEE802_15_4_TAP:
             ^
1 error generated.
gmake[1]: *** [Makefile:545: gencode.o] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/net/libpcap/work/libpcap-1.10.1'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/net/libpcap
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-12-19 20:53:21 UTC
@Reporter Please include build logs a an attachment, compressed if necessary, thanks!
Comment 2 tech-lists 2021-12-19 21:54:25 UTC
Created attachment 230251 [details]
poudriere build log
Comment 3 tech-lists 2021-12-19 21:56:33 UTC
(In reply to Kubilay Kocak from comment #1)

> @Reporter Please include build logs a an attachment, compressed if necessary, thanks!

Done, but are you able to see the URL in the url box? I thought that was what it was for?
Comment 4 Renato Botelho freebsd_committer freebsd_triage 2021-12-22 16:27:57 UTC
Fixed by 7075bf819e7c5c63fe08db41a406d89a25dac7d3
Comment 5 wcarson.bugzilla 2021-12-22 17:54:02 UTC
(In reply to Renato Botelho from comment #4)
Hi Renato - I'm unable to locate that commit id, are you able to provide more details? I'm in the process of updating stable/13 but would love to see the specific changes made for reference.
Comment 6 Renato Botelho freebsd_committer freebsd_triage 2021-12-22 18:01:07 UTC
(In reply to wcarson.bugzilla from comment #5)
Sure, here it is:

https://cgit.freebsd.org/ports/commit/?id=7075bf819e7c5c63fe08db41a406d89a25dac7d3