From root@pakprotector.com  Mon Aug 16 10:42:25 2004
Return-Path: <root@pakprotector.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 71A1516A4D0
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Aug 2004 10:42:25 +0000 (GMT)
Received: from mail002.syd.optusnet.com.au (mail002.syd.optusnet.com.au [211.29.132.32])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2FC7543D64
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Aug 2004 10:42:24 +0000 (GMT)
	(envelope-from root@pakprotector.com)
Received: from sentinel.pakprotector.com (c211-30-248-244.carlnfd2.nsw.optusnet.com.au [211.30.248.244])
	by mail002.syd.optusnet.com.au (8.11.6p2/8.11.6) with ESMTP id i7GAgLG13061
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Aug 2004 20:42:22 +1000
Received: from localhost (localhost [127.0.0.1])
  (uid 0)
  by sentinel.pakprotector.com with local; Mon, 16 Aug 2004 20:42:21 +1000
  id 00000068.41208F8D.00015453
Message-Id: <courier.41208F8D.00015453@pakprotector.com>
Date: Mon, 16 Aug 2004 20:42:21 +1000
From: John Saunders <john@saunders.id.au>
Reply-To: Charlie & <root@pakprotector.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: make buildworld broken in libbsnmp
X-Send-Pr-Version: 3.113
X-GNATS-Notify: harti

>Number:         70532
>Category:       misc
>Synopsis:       make buildworld broken in libbsnmp
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 16 10:50:24 GMT 2004
>Closed-Date:    Mon Aug 16 13:04:05 GMT 2004
>Last-Modified:  Wed Aug 18 09:30:26 GMT 2004
>Originator:     John Saunders
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
None
>Environment:
System: FreeBSD sentinel.pakprotector.com 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Aug 1 22:18:37 EST 2004 root@sentinel.pakprotector.com:/usr/src/sys/i386/compile/SENTINEL i386


>Description:

	make buildworld has been broken for about a week in libbsnmp.
	5 cvsup's and builds over the last week produces the same
	identical fault.

===> lib/libbsnmp/modules
===> lib/libbsnmp/modules/snmp_atm
cat /usr/src/lib/libbsnmp/modules/snmp_atm/../../../../contrib/ngatm/snmp_atm/atm_tree.def /usr/src/lib/libbsnmp/modules/snmp_atm/atm_freebsd.def | gensnmptree -e begemotAtm > atm_oid.h
line 110: junk after closing ')'
context: "1 internet
*** Error code 1

Stop in /usr/src/lib/libbsnmp/modules/snmp_atm.
*** Error code 1

Stop in /usr/src/lib/libbsnmp/modules.
*** Error code 1

>How-To-Repeat:

	cvsup to the latest abd make buildworld. I have tried 5 cvsup's
	and builds over the last week with identical failures.

	Tried make includes as sometimes the build tree picks up
	includes from /usr/includes when it shouldn't. However this
	doesn't help.

	The build line cat's two files together and pipes it into
	gensnmptree and when I run the command manually it too fails.
	Catting the 2 files creates an unparsable file and appears to
	be an error.

>Fix:
>Release-Note:
>Audit-Trail:

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Charlie & <root@pakprotector.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/70532: make buildworld broken in libbsnmp
Date: Mon, 16 Aug 2004 15:46:59 +0300

 On Mon, Aug 16, 2004 at 08:42:21PM +1000, John Saunders wrote:
 > 
 > >Description:
 > 
 > 	make buildworld has been broken for about a week in libbsnmp.
 > 	5 cvsup's and builds over the last week produces the same
 > 	identical fault.
 > 
 > ===> lib/libbsnmp/modules
 > ===> lib/libbsnmp/modules/snmp_atm
 > cat /usr/src/lib/libbsnmp/modules/snmp_atm/../../../../contrib/ngatm/snmp_atm/atm_tree.def /usr/src/lib/libbsnmp/modules/snmp_atm/atm_freebsd.def | gensnmptree -e begemotAtm > atm_oid.h
 > line 110: junk after closing ')'
 > context: "1 internet
 > *** Error code 1
 > 
 > Stop in /usr/src/lib/libbsnmp/modules/snmp_atm.
 > *** Error code 1
 > 
 > Stop in /usr/src/lib/libbsnmp/modules.
 > *** Error code 1
 > 
 > >How-To-Repeat:
 > 
 > 	cvsup to the latest abd make buildworld. I have tried 5 cvsup's
 > 	and builds over the last week with identical failures.
 > 
 > 	Tried make includes as sometimes the build tree picks up
         ^^^^^^^^^^^^^^^^^^^
 
 Please see below why running ``make includes'' is a very bad idea.
 
 > 	includes from /usr/includes when it shouldn't. However this
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 > 	doesn't help.
 > 
 
 buildworld should never use stuff from /usr/include at stage 4.
 If it does, this is a bug.  Please come back to me if you have
 some real facts that it does.
 
 > 	The build line cat's two files together and pipes it into
 > 	gensnmptree and when I run the command manually it too fails.
 > 	Catting the 2 files creates an unparsable file and appears to
 > 	be an error.
 > 
 When you did ``make includes'', it has overwritten your /usr/include
 with fresh copies of header files that do not match your running
 world/kernel.  In particular, you have spammed your /usr/include/osreldate.h
 with a more recent version; now buildworld thinks you're running a
 more recent version of the system than you're actually running,
 including an updated gensnmptree(1) utility, which you don't in fact
 have updated.  You can work around it with this command:
 
 	make buildworld BOOTSTRAPPING=502127
 
 This will cause buildworld to recompile gensnmptree(1) responsible for
 the breakage you're seeing.
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru@FreeBSD.org
 FreeBSD committer
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Aug 16 13:03:21 GMT 2004 
State-Changed-Why:  
Pilot error. 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Mon Aug 16 13:03:21 GMT 2004 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=70532 

From: "John Saunders" <john@saunders.id.au>
To: "Ruslan Ermilov" <ru@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: misc/70532: make buildworld broken in libbsnmp
Date: Wed, 18 Aug 2004 19:12:08 +1000

 > buildworld should never use stuff from /usr/include at stage 4.
 > If it does, this is a bug.  Please come back to me if you have
 > some real facts that it does.
 
 I had a problem a couple of years ago with 4.5-STABLE, see PR
 bin/37498, that was solved using "make includes". I have since
 used that trick a few times to fix 4.x build glitches.
 
 However it probably doesn't apply anymore to 5.x, and the
 original problem may have been something with that machine
 (which is different to the machine the current PR is for)
 as the PR was never explained.
 
 > You can work around it with this command:
 > 
 > make buildworld BOOTSTRAPPING=502127
 
 This didn't fix it. However editing /usr/include/osreldate.h
 did. Also looking at Makefile.inc1 is appears that running
 "make buildworld OSRELDATE=0" would ensure all bootstrap tools
 are built.
 
 Looking at Makefile.inc1 it seems that "make includes" is
 very dangerous to build system health. So I will stop doing
 that now.
 
 Thanks.
 

From: Ruslan Ermilov <ru@freebsd.org>
To: John Saunders <john@saunders.id.au>
Cc: bug-followup@freebsd.org
Subject: Re: misc/70532: make buildworld broken in libbsnmp
Date: Wed, 18 Aug 2004 12:28:00 +0300

 On Wed, Aug 18, 2004 at 07:12:08PM +1000, John Saunders wrote:
 > > buildworld should never use stuff from /usr/include at stage 4.
 > > If it does, this is a bug.  Please come back to me if you have
 > > some real facts that it does.
 > 
 > I had a problem a couple of years ago with 4.5-STABLE, see PR
 > bin/37498, that was solved using "make includes". I have since
 > used that trick a few times to fix 4.x build glitches.
 > 
 Well, we cannot defend you from shooting yourself in the foot.
 If you ruined your build environment in some way, like doing
 partial upgrade of some library, or installing new C headers
 without upgrading the world and/or kernel, you're on your own
 to resolve this.  It's a strong requirement to have a sane
 build system before doing a buildworld and, to a lesser extent,
 buildkernel.
 
 > > You can work around it with this command:
 > > 
 > > make buildworld BOOTSTRAPPING=502127
 > 
 > This didn't fix it. However editing /usr/include/osreldate.h
 > did.
 > 
 Oh my, I meant you should have ran the following:
 
 	make buildworld OSRELDATE=502127
 
 That would have the same effect as editing /usr/include/osreldate.h.
 
 > Also looking at Makefile.inc1 is appears that running
 > "make buildworld OSRELDATE=0" would ensure all bootstrap tools
 > are built.
 > 
 Yes.  If you screwed your rather old system by installing new
 headers while not really upgrading world and kernel, this may
 help.  It's not guaranteed though, because /usr/include headers
 may be incompatible with your libraries and a running kernel,
 and some tools (including the compiler, binutils, and any of
 special bootstrap- and build-tools) are built using the
 installed headers and libraries.  It's simple: if you remove
 or even modify in an incompatible way your /usr/include/stdio.h
 header, you're unlikely to succeed in buildworld.
 
 > Looking at Makefile.inc1 it seems that "make includes" is
 > very dangerous to build system health. So I will stop doing
 > that now.
 > 
 Yes, please.  ;)
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru@FreeBSD.org
 FreeBSD committer
>Unformatted:
