From nobody@FreeBSD.org  Sat Oct 12 09:03:32 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A6BDA37B401
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Oct 2002 09:03:32 -0700 (PDT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5DE7D43EB3
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Oct 2002 09:03:32 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9CG3V7R012486
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Oct 2002 09:03:31 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.6/8.12.6/Submit) id g9CG3VvL012485;
	Sat, 12 Oct 2002 09:03:31 -0700 (PDT)
Message-Id: <200210121603.g9CG3VvL012485@www.freebsd.org>
Date: Sat, 12 Oct 2002 09:03:31 -0700 (PDT)
From: Brian Candler <B.Candler@pobox.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: After a binary upgrade, kernel with ipf fails to build because of stale /usr/include/netinet/ip_fil.h
X-Send-Pr-Version: www-1.0

>Number:         43979
>Category:       misc
>Synopsis:       After a binary upgrade, kernel with ipf fails to build because of stale /usr/include/netinet/ip_fil.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 12 09:10:01 PDT 2002
>Closed-Date:    Sat Jul 12 17:28:45 PDT 2003
>Last-Modified:  Sat Jul 12 17:28:45 PDT 2003
>Originator:     Brian Candler
>Release:        4.7-RELEASE
>Organization:
>Environment:
>Description:
After binary-upgrading a machine from 4.4 to 4.7, then trying to compile a kernel with 'options IPFILTER', the compile fails:

cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi  -nostdinc -I- -I. -I../.. -I/usr/include -I../../contrib/ipfilter  -D_KERNEL -include opt_global.h -elf  -mpreferred-stack-boundary=2  ../../contrib/ipfilter/netinet/fil.c
./../contrib/ipfilter/netinet/fil.c: In function 'fr-Makefrip':
./../contrib/ipfilter/netinet/fil.c:267: structure has no member named 'fin_misc'
./../contrib/ipfilter/netinet/fil.c:287: 'ICMP6_MINLEN' undeclared (first use in this function)
./../contrib/ipfilter/netinet/fil.c: In function 'fr_check':
./../contrib/ipfilter/netinet/fil.c:1082: too few arguments to function 'ipfw_newfrag'
./../contrib/ipfilter/netinet/fil.c:1092: too many arguments to function 'fr_addstate'
*** Error code 1

Problem is due to a stale file /usr/include/netinet/ip_fil.h which takes precedence over the correct version, due to the sequence of -I flags.

I was able to fix the problem by rm -rf /usr/include and untarring
/usr/include from bin.??, crypto.??, krb4.?? and krb5.??
>How-To-Repeat:
      
>Fix:
(1) Re-order the flags on the cc command line so that -I../../contrib/ipfilter comes before -I/usr/include ?

(2) During binary upgrade, have a list of files which were known to belong
to previous versions of FreeBSD but no longer exist, and remove or rename them???

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Sat Jul 12 17:27:44 PDT 2003 
State-Changed-Why:  
Stale header files are known to cause compilation failures. 
You should periodically clean out your /usr/include if you 
track FreeBSD development. 

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