Bug 254874 - dns/nsd: 4.3.6 fails to build
Summary: dns/nsd: 4.3.6 fails to build
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-08 09:05 UTC by r00t
Modified: 2021-04-09 13:44 UTC (History)
1 user (show)

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


Attachments
dns___nsd.log (41.25 KB, text/plain)
2021-04-08 09:05 UTC, r00t
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description r00t 2021-04-08 09:05:52 UTC
Created attachment 223913 [details]
dns___nsd.log

Hello,

Trying to build the latest NSD 4.3.6 under 12.2-RELEASE-p2 with Synth and it fails with the error(s) below.

The full log file is attached.

Thank you.


--- server.o ---
./server.c:861:36: warning: unused parameter 'sock' [-Wunused-parameter]
set_ipv6_v6only(struct nsd_socket *sock)
                                   ^
./server.c:2867:17: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
                        addrport2str((struct sockaddr_storage*)&sock->addr.ai_addr, buf, sizeof(buf));
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.h:424:22: note: passing argument to parameter 'addr' here
        struct sockaddr_in *addr
                            ^
./server.c:3343:33: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
                log_addr("to server (local)", &data->socket->addr.ai_addr, data->socket->addr.ai_family);
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./server.c:100:22: note: passing argument to parameter 'addr' here
        struct sockaddr_in* addr,
                            ^
./server.c:3344:45: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
                dt_collector_submit_auth_query(data->nsd, &data->socket->addr.ai_addr, &q->addr, q->addrlen,
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./dnstap/dnstap_collector.h:76:22: note: passing argument to parameter 'local_addr' here
        struct sockaddr_in* local_addr,
                            ^
./server.c:3381:36: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
                        log_addr("from server (local)", &data->socket->addr.ai_addr, data->socket->addr.ai_family);
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./server.c:100:22: note: passing argument to parameter 'addr' here
        struct sockaddr_in* addr,
                            ^
./server.c:3383:49: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
                        dt_collector_submit_auth_response(data->nsd, &data->socket->addr.ai_addr,
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./dnstap/dnstap_collector.h:90:22: note: passing argument to parameter 'local_addr' here
        struct sockaddr_in* local_addr,
                            ^
./server.c:3688:70: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("query from client", &data->query->addr, data->query->addr.ss_family);
                                                                            ^~~~~~~~~
                                                                            sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:3689:79: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("to server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family);
                                                                                     ^~~~~~~~~
                                                                                     sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:3690:44: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
        dt_collector_submit_auth_query(data->nsd, &data->socket->addr.ai_addr, &data->query->addr,
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./dnstap/dnstap_collector.h:76:22: note: passing argument to parameter 'local_addr' here
        struct sockaddr_in* local_addr,
                            ^
./server.c:3741:81: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("from server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family);
                                                                                       ^~~~~~~~~
                                                                                       sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:3742:71: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("response to client", &data->query->addr, data->query->addr.ss_family);
                                                                             ^~~~~~~~~
                                                                             sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:3743:47: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
        dt_collector_submit_auth_response(data->nsd, &data->socket->addr.ai_addr, &data->query->addr,
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./dnstap/dnstap_collector.h:90:22: note: passing argument to parameter 'local_addr' here
        struct sockaddr_in* local_addr,
                            ^
./server.c:4176:70: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("query from client", &data->query->addr, data->query->addr.ss_family);
                                                                            ^~~~~~~~~
                                                                            sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:4177:79: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("to server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family);
                                                                                     ^~~~~~~~~
                                                                                     sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:4178:44: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
        dt_collector_submit_auth_query(data->nsd, &data->socket->addr.ai_addr, &data->query->addr,
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./dnstap/dnstap_collector.h:76:22: note: passing argument to parameter 'local_addr' here
        struct sockaddr_in* local_addr,
                            ^
./server.c:4229:81: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("from server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family);
                                                                                       ^~~~~~~~~
                                                                                       sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:4230:71: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'?
        log_addr("response to client", &data->query->addr, data->query->addr.ss_family);
                                                                             ^~~~~~~~~
                                                                             sin_family
/usr/include/netinet/in.h:99:14: note: 'sin_family' declared here
        sa_family_t     sin_family;
                        ^
./server.c:4231:47: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
        dt_collector_submit_auth_response(data->nsd, &data->socket->addr.ai_addr, &data->query->addr,
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
./dnstap/dnstap_collector.h:90:22: note: passing argument to parameter 'local_addr' here
        struct sockaddr_in* local_addr,
                            ^
10 warnings and 8 errors generated.
*** [server.o] Error code 1

make[1]: stopped in /construction/xports/dns/nsd/work/nsd-4.3.6
--- nsd.o ---
./nsd.c:263:6: warning: unused variable 'r' [-Wunused-variable]
        int r;
            ^
./nsd.c:554:16: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
                addrport2str(&udp[i].addr.ai_addr, sockbuf, sizeof(sockbuf));
                             ^~~~~~~~~~~~~~~~~~~~
./util.h:424:22: note: passing argument to parameter 'addr' here
        struct sockaddr_in *addr
                            ^
./nsd.c:559:16: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types]
                addrport2str(&tcp[i].addr.ai_addr, sockbuf, sizeof(sockbuf));
                             ^~~~~~~~~~~~~~~~~~~~
./util.h:424:22: note: passing argument to parameter 'addr' here
        struct sockaddr_in *addr
                            ^
3 warnings generated.
1 error

make[1]: stopped in /construction/xports/dns/nsd/work/nsd-4.3.6
===> 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 /xports/dns/nsd
Comment 1 Jaap Akkerhuis 2021-04-09 10:00:29 UTC
The problems seems to be triggered by the combinations of

     DNSTAP=on: Enable dnstap logging support
     IPV6=off: IPv6 protocol support

The work around to set IPV6=ON and when you don't have IPv6, disable the option in nsd.conf.

From the manual:

       do-ip6: <yes or no>
              If yes, NSD listens to IPv6 connections.  Default yes.

Meanwhile, I'll warn the upstream
Comment 2 r00t 2021-04-09 13:44:52 UTC
Thank you -- the workaround worked.