Bug 270689 - net/mDNSResponder fails to build on 13.1-RELEASE-p6 - IPV6_2292_PKTINFO
Summary: net/mDNSResponder fails to build on 13.1-RELEASE-p6 - IPV6_2292_PKTINFO
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-07 16:13 UTC by dougs@dawnsign.com
Modified: 2023-04-09 14:01 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Add missing HAVE_IPV6 test to fix without-IPV6 build (411 bytes, patch)
2023-04-09 10:50 UTC, Stewart Morgan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dougs@dawnsign.com 2023-04-07 16:13:33 UTC
There was an update to the net/mDNSResponder port on my 13.1-RELEASE-p6 system. It failed as follows:

[root@backup 07.Apr DING! /usr/ports/net/mDNSResponder]# make reinstall clean

===>  License APACHE20 BSD3CLAUSE accepted by the user
===>   mDNSResponder-1790.80.10 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by mDNSResponder-1790.80.10 for building
===>  Extracting for mDNSResponder-1790.80.10
=> SHA256 Checksum OK for mDNSResponder-1790.80.10.tar.gz.
===>  Patching for mDNSResponder-1790.80.10
===>  Applying FreeBSD patches for mDNSResponder-1790.80.10 from /usr/ports/net/mDNSResponder/files
===>   mDNSResponder-1790.80.10 depends on package: gmake>=4.3 - found
===>  Configuring for mDNSResponder-1790.80.10
===>  Building for mDNSResponder-1790.80.10
gmake[3]: Entering directory '/usr/ports/net/mDNSResponder/work/mDNSResponder-mDNSResponder-1790.80.10/mDNSPosix'
cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -I../mDNSCore -I../mDNSShared -I../mDNSShared/utilities -I../DSO -I../ServiceRegistration -Iobjects/prod -fwrapv -W -Wall -DPOSIX_BUILD -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" -UHAVE_IPV6 -DTARGET_OS_FREEBSD -g -DMDNS_DEBUGMSGS=0 -c -o objects/prod/PosixDaemon.c.o PosixDaemon.c
cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -I../mDNSCore -I../mDNSShared -I../mDNSShared/utilities -I../DSO -I../ServiceRegistration -Iobjects/prod -fwrapv -W -Wall -DPOSIX_BUILD -DPID_FILE=\"/var/run/mdnsd.pid\" -DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd\" -UHAVE_IPV6 -DTARGET_OS_FREEBSD -g -DMDNS_DEBUGMSGS=0 -c -o objects/prod/mDNSPosix.c.o mDNSPosix.c
mDNSPosix.c:1068:40: error: use of undeclared identifier 'IPV6_2292_PKTINFO'
    err = setsockopt(fd, IPPROTO_IPV6, IPV6_2292_PKTINFO, &kOn, sizeof(kOn));
                                       ^
1 error generated.
gmake[3]: *** [Makefile:509: objects/prod/mDNSPosix.c.o] Error 1
gmake[3]: Leaving directory '/usr/ports/net/mDNSResponder/work/mDNSResponder-mDNSResponder-1790.80.10/mDNSPosix'
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/net/mDNSResponder
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/mDNSResponder
*** Error code 1

Stop.
make: stopped in /usr/ports/net/mDNSResponder
[root@backup 07.Apr 9:00am /usr/ports/net/mDNSResponder]#


I do not have IPv6 enabled in /etc/rc.conf. Adding "OPTIONS_UNSET = IPV6" to /etc/make.conf doesn't do the trick. Make config doesn't offer an option to turn off IPv6. However, commenting out "OPTIONS_DEFINE=        IPV6" in Makefile causes the build to complete.
Comment 1 Stewart Morgan 2023-04-09 10:50:53 UTC
Created attachment 241371 [details]
Add missing HAVE_IPV6 test to fix without-IPV6 build

Hello,
I encountered the same problem.  Seems like there's a missing test for HAVE_IPV6.  The attached patch adds it in and successfully compiles for me.
Stewart.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-04-09 13:45:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=440c2c6a26303e1a1db6e5f5de039d64bac4ff3a

commit 440c2c6a26303e1a1db6e5f5de039d64bac4ff3a
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-04-09 13:30:08 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-04-09 13:36:36 +0000

    net/mDNSResponder: Fix build in IPv6 environment

    - Restore patch-mDNSPosix-mDNSPosix.c which was removed by accident in 1790.80.10 update
    - Bump PORTREVISION for package change

    PR:             270683, 270689
    Reported by:    Matthieu Volat <mazhe@alkumuna.eu>, <dougs@dawnsign.com>

 net/mDNSResponder/Makefile                         |  1 +
 .../files/patch-mDNSPosix-mDNSPosix.c (new)        | 38 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-04-09 14:01:00 UTC
Committed. Thanks!
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-04-09 14:01:11 UTC
Committed. Thanks!