NetBSD Problem Report #45620

From njoly@lanfeust.sis.pasteur.fr  Thu Nov 17 00:22:05 2011
Return-Path: <njoly@lanfeust.sis.pasteur.fr>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id C0D7463CC01
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Nov 2011 00:22:04 +0000 (UTC)
Message-Id: <20111117002158.F2D98DC9BD@lanfeust.sis.pasteur.fr>
Date: Thu, 17 Nov 2011 01:21:58 +0100 (CET)
From: njoly@pasteur.fr
Reply-To: njoly@pasteur.fr
To: gnats-bugs@gnats.NetBSD.org
Subject: MAKEDEV failures remains unoticed in miniroot build
X-Send-Pr-Version: 3.95

>Number:         45620
>Category:       toolchain
>Synopsis:       MAKEDEV failures remains unoticed in miniroot build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 17 00:25:00 +0000 2011
>Last-Modified:  Thu Feb 16 14:15:03 +0000 2012
>Originator:     Nicolas Joly
>Release:        NetBSD 5.99.56
>Organization:
Insitut Pasteur
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 5.99.56 NetBSD 5.99.56 (LANFEUST) #10: Wed Nov 16 11:44:37 CET 2011 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
While cross-building sparc on my amd64 workstation, i luckily found that
MAKEDEV failures remains unoticed while building miniroot:

[...]
#     strip  instbin
#    create  miniroot/devices.spec
rm -f devices.spec devices.spec.tmp
MACHINE=sparc MACHINE_ARCH=sparc  /bin/sh /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV -s all  | /local/src/NetBSD/tool/bin/nbsed -e '/^\. type=dir/d' -e 's,^\.,./dev,'  > devices.spec.tmp  && sort -o devices.spec devices.spec.tmp
/local/src/NetBSD/src/etc/obj.sparc/MAKEDEV: bpp: unknown device
/local/src/NetBSD/src/etc/obj.sparc/MAKEDEV: bpp: unknown device
#    create  miniroot/work.spec
rm -f work.spec work.spec.tmp
[...]

>How-To-Repeat:
Build sparc miniroot.
>Fix:

>Audit-Trail:
From: "Takeshi Nakayama" <nakayama@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45620 CVS commit: src/etc
Date: Fri, 10 Feb 2012 20:54:12 +0000

 Module Name:	src
 Committed By:	nakayama
 Date:		Fri Feb 10 20:54:11 UTC 2012

 Modified Files:
 	src/etc: MAKEDEV.tmpl

 Log Message:
 Remove "spif[0-9]*" case from ports other than sparc{,64} by using
 %stty_chr% and %sbpp_chr%.

 Fix "MAKEDEV: bpp: unknown device" error on sparc{,64}, which is
 observed in PR toolchain/45620 but not the fix.

 Approved by releng.


 To generate a diff of this commit:
 cvs rdiff -u -r1.150 -r1.151 src/etc/MAKEDEV.tmpl

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Nicolas Joly <njoly@pasteur.fr>
To: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/45620: MAKEDEV failures remains unoticed in miniroot
 build
Date: Tue, 13 Dec 2011 09:04:03 +0100

 On Thu, Nov 17, 2011 at 12:25:00AM +0000, Nicolas Joly wrote:
 > >Number:         45620
 > >Category:       toolchain
 > >Synopsis:       MAKEDEV failures remains unoticed in miniroot build
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    toolchain-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Nov 17 00:25:00 +0000 2011
 > >Originator:     Nicolas Joly
 > >Release:        NetBSD 5.99.56
 > >Organization:
 > Insitut Pasteur
 > >Environment:
 > System: NetBSD lanfeust.sis.pasteur.fr 5.99.56 NetBSD 5.99.56 (LANFEUST) #10: Wed Nov 16 11:44:37 CET 2011 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LANFEUST amd64
 > Architecture: x86_64
 > Machine: amd64
 > >Description:
 > While cross-building sparc on my amd64 workstation, i luckily found that
 > MAKEDEV failures remains unoticed while building miniroot:
 > 
 > [...]
 > #     strip  instbin
 > #    create  miniroot/devices.spec
 > rm -f devices.spec devices.spec.tmp
 > MACHINE=sparc MACHINE_ARCH=sparc  /bin/sh /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV -s all  | /local/src/NetBSD/tool/bin/nbsed -e '/^\. type=dir/d' -e 's,^\.,./dev,'  > devices.spec.tmp  && sort -o devices.spec devices.spec.tmp
 > /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV: bpp: unknown device
 > /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV: bpp: unknown device
 > #    create  miniroot/work.spec
 > rm -f work.spec work.spec.tmp
 > [...]

 The following patch improves the situation. I moved the pipe to group
 sed (which is unlikely to fail) and sort. Unfortunately the error
 still gets ignored for parallel builds.

 njoly@lanfeust [src/distrib]> /local/src/NetBSD/tool/bin/nbmake-sparc dependall
 [...]
       strip  instbin
      create  miniroot/devices.spec
 /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV: bpp: unknown device
 /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV: bpp: unknown device

 *** Failed target:  devices.spec
 *** Failed command: MACHINE=sparc MACHINE_ARCH=sparc /bin/sh /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV -s all > devices.spec.tmp
 *** Error code 1

 njoly@lanfeust [src/distrib]> /local/src/NetBSD/tool/bin/nbmake-sparc -j 2 dependall
 [...]
      create  ramdisk/devices.spec
 rm -f devices.spec devices.spec.tmp
 /local/src/NetBSD/src/etc/obj.sparc/MAKEDEV: bpp: unknown device
 --- devices.spec ---
 *** [devices.spec] Error code 1 (ignored)
 rm -f ramdiskbin.conf ramdiskbin.conf.tmp
      create  ramdisk/work.spec
 [...]

 -- 
 Nicolas Joly

 Projects and Developments in Bioinformatics
 Institut Pasteur, Paris.

From: Nicolas Joly <njoly@pasteur.fr>
To: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/45620: MAKEDEV failures remains unoticed in miniroot
 build
Date: Tue, 13 Dec 2011 09:05:32 +0100

 --dDRMvlgZJXvWKvBx
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Tue, Dec 13, 2011 at 09:04:03AM +0100, Nicolas Joly wrote:
 > 
 > The following patch improves the situation. I moved the pipe to group
 > sed (which is unlikely to fail) and sort. Unfortunately the error
 > still gets ignored for parallel builds.

 With the patch this time.

 -- 
 Nicolas Joly

 Projects and Developments in Bioinformatics
 Institut Pasteur, Paris.

 --dDRMvlgZJXvWKvBx
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="netbsd-devicesspec.diff"

 Index: distrib/common/Makefile.makedev
 ===================================================================
 RCS file: /cvsroot/src/distrib/common/Makefile.makedev,v
 retrieving revision 1.15
 diff -u -p -r1.15 Makefile.makedev
 --- distrib/common/Makefile.makedev	25 Oct 2008 22:27:34 -0000	1.15
 +++ distrib/common/Makefile.makedev	23 Nov 2011 20:04:00 -0000
 @@ -46,9 +46,9 @@ ${MAKEDEVSPEC}:	${MAKEDEVSCRIPT}
  	-rm -f ${.TARGET} ${.TARGET}.tmp
  	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
  	    ${HOST_SH} ${MAKEDEVSCRIPT} -s ${MAKEDEVTARGETS} \
 -	    | ${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' \
 -	    > ${.TARGET}.tmp \
 -	&& sort -o ${.TARGET} ${.TARGET}.tmp
 +	    > ${.TARGET}.tmp
 +	${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' ${.TARGET}.tmp \
 +	    | sort -o ${.TARGET}

  .else	# ! MAKEDEVTARGETS


 --dDRMvlgZJXvWKvBx--

From: dieter roelants <dieter.NetBSD@pandora.be>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/45620: MAKEDEV failures remains unoticed in miniroot
 build
Date: Wed, 15 Feb 2012 20:05:48 +0100

 On Tue, 14 Feb 2012 20:25:02 +0000 (UTC)
 Nicolas Joly <njoly@pasteur.fr> wrote:

 >  The following patch improves the situation. I moved the pipe to group
 >  sed (which is unlikely to fail) and sort. Unfortunately the error
 >  still gets ignored for parallel builds.

 I think the patch will work if you remove the leading "-" from the rm
 command. This is probably ok anyway, because rm -f will not fail for
 nonexisting files and for other errors (e.g. EPERM) failing seems to be
 the right thing to do.

 (As for why make decides to ignore the exit status of all commands for
 the target, I have no clue. I'll ask on tech-userlevel.)

 dieter

From: Nicolas Joly <njoly@pasteur.fr>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, njoly@pasteur.fr
Subject: Re: toolchain/45620: MAKEDEV failures remains unoticed in miniroot build
Date: Thu, 16 Feb 2012 13:49:03 +0100

 On Wed, Feb 15, 2012 at 07:25:03PM +0000, dieter roelants wrote:
 > The following reply was made to PR toolchain/45620; it has been noted by GNATS.
 > 
 > From: dieter roelants <dieter.NetBSD@pandora.be>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: toolchain/45620: MAKEDEV failures remains unoticed in miniroot
 >  build
 > Date: Wed, 15 Feb 2012 20:05:48 +0100
 > 
 >  On Tue, 14 Feb 2012 20:25:02 +0000 (UTC)
 >  Nicolas Joly <njoly@pasteur.fr> wrote:
 >  
 >  >  The following patch improves the situation. I moved the pipe to group
 >  >  sed (which is unlikely to fail) and sort. Unfortunately the error
 >  >  still gets ignored for parallel builds.
 >  
 >  I think the patch will work if you remove the leading "-" from the rm
 >  command. This is probably ok anyway, because rm -f will not fail for
 >  nonexisting files and for other errors (e.g. EPERM) failing seems to be
 >  the right thing to do.

 Seems the right thing to do ... I'm testing it, and will commit if
 successful.

 >  (As for why make decides to ignore the exit status of all commands for
 >  the target, I have no clue. I'll ask on tech-userlevel.)

 I can reproduce the problem with this small testcase.

 njoly@lanfeust [tmp/make]> cat Makefile
 foo:
         -true
         false
 njoly@lanfeust [tmp/make]> make
 true
 false
 *** Error code 1

 Stop.
 make: stopped in /home/njoly/tmp/make
 njoly@lanfeust [tmp/make]> make -j 1
 true
 false
 *** [foo] Error code 1 (ignored)

 Looks like a 'make -j' bug to me; at least, behaviour should be
 identical.

 Thanks.

 -- 
 Nicolas Joly

 Projects and Developments in Bioinformatics
 Institut Pasteur, Paris.

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/45620: MAKEDEV failures remains unoticed in miniroot
 build
Date: Thu, 16 Feb 2012 16:12:11 +0200

 On Thu, 16 Feb 2012, Nicolas Joly wrote:
 >I can reproduce the problem with this small testcase.
 >
 >njoly@lanfeust [tmp/make]> cat Makefile
 >foo:
 >        -true
 >        false
 >njoly@lanfeust [tmp/make]> make
 >true
 >false
 >*** Error code 1
 >
 >Stop.
 >make: stopped in /home/njoly/tmp/make
 >njoly@lanfeust [tmp/make]> make -j 1
 >true
 >false
 >*** [foo] Error code 1 (ignored)
 >
 >Looks like a 'make -j' bug to me; at least, behaviour should be
 >identical.

 That's different from the problem in PR 45356, but it prbably has a
 similar underlying cause.

 --apb (Alan Barrett)

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.