From shan@lober.soeren-hansen.dk  Tue Aug  8 09:09:08 2006
Return-Path: <shan@lober.soeren-hansen.dk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B3DBB16A4E6
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Aug 2006 09:09:08 +0000 (UTC)
	(envelope-from shan@lober.soeren-hansen.dk)
Received: from lober.soeren-hansen.dk (0x5552dc54.adsl.cybercity.dk [85.82.220.84])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 636DB43D64
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Aug 2006 09:09:02 +0000 (GMT)
	(envelope-from shan@lober.soeren-hansen.dk)
Received: from lober.soeren-hansen.dk (localhost [127.0.0.1])
	by lober.soeren-hansen.dk (8.13.6/8.13.6) with ESMTP id k7898ws6024759
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 8 Aug 2006 11:08:59 +0200 (CEST)
	(envelope-from shan@lober.soeren-hansen.dk)
Received: (from shan@localhost)
	by lober.soeren-hansen.dk (8.13.6/8.13.6/Submit) id k7898wii024758;
	Tue, 8 Aug 2006 11:08:58 +0200 (CEST)
	(envelope-from shan)
Message-Id: <200608080908.k7898wii024758@lober.soeren-hansen.dk>
Date: Tue, 8 Aug 2006 11:08:58 +0200 (CEST)
From: Soeren Hansen <shan@soeren-hansen.dk>
Reply-To: Soeren Hansen <shan@soeren-hansen.dk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: make buildworld fails on RELENG_6
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         101646
>Category:       i386
>Synopsis:       make buildworld fails on RELENG_6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 08 09:10:14 GMT 2006
>Closed-Date:    Wed Sep 06 12:39:03 GMT 2006
>Last-Modified:  Wed Sep 06 12:39:03 GMT 2006
>Originator:     Soeren Hansen
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD lober.soeren-hansen.dk 6.1-STABLE FreeBSD 6.1-STABLE #1: Mon Aug 7 23:01:25 CEST 2006 root@lober.soeren-hansen.dk:/usr/obj/usr/src/sys/LOBER i386

	I was using:
	uname -a
FreeBSD lober.soeren-hansen.dk 6.1-RC FreeBSD 6.1-RC #1: Thu May  4 
16:16:21 CEST 2006     
root@lober.soeren-hansen.dk:/usr/obj/usr/src/sys/LOBER  i386

>Description:
	make buildworld fails several places after I have updated using 
	cvsup from RELENG_6.
	All the errors are only warnings, which however becomes 
	showstopper since -Werror is set.
>How-To-Repeat:
	# rm -rf /usr/src # to be completely sure that the src tree is 
			  # brand new
        # rm -rf /usr/obj/*
	# cat /root/stable-supfile
	*default host=cvsup.FreeBSD.org
	*default base=/usr
	*default prefix=/usr
	*default release=cvs tag=RELENG_6
	*default delete use-rel-suffix

	*default compress

	src-all

	# cvsup -g -L 2 /root/stable-supfile
	# cd /usr/src
	# make clean # well .. /usr/obj is empty .. but anyways ;)
	# make buildworld

Gets the following errors:

Error (1):
cc -O3 -pipe  -I/usr/src/lib/libc/include 
-I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/i386 
-D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 
-I/usr/obj/usr/src/lib/libc -I/usr/src/lib/libc/resolv -DPOSIX_MISTAKE 
-I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN 
-I/usr/src/lib/libc/rpc -DYP -DHESIOD -Wsystem-headers -Werror -Wall 
-Wno-format-y2k -Wno-uninitialized -c /usr/src/lib/libc/rpc/getpublickey.c
In file included from /usr/src/lib/libc/rpc/getpublickey.c:178:
/usr/src/lib/libc/rpc/getpublickey.c: In function `getpublickey':
/usr/src/lib/libc/rpc/getpublickey.c:70: warning: passing arg 1 of 
`__getpublickey_real' discards qualifiers from pointer target type
*** Error code 1

Stop in /usr/src/lib/libc.
*** Error code 1

Error (2):
cc -O3 -pipe  -I/usr/src/sbin/ggate/ggated/../shared -Wsystem-headers 
-Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual 
-Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter 
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c 
/usr/src/sbin/ggate/ggated/ggated.c
/usr/src/sbin/ggate/ggated/ggated.c: In function `disk_thread':
/usr/src/sbin/ggate/ggated/ggated.c:759: warning: no return statement in 
function returning non-void
/usr/src/sbin/ggate/ggated/ggated.c: In function `send_thread':
/usr/src/sbin/ggate/ggated/ggated.c:813: warning: no return statement in 
function returning non-void
*** Error code 1

Stop in /usr/src/sbin/ggate/ggated.
*** Error code 1

Error (3):
cc -O3 -pipe  -Wsystem-headers -Werror -Wall -Wno-format-y2k 
-Wno-uninitialized -c /usr/src/sbin/ip6fw/ip6fw.c
In file included from /usr/src/sbin/ip6fw/ip6fw.c:1115:
/usr/src/sbin/ip6fw/ip6fw.c: In function `ip6fw_main':
/usr/src/sbin/ip6fw/ip6fw.c:770: warning: passing arg 1 of 
`fill_icmptypes' from incompatible pointer type
*** Error code 1

Stop in /usr/src/sbin/ip6fw.
*** Error code 1

Error (4):
cc -O3 -pipe  -I. -I/usr/src/usr.bin/csup/../../contrib/csup -DHAVE_FFLAGS 
-DNDEBUG -Wsystem-headers -Werror -Wall -Wno-format-y2k -W 
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes 
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch 
-Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -c 
/usr/src/usr.bin/csup/../../contrib/csup/proto.c
/usr/src/usr.bin/csup/../../contrib/csup/proto.c: In function 
`killer_run':
/usr/src/usr.bin/csup/../../contrib/csup/proto.c:1006: warning: no return 
statement in function returning non-void
*** Error code 1

Stop in /usr/src/usr.bin/csup.
*** Error code 1

 
>Fix:
Fix (1):
The function doesn't modify the content of netname, so it should be 
declared const.
diff -u /usr/src/lib/libc/rpc/getpublickey.c.org 
/usr/src/lib/libc/rpc/getpublickey.c
--- /usr/src/lib/libc/rpc/getpublickey.c.org    Sun Aug  6 22:16:27 2006
+++ /usr/src/lib/libc/rpc/getpublickey.c        Sun Aug  6 22:18:20 2006
@@ -65,7 +65,7 @@
  */
 int
 __getpublickey_real(netname, publickey)
-       char *netname;
+       const char *netname;
        char *publickey;
 {
        char lookup[3 * HEXKEYBYTES];
@@ -92,7 +92,7 @@

 int
 getpublicandprivatekey(key, ret)
-       char *key;
+       const char *key;
        char *ret;
 {
        char buf[1024]; /* big enough */


diff -u /usr/src/include/rpc/auth.h.org /usr/src/include/rpc/auth.h
--- /usr/src/include/rpc/auth.h.org     Sun Aug  6 22:20:41 2006
+++ /usr/src/include/rpc/auth.h Sun Aug  6 22:21:20 2006
@@ -299,7 +299,7 @@
  */
 __BEGIN_DECLS
 extern int getpublickey (const char *, char *);
-extern int getpublicandprivatekey (char *, char *);
+extern int getpublicandprivatekey (const char *, char *);
 extern int getsecretkey (char *, char *, char *);
 __END_DECLS



Fix (2):
The functions go into infinite loops, so they will never return. However, 
since the functions are declared to return a pointer, they must also do so 
in the end.
diff -u /usr/src/sbin/ggate/ggated/ggated.c.org 
/usr/src/sbin/ggate/ggated/ggated.c
--- /usr/src/sbin/ggate/ggated/ggated.c.org     Sun Aug  6 23:59:18 2006
+++ /usr/src/sbin/ggate/ggated/ggated.c Mon Aug  7 00:02:26 2006
@@ -756,6 +756,7 @@
                error = pthread_mutex_unlock(&outqueue_mtx);
                assert(error == 0);
        }
+       return NULL; /* Never reached */
 }

 static void *
@@ -810,6 +811,7 @@
                }
                free(req);
        }
+       return NULL; /* Never reached */
 }

 static void


Fix (3):
I believe fw_icmp6types should be a u_long.
diff -u /usr/src/sys/netinet6/ip6_fw.h.org /usr/src/sys/netinet6/ip6_fw.h
--- /usr/src/sys/netinet6/ip6_fw.h.org  Mon Aug  7 08:06:27 2006
+++ /usr/src/sys/netinet6/ip6_fw.h      Mon Aug  7 08:07:00 2006
@@ -93,7 +93,7 @@
     u_char fw_ip6opt,fw_ip6nopt;       /* IPv6 options set/unset */
     u_char fw_tcpf,fw_tcpnf;           /* TCP flags set/unset */
 #define IPV6_FW_ICMPTYPES_DIM (256 / (sizeof(unsigned) * 8))
-    unsigned fw_icmp6types[IPV6_FW_ICMPTYPES_DIM]; /* ICMP types bitmap 
*/
+    u_long fw_icmp6types[IPV6_FW_ICMPTYPES_DIM]; /* ICMP types bitmap */
     long timestamp;                    /* timestamp (tv_sec) of last 
match */
     union ip6_fw_if fw_in_if, fw_out_if;/* Incoming and outgoing 
interfaces */
     union {


Fix (4):
Again an infinite loop in a function returning a pointer. Returning NULL 
will satisfy the compiler.
diff -u /usr/src/contrib/csup/proto.c.org /usr/src/contrib/csup/proto.c
--- /usr/src/contrib/csup/proto.c.org   Mon Aug  7 20:30:04 2006
+++ /usr/src/contrib/csup/proto.c       Mon Aug  7 20:31:16 2006
@@ -1003,6 +1003,8 @@
                }
        }
        goto again;
+
+       return NULL; /* Never reached */
 }

 /* Stop the killer thread. */





>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Wed Aug 30 08:34:47 UTC 2006 
State-Changed-Why:  
Hi Soeren, 

I am updating my RELENG_6 branch quite a lot on my Duron test 
server (yes somewhat older hardware); and I did not see this 
problem occuring, is it still a problem with a recent RELENG_6 
checkout? 

Thanks for letting me know! 


Responsible-Changed-From-To: freebsd-i386->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed Aug 30 08:34:47 UTC 2006 
Responsible-Changed-Why:  
Grab the PR so that i can trace feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101646 
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Wed Sep 6 12:38:51 UTC 2006 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101646 
>Unformatted:
