On FreeBSD 11.1-RELEASE-p9 amd64, compilation fails: --- ip.lo --- /bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -c -o ip.lo `test -f 'ip.c' || echo './'`ip.c --- fw-ipfw.lo --- fw-ipfw.c:52:14: error: no member named 'fw_in_if' in 'struct ip_fw' ipfw->fw_in_if.fu_via_if.name, ~~~~ ^ fw-ipfw.c:53:15: error: no member named 'fw_in_if' in 'struct ip_fw' &ipfw->fw_in_if.fu_via_if.unit); ~~~~ ^ fw-ipfw.c:54:10: error: no member named 'fw_flg' in 'struct ip_fw' ipfw->fw_flg |= IP_FW_F_IIFNAME; ~~~~ ^ fw-ipfw.c:54:20: error: use of undeclared identifier 'IP_FW_F_IIFNAME' ipfw->fw_flg |= IP_FW_F_IIFNAME; ^ fw-ipfw.c:56:9: error: no member named 'fw_flg' in 'struct ip_fw' ipfw->fw_flg |= IP_FW_F_IN; ~~~~ ^ fw-ipfw.c:56:19: error: use of undeclared identifier 'IP_FW_F_IN' ipfw->fw_flg |= IP_FW_F_IN; ^ fw-ipfw.c:60:14: error: no member named 'fw_out_if' in 'struct ip_fw' ipfw->fw_out_if.fu_via_if.name, ~~~~ ^ fw-ipfw.c:61:15: error: no member named 'fw_out_if' in 'struct ip_fw' &ipfw->fw_out_if.fu_via_if.unit); ~~~~ ^ fw-ipfw.c:62:10: error: no member named 'fw_flg' in 'struct ip_fw' ipfw->fw_flg |= IP_FW_F_OIFNAME; ~~~~ ^ fw-ipfw.c:62:20: error: use of undeclared identifier 'IP_FW_F_OIFNAME' ipfw->fw_flg |= IP_FW_F_OIFNAME; ^ fw-ipfw.c:64:9: error: no member named 'fw_flg' in 'struct ip_fw' ipfw->fw_flg |= IP_FW_F_OUT; ~~~~ ^ fw-ipfw.c:64:19: error: use of undeclared identifier 'IP_FW_F_OUT' ipfw->fw_flg |= IP_FW_F_OUT; ^ fw-ipfw.c:67:9: error: no member named 'fw_flg' in 'struct ip_fw' ipfw->fw_flg |= IP_FW_F_ACCEPT; ~~~~ ^ fw-ipfw.c:67:19: error: use of undeclared identifier 'IP_FW_F_ACCEPT' ipfw->fw_flg |= IP_FW_F_ACCEPT; ^ fw-ipfw.c:69:9: error: no member named 'fw_flg' in 'struct ip_fw' ipfw->fw_flg |= IP_FW_F_DENY; ~~~~ ^ fw-ipfw.c:69:19: error: use of undeclared identifier 'IP_FW_F_DENY' ipfw->fw_flg |= IP_FW_F_DENY; ^ fw-ipfw.c:71:8: error: no member named 'fw_prot' in 'struct ip_fw' ipfw->fw_prot = fr->fw_proto; ~~~~ ^ fw-ipfw.c:72:8: error: no member named 'fw_src' in 'struct ip_fw' ipfw->fw_src.s_addr = fr->fw_src.addr_ip; ~~~~ ^ fw-ipfw.c:73:8: error: no member named 'fw_dst' in 'struct ip_fw' ipfw->fw_dst.s_addr = fr->fw_dst.addr_ip; ~~~~ ^ fatal error: too many errors emitted, stopping now [-ferror-limit=]
My make.conf: KERNCONF=OZ MODULES_OVERRIDE=accf_http accf_data tmpfs OPTIONS_UNSET= NIS OPTIONS_UNSET+= X11 OPTIONS_UNSET+= DOCS OPTIONS_UNSET+= DEBUG DEFAULT_VERSIONS+= ssl=libressl
Please share version of net/libdnet you are trying to build. Do you build it in a jail? Please attach full log of "make clean all" in port's directory because something wrong happens at your side as it should not even try to compile fw-ipfw.c for FreeBSD 11.1.
Created attachment 192549 [details] build.log attached build.log
From your build log: checking net/pfvar.h presence... no checking for net/pfvar.h... no checking netinet/ip_compat.h presence... no checking for netinet/ip_compat.h... no checking netinet/ip_fil.h presence... no checking for netinet/ip_fil.h... no That's bad and suspicious as it should state 'yes' for all these lines. Is your system built with some non-default /etc/src.conf and/or /etc/make.conf contents like WITHOUT_* variables set? If so, please share contents of src.conf and make.conf.
make.conf: please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227490#c1 src.conf: WITH_SYSTEM_COMPILER=YES # WITHOUT_ACCT=YES WITHOUT_AMD=YES WITHOUT_ATM=YES WITHOUT_AUDIT=YES WITHOUT_AUTHPF=YES WITHOUT_AUTOFS=YES WITHOUT_BHYVE=YES WITHOUT_BLUETOOTH=YES WITHOUT_BOOTPD=YES WITHOUT_BSNMP=YES WITHOUT_CALENDAR=YES WITHOUT_CAPSICUM=YES WITHOUT_CASPER=YES WITHOUT_CCD=YES WITHOUT_CDDL=YES WITHOUT_CLANG_BOOTSTRAP=YES WITHOUT_CLANG_FULL=YES WITHOUT_CLANG_EXTRAS=YES WITHOUT_CROSS_COMPILER=YES # WITHOUT_CRYPT=YES WITHOUT_CTM=YES WITHOUT_CUSE=YES WITHOUT_DEBUG_FILES=YES WITHOUT_DICT=YES WITHOUT_DMAGENT=YES WITHOUT_ED_CRYPTO=YES WITHOUT_EXAMPLES=YES WITHOUT_FINGER=YES WITHOUT_FLOPPY=YES # WITHOUT_FORTH=YES WITHOUT_FTP=YES WITHOUT_GAMES=YES WITHOUT_GCC=YES WITHOUT_GCOV=YES WITHOUT_GDB=YES WITHOUT_GSSAPI=YES WITHOUT_HAST=YES WITHOUT_HTML=YES WITHOUT_HYPERV=YES # WITHOUT_INET6=YES WITHOUT_IPFILTER=YES # WITHOUT_IPFW=YES WITHOUT_ISCSI=YES WITHOUT_JAIL=YES WITHOUT_KDUMP=YES WITHOUT_KERBEROS=YES WITHOUT_KERNEL_SYMBOLS=YES WITHOUT_KVM=YES # WITHOUT_LEGACY_CONSOLE=YES # -- only on x64 WITHOUT_LIB32=YES WITHOUT_LLDB=YES WITHOUT_LPR=YES WITHOUT_MAILWRAPPER=YES WITHOUT_NDIS=YES WITHOUT_NETGRAPH=YES WITHOUT_NIS=YES WITHOUT_OPENSSH=YES # WITHOUT_OPENSSL=YES WITHOUT_PF=YES WITHOUT_PMC=YES WITHOUT_PPP=YES WITHOUT_PROFILE=YES WITHOUT_QUOTAS=YES WITHOUT_RADIUS_SUPPORT=YES WITHOUT_RBOOTD=YES WITHOUT_RCMDS=YES WITHOUT_RCS=YES WITHOUT_RESCUE=YES WITHOUT_ROUTED=YES WITHOUT_SENDMAIL=YES WITHOUT_SHAREDOCS=YES WITHOUT_TALK=YES WITHOUT_TCP_WRAPPERS=YES WITHOUT_TESTS=YES WITHOUT_TFTP=YES WITHOUT_TIMED=YES WITHOUT_USB=YES WITHOUT_WIRELESS=YES WITHOUT_WPA_SUPPLICANT_EAPOL=YES WITHOUT_ZFS=YES
Created attachment 192555 [details] disable non-working ipfw1 support
(In reply to oz42 from comment #5) Well, the problem is libdnet's support of ipfw is basically non-existent these days. It had ipfw1 support that we had in times of 4.11-RELEASE and next production release 5.3 had ipfw2 and now we have ipfw3 instead. libdnet never catched up with changes. The problem does not manifest with default build of FreeBSD that contains pf(4) because libdnet's configure prefers it over ipfw1 and does not try to build its staled ipfw1 support code but you have excluded all packet filters other than ipfw from your build, hence this bug manifested. Please make directory /usr/ports/net/libdnet/files and place attached patch-configure there, then run "make clean all" to test it. The patch should fix the problem by disabling libdnet's non-functional ipfw1 support code.
The patch has worked, compilation finishes successfully.
A commit references this bug: Author: eugen Date: Wed Apr 18 10:52:19 UTC 2018 New revision: 467703 URL: https://svnweb.freebsd.org/changeset/ports/467703 Log: net/libdnet: unbreak compilation for non-default FreeBSD builds libdnet fails to compile for non-default FreeBSD build with pf/ipfilter excluded but ipfw included because its ipfw support staled from ipfw1 times and does not apply to modern ipfw implementation. PORTREVISION not changed because the change is effectively 'no-op' for default build. PR: 227490 Changes: head/net/libdnet/files/ head/net/libdnet/files/patch-configure
Committed, thanks for report and testing!