From nobody@FreeBSD.org  Sat Jun  9 20:45:25 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id BAFD437B405
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  9 Jun 2001 20:45:24 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.3/8.11.3) id f5A3jO387775;
	Sat, 9 Jun 2001 20:45:24 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200106100345.f5A3jO387775@freefall.freebsd.org>
Date: Sat, 9 Jun 2001 20:45:24 -0700 (PDT)
From: reel@sympatico.ca
To: freebsd-gnats-submit@FreeBSD.org
Subject: make world fails (ref. to ipf)
X-Send-Pr-Version: www-1.0

>Number:         28002
>Category:       bin
>Synopsis:       SHARED=symlinks is broken
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 09 20:50:01 PDT 2001
>Closed-Date:    Mon Jul 22 07:31:01 PDT 2002
>Last-Modified:  Mon Jul 22 07:31:01 PDT 2002
>Originator:     Flix-Antoine Paradis
>Release:        FreeBSD 4.3-STABLE
>Organization:
Unix Consult Organization
>Environment:
FreeBSD idemnia.ath.cx 4.3-STABLE FreeBSD 4.3-STABLE #0: Mon May 28 17:42:29 EDT
 2001     reel@idemnia.ath.cx:/usr/src/sys/compile/ZEUS  i386

>Description:
When doing a "make world", it seems that it has a problem with
sys/netinet/ip_compat.h
I get the message:
===> sbin/ipf
make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_compat.h. St
op
*** Error code 2
1 error
[four Error code 2]
I cvsup'd today twice and I make world twice (it occured twice).

>How-To-Repeat:
CVSup from cvsup2.freebsd.org for 4.3-STABLE (releng4) and then,
usual things for make world:
cd /usr/src
make world
Then, it breaks. :|
>Fix:
not at the moment.
>Release-Note:
>Audit-Trail:

From: Peter Wemm <peter@wemm.org>
To: reel@sympatico.ca
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: i386/28002: make world fails (ref. to ipf) 
Date: Sat, 09 Jun 2001 22:44:47 -0700

 reel@sympatico.ca wrote:
 
 > >Description:
 > When doing a "make world", it seems that it has a problem with
 > sys/netinet/ip_compat.h
 > I get the message:
 > ===> sbin/ipf
 > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_compat.h.
 
 This is because of either:
 1) You are using 'make -DNOCLEAN world' (dont do this) and you have a stale
    .depend file
 or
 2) Something is stale in your obj directory.  rm -rf /usr/obj/*
 
 Cheers,
 -Peter
 --
 Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
 "All of this is for nothing if we don't go to the stars" - JMS/B5
 

From: Bruce Evans <bde@zeta.org.au>
To: Peter Wemm <peter@wemm.org>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: i386/28002: make world fails (ref. to ipf) 
Date: Sun, 10 Jun 2001 17:24:39 +1000 (EST)

 On Sat, 9 Jun 2001, Peter Wemm wrote:
 
 >  reel@sympatico.ca wrote:
 >  
 >  > >Description:
 >  > When doing a "make world", it seems that it has a problem with
 >  > sys/netinet/ip_compat.h
 >  > I get the message:
 >  > ===> sbin/ipf
 >  > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_compat.h.
 >  
 >  This is because of either:
 >  1) You are using 'make -DNOCLEAN world' (dont do this) and you have a stale
 >     .depend file
 >  or
 >  2) Something is stale in your obj directory.  rm -rf /usr/obj/*
 
 This is actually because the SHARED=symlinks case was broken by moving
 ipfilter, despite this case being the usual case for makeworld.  From
 src/Makefile.inc1:
 
 	@echo "--------------------------------------------------------------"
 	@echo ">>> stage 4: populating ${WORLDTMP}/usr/include"
 	@echo "--------------------------------------------------------------"
 	cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes
 				^^^^^^^^^^^^^^^^^^^^^^^^
 	@echo
 	@echo "--------------------------------------------------------------"
 	@echo ">>> stage 4: building libraries"
 	@echo "--------------------------------------------------------------"
 	cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries
 	@echo
 	@echo "--------------------------------------------------------------"
 	@echo ">>> stage 4: make dependencies"
 	@echo "--------------------------------------------------------------"
 	cd ${.CURDIR}; ${WMAKE} par-depend
 	@echo
 	@echo "--------------------------------------------------------------"
 	@echo ">>> stage 4: building everything.."
 	@echo "--------------------------------------------------------------"
 	cd ${.CURDIR}; ${WMAKE} all
 
 Bruce
 
State-Changed-From-To: open->closed 
State-Changed-By: greid 
State-Changed-When: Sun Jun 10 03:09:21 PDT 2001 
State-Changed-Why:  


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28002 

From: Bruce Evans <bde@zeta.org.au>
To: Peter Wemm <peter@wemm.org>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: i386/28002: make world fails (ref. to ipf) 
Date: Sun, 10 Jun 2001 20:58:06 +1000 (EST)

 [Cc corrected]
 
 On Sun, 10 Jun 2001, Peter Wemm wrote:
 
 > Bruce Evans wrote:
 > > On Sat, 9 Jun 2001, Peter Wemm wrote:
 > > 
 > > >  reel@sympatico.ca wrote:
 > > >  
 > > >  > >Description:
 > > >  > When doing a "make world", it seems that it has a problem with
 > > >  > sys/netinet/ip_compat.h
 > > >  > I get the message:
 > > >  > ===> sbin/ipf
 > > >  > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_comp
 >     at.h.
 > > >  
 > > >  This is because of either:
 > > >  1) You are using 'make -DNOCLEAN world' (dont do this) and you have a stal
 >     e
 > > >     .depend file
 > > >  or
 > > >  2) Something is stale in your obj directory.  rm -rf /usr/obj/*
 > > 
 > > This is actually because the SHARED=symlinks case was broken by moving
 > > ipfilter, despite this case being the usual case for makeworld.  From
 > > src/Makefile.inc1:
 > > 
 > > 	@echo "--------------------------------------------------------------"
 > > 	@echo ">>> stage 4: populating ${WORLDTMP}/usr/include"
 > > 	@echo "--------------------------------------------------------------"
 > > 	cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes
 > 
 > SHARED=symlinks may be broken, but it isn't causing world to die.  I have
 > two recent -stable (as little as 10 minutes ago) builds that I can show you
 > if you dont believe me.
 
 That is another bug :-).  You must have garbage in /usr/include/netinet
 from a previous installworld.  Buildworld picks up this garbage because
 -nostdinc was removed from CFLAGS in rev.1.105 of src/Makefile.inc1.
 
 > The actual error message comes from stale .depend data. That is the only
 > way that make ever gets told about the existance of
 > "/usr/src/sbin/ipf/../../sys/netinet/ip_compat.h"
 
 Yes.  I haven't actually run makeworld to test this and jumped to some
 conclusions.
 
 > See the CFLAGS in -stable:
 > CFLAGS+=-DIPL_NAME=\"/dev/ipl\" -I- -I${.CURDIR}/../../sys/netinet \
 >  -I${.CURDIR}/../../contrib/ipfilter
 > 
 > These should be changed to ../../sys/contrib/ipfilter/netinet for -stable.
 > 
 > However, this is not breaking the build.  It may not be correct, but it
 > is not causing an abort.  Stale .depend data is causing the make failures.
 > 
 > It is also broken on -current for different reasons.  Sometimes it uses the
 > ones from sys/netinet via the installed includes, and other times it uses
 > the ones in ../../contrib/ipfilter  (when doing #include "ip_compat.h" etc).
 
 It seems to only find "ip_compat.h" there.  This is enough to build ipf.
 ipmon apparently uses <netinet/foo.h> so it doesn't build unless the
 ipfilter headers are in a subdir named netinet somewhere (and a default
 or -I path to the directory above).
 
 > Somebody got carried away in removing -I../../sys in -current and broke
 > things even more by removing -I../../sys/netinet at the same time.
 
 Bruce
 

From: Peter Wemm <peter@wemm.org>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: i386/28002: make world fails (ref. to ipf) 
Date: Sun, 10 Jun 2001 15:11:53 -0700

 Bruce Evans wrote:
 > [Cc corrected]
 > 
 > On Sun, 10 Jun 2001, Peter Wemm wrote:
 > 
 > > Bruce Evans wrote:
 > > > On Sat, 9 Jun 2001, Peter Wemm wrote:
 > > > 
 > > > >  reel@sympatico.ca wrote:
 > > > >  
 > > > >  > >Description:
 > > > >  > When doing a "make world", it seems that it has a problem with
 > > > >  > sys/netinet/ip_compat.h
 > > > >  > I get the message:
 > > > >  > ===> sbin/ipf
 > > > >  > make: don't know how to make /usr/src/sbin/ipf/../../sys/netinet/ip_
     comp
 > >     at.h.
 > > > >  
 > > > >  This is because of either:
 > > > >  1) You are using 'make -DNOCLEAN world' (dont do this) and you have a 
     stal
 > >     e
 > > > >     .depend file
 > > > >  or
 > > > >  2) Something is stale in your obj directory.  rm -rf /usr/obj/*
 > > > 
 > > > This is actually because the SHARED=symlinks case was broken by moving
 > > > ipfilter, despite this case being the usual case for makeworld.  From
 > > > src/Makefile.inc1:
 > > > 
 > > > 	@echo "--------------------------------------------------------------"
 > > > 	@echo ">>> stage 4: populating ${WORLDTMP}/usr/include"
 > > > 	@echo "--------------------------------------------------------------"
 > > > 	cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes
 > > 
 > > SHARED=symlinks may be broken, but it isn't causing world to die.  I have
 > > two recent -stable (as little as 10 minutes ago) builds that I can show you
 > > if you dont believe me.
 > 
 > That is another bug :-).  You must have garbage in /usr/include/netinet
 > from a previous installworld.  Buildworld picks up this garbage because
 > -nostdinc was removed from CFLAGS in rev.1.105 of src/Makefile.inc1.
 
 Actually, I did two build/installworlds, in this order.  I was concerned
 about junk in /usr/include as a result of switching this box from
 -current to -stable.
 0) rm -rf /usr/obj/*
 1) make buildworld
 2) make installworld
 3) mv /usr/include /usr/include.old; also clean up old files in / and /usr
 4) make installworld
 5) rm -rf /usr/obj/*
 6) make world
 
 The problem is that ipf.c etc has this crud:
 #include "ip_compat.h"
 #include "ip_fil.h"
 #include "ip_nat.h"
 #include "ip_state.h"
 #include "ipf.h"
 #include "ipl.h"
 -nostdinc has no bearing on that at all.  We *needed* the -I../../sys/netinet
 so that everything was supposed to use the same include files, but in
 -current ru@freebsd.org removed it without replacing the functionality.
 
 > > See the CFLAGS in -stable:
 > > CFLAGS+=-DIPL_NAME=\"/dev/ipl\" -I- -I${.CURDIR}/../../sys/netinet \
 > >  -I${.CURDIR}/../../contrib/ipfilter
 > > 
 > > These should be changed to ../../sys/contrib/ipfilter/netinet for -stable.
 > > 
 > > However, this is not breaking the build.  It may not be correct, but it
 > > is not causing an abort.  Stale .depend data is causing the make failures.
 > > 
 > > It is also broken on -current for different reasons.  Sometimes it uses the
 > > ones from sys/netinet via the installed includes, and other times it uses
 > > the ones in ../../contrib/ipfilter  (when doing #include "ip_compat.h" etc)
     .
 > 
 > It seems to only find "ip_compat.h" there.  This is enough to build ipf.
 > ipmon apparently uses <netinet/foo.h> so it doesn't build unless the
 > ipfilter headers are in a subdir named netinet somewhere (and a default
 > or -I path to the directory above).
 
 Personally, with disk space being as cheap as it is, I feel we should
 deorbit SYMLINKS=shared.  After all, some people even build their entire
 worlds static.  This would greatly reduce the complexity of building an
 include tree and reduce the margin for error.
 
 Cheers,
 -Peter
 --
 Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
 "All of this is for nothing if we don't go to the stars" - JMS/B5
 

From: Bruce Evans <bde@zeta.org.au>
To: Peter Wemm <peter@wemm.org>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: i386/28002: make world fails (ref. to ipf) 
Date: Mon, 11 Jun 2001 09:56:24 +1000 (EST)

 On Sun, 10 Jun 2001, Peter Wemm wrote:
 
 >  > > SHARED=symlinks may be broken, but it isn't causing world to die.  I have
 >  > > two recent -stable (as little as 10 minutes ago) builds that I can show you
 >  > > if you dont believe me.
 >  > 
 >  > That is another bug :-).  You must have garbage in /usr/include/netinet
 >  > from a previous installworld.  Buildworld picks up this garbage because
 >  > -nostdinc was removed from CFLAGS in rev.1.105 of src/Makefile.inc1.
 >  
 >  Actually, I did two build/installworlds, in this order.  I was concerned
 >  about junk in /usr/include as a result of switching this box from
 >  -current to -stable.
 >  0) rm -rf /usr/obj/*
 >  1) make buildworld
 
 This can work because you have an old (but sufficiently current to work)
 set of ipfilter headers in /usr/include/netinet ...
 
 >  2) make installworld
 
 and this installs a current set of ipfilter headers in /usr/include/netinet
 (but this set will be "old" again for the next build, because the sources
 may have changed).
 
 >  3) mv /usr/include /usr/include.old; also clean up old files in / and /usr
 
 This gets rid of all the headers ...
 
 >  4) make installworld
 
 ... and this installs all headers again, including a current set of ipfilter
 headers.
 
 >  5) rm -rf /usr/obj/*
 >  6) make world
 
 This works because you have an old (but sufficiently current to work)
 set of ipfilter headers in /usr/include/netinet ...
 
 Here the headers are certainly sufficiently current to work, because
 you just installed them, but this is not true in general.  People
 upgrading from RELENG_4 have the RELENG_4 headers and might fail in
 step (1).
 
 >  The problem is that ipf.c etc has this crud:
 >  #include "ip_compat.h"
 >  #include "ip_fil.h"
 >  #include "ip_nat.h"
 >  #include "ip_state.h"
 >  #include "ipf.h"
 >  #include "ipl.h"
 >  -nostdinc has no bearing on that at all.  We *needed* the -I../../sys/netinet
 >  so that everything was supposed to use the same include files, but in
 >  -current ru@freebsd.org removed it without replacing the functionality.
 
 I see.  ipmon seems to be the only exception.  ipmon/Makefile only used
 -I../../sys, and ipmon.c only uses:
 
 #include "netinet/ip_compat.h"
 #include "netinet/ip_fil.h"
 #include "netinet/ip_proxy.h"
 #include "netinet/ip_nat.h"
 #include "netinet/ip_state.h"
 
 >  Personally, with disk space being as cheap as it is, I feel we should
 >  deorbit SYMLINKS=shared.  After all, some people even build their entire
 >  worlds static.  This would greatly reduce the complexity of building an
 >  include tree and reduce the margin for error.
 
 You mean SHARED=symlinks.  This is more for avoiding having a separate
 copy of the headers than to save space.  Copies of things are sources
 of bitrot.
 
 Bruce
 
State-Changed-From-To: closed->open 
State-Changed-By: ru 
State-Changed-When: Mon Jun 11 02:01:42 PDT 2001 
State-Changed-Why:  
SHARED=symlink case is currently broken. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28002 
Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Thu Oct 11 07:44:25 PDT 2001 
Responsible-Changed-Why:  
I plan to work this out. 
Somehow... 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28002 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Jul 22 07:29:25 PDT 2002 
State-Changed-Why:  
This feature is now back available in 4.6-STABLE and 5.0-CURRENT. 

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