Subject: misc/30092: building with USE_INET6=no fails
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <j+nbsd@2005.salmi.ch>
List: netbsd-bugs
Date: 04/29/2005 11:30:01
>Number:         30092
>Category:       misc
>Synopsis:       building with USE_INET6=no fails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 29 11:30:00 +0000 2005
>Originator:     Jukka Salmi
>Release:        NetBSD 3.99.3
>Environment:
System: NetBSD moray.salmi.ch 3.99.3 NetBSD 3.99.3 (GENERIC.NOEHCI.APM) #0: Tue Apr 26 18:54:44 CEST 2005 build@moray.salmi.ch:/build/nbsd/i386/sys/arch/i386/compile/GENERIC.NOEHCI.APM i386
Architecture: i386
Machine: i386
>Description:
Building e.g. a distribution fails if USE_INET6 is set to `no' (and MKINET6
is not changed from its default which is `yes'), because libc only contains
IPv6 functions if built with USE_INET6=yes, but several IPv6-specific tools
like sbin/ping6 and usr.sbin/mld6query are built if MKINET6 is set to `yes',
no matter what USE_INET6 is set to.
>How-To-Repeat:
Build e.g. a distribution with USE_INET6=no see the linker fail in sbin/ping6
with undefined reference to `inet6_rthdr_init', `inet6_rthdr_add', etc.
>Fix:
Don't try to build IPv6-specific tools at all if they can't be linked anyway;
i.e. for both src/sbin/Makefile and src/usr.sbin/Makefile, replace
	.if (${MKINET6} != "no")
with
	.if (${USE_INET6} != "no")