Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2012 14:28:48 GMT
From:      Ivan Rozhuk <rozhuk.im@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/164353: ifmcstat build fail without -DWITH_KVM
Message-ID:  <201201211428.q0LESmh0093178@red.freebsd.org>
Resent-Message-ID: <201201211430.q0LEUAlD005332@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         164353
>Category:       bin
>Synopsis:       ifmcstat build fail without -DWITH_KVM
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 21 14:30:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Ivan Rozhuk
>Release:        9.0
>Organization:
>Environment:
FreeBSD firewall 9.0-STABLE FreeBSD 9.0-STABLE #0: Sat Jan 21 11:32:18 IRKT 2012     root@firewall:/tmp/obj/usr/src/sys/RIM  i386

>Description:
/usr/src/usr.sbin/ifmcstat
Build fail without libkvm

# cd /usr/src/usr.sbin/ifmcstat
# make
Warning: Object directory not changed from original /usr/src/usr.sbin/ifmcstat
cc -O2 -fno-strict-aliasing -pipe -DINET6 -DNDEBUG -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c ifmcstat.c
ifmcstat.c:169: warning: 'in6_ifinfo' used but never defined
cc -O2 -fno-strict-aliasing -pipe -DINET6 -DNDEBUG -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c printb.c
cc -O2 -fno-strict-aliasing -pipe -DINET6 -DNDEBUG -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign  -o ifmcstat ifmcstat.o printb.o 
ifmcstat.o(.text+0xb92): In function `main':
: undefined reference to `in6_ifinfo'
*** Error code 1

Stop in /usr/src/usr.sbin/ifmcstat.
Exit 1

>How-To-Repeat:
Add to /etc/src.conf

WITHOUT_KVM=
# Set to not build the libkvm library as a part of the base system.

WITHOUT_KVM_SUPPORT=
# Set to build some programs without optional libkvm support.

Next:
cd /usr/src/usr.sbin/ifmcstat
make clean
make

>Fix:
apply patch

Patch attached with submission follows:

--- /usr/src/usr.sbin/ifmcstat/ifmcstat_orig.c	2012-01-21 22:16:42.000000000 +0900
+++ /usr/src/usr.sbin/ifmcstat/ifmcstat.c	2012-01-21 22:18:37.000000000 +0900
@@ -441,32 +441,6 @@
 #ifdef INET6
 
 static void
-in6_ifinfo(struct mld_ifinfo *mli)
-{
-
-	printf("\t");
-	switch (mli->mli_version) {
-	case MLD_VERSION_1:
-	case MLD_VERSION_2:
-		printf("mldv%d", mli->mli_version);
-		break;
-	default:
-		printf("mldv?(%d)", mli->mli_version);
-		break;
-	}
-	printb(" flags", mli->mli_flags, "\020\1SILENT");
-	if (mli->mli_version == MLD_VERSION_2) {
-		printf(" rv %u qi %u qri %u uri %u",
-		    mli->mli_rv, mli->mli_qi, mli->mli_qri, mli->mli_uri);
-	}
-	if (vflag >= 2) {
-		printf(" v1timer %u v2timer %u", mli->mli_v1_timer,
-		   mli->mli_v2_timer);
-	}
-	printf("\n");
-}
-
-static void
 if6_addrlist(struct ifaddr *ifap)
 {
 	struct ifnet ifnet;
@@ -763,6 +737,32 @@
 #endif /* WITH_KVM */
 
 #ifdef INET6
+static void
+in6_ifinfo(struct mld_ifinfo *mli)
+{
+
+	printf("\t");
+	switch (mli->mli_version) {
+	case MLD_VERSION_1:
+	case MLD_VERSION_2:
+		printf("mldv%d", mli->mli_version);
+		break;
+	default:
+		printf("mldv?(%d)", mli->mli_version);
+		break;
+	}
+	printb(" flags", mli->mli_flags, "\020\1SILENT");
+	if (mli->mli_version == MLD_VERSION_2) {
+		printf(" rv %u qi %u qri %u uri %u",
+		    mli->mli_rv, mli->mli_qi, mli->mli_qri, mli->mli_uri);
+	}
+	if (vflag >= 2) {
+		printf(" v1timer %u v2timer %u", mli->mli_v1_timer,
+		   mli->mli_v2_timer);
+	}
+	printf("\n");
+}
+
 static const char *
 inet6_n2a(struct in6_addr *p)
 {


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201211428.q0LESmh0093178>