NetBSD Problem Report #48907

From martin@duskware.de  Sat Jun 14 08:02:24 2014
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7C06AA653F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 14 Jun 2014 08:02:24 +0000 (UTC)
Date: Sat, 14 Jun 2014 10:02:20 CEST
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: make issues fatal errors as warnings
X-Send-Pr-Version: 3.95

>Number:         48907
>Category:       bin
>Synopsis:       make issues fatal errors as warnings
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 14 08:05:00 +0000 2014
>Last-Modified:  Tue Jun 17 05:15:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.43
>Organization:
The NetBSD Foundation, Inc
>Environment:

System: NetBSD night-owl.duskware.de 6.99.43 NetBSD 6.99.43 (NIGHT-OWL) #261: Sat Jun 7 11:51:30 CEST 2014 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:
When handling VAR := assignements, make uses this code in usr.bin/make/parse.c:

        res = Cmd_Exec(cp, &error);
        Var_Set(line, res, ctxt, 0);
        free(res);

        if (error)
            Parse_Error(PARSE_WARNING, error, cp);

This is the only case where Cmd_Exec returns an error message and the result
is issued as a warning, not an error.

Thise may lead to hard to track down build failures, e.g. an example from
the NetBSD build cluster:

nbmake[8]: "/home/builds/ab/HEAD/src/crypto/external/bsd/openssl/lib/libcrypto/Makefile" line 45: warning: Couldn't exec "/bin/sh /home/builds/ab/HEAD/src/sys/conf/osrelease.sh"

Also maybe the errno should be printed (in this case it is important to know
wether we hit a resource limit or the file did not exist) - but of course
we do know that /bin/sh existed.

>How-To-Repeat:
read the code

>Fix:
n/a

>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: re: bin/48907: make issues fatal errors as warnings
Date: Sun, 15 Jun 2014 04:54:37 +1000

 if you make this a fatal error the build will break in GCC 4.8
 right now because "DEV-PHASE" file is empty and make complains
 about "no output from shell" or something, even tho getting a
 empty output is actually what we want.


 .mrg.

From: Martin Husemann <martin@duskware.de>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@NetBSD.org
Subject: Re: bin/48907: make issues fatal errors as warnings
Date: Sun, 15 Jun 2014 05:56:06 +0200

 On Sun, Jun 15, 2014 at 04:54:37AM +1000, matthew green wrote:
 > 
 > 
 > if you make this a fatal error the build will break in GCC 4.8
 > right now because "DEV-PHASE" file is empty and make complains
 > about "no output from shell" or something, even tho getting a
 > empty output is actually what we want.

 Why is this not a bug in the makefile? Wrap it in .if exists() ?

 Martin

From: matthew green <mrg@eterna.com.au>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org
Subject: re: bin/48907: make issues fatal errors as warnings
Date: Sun, 15 Jun 2014 17:28:20 +1000

 Martin Husemann writes:
 > On Sun, Jun 15, 2014 at 04:54:37AM +1000, matthew green wrote:
 > > 
 > > 
 > > if you make this a fatal error the build will break in GCC 4.8
 > > right now because "DEV-PHASE" file is empty and make complains
 > > about "no output from shell" or something, even tho getting a
 > > empty output is actually what we want.
 > 
 > Why is this not a bug in the makefile? Wrap it in .if exists() ?

 it is a zero length file.


 .mrg.

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/48907: make issues fatal errors as warnings
Date: Tue, 17 Jun 2014 05:10:44 +0000

 On Sat, Jun 14, 2014 at 06:55:01PM +0000, matthew green wrote:
  >  if you make this a fatal error the build will break in GCC 4.8
  >  right now because "DEV-PHASE" file is empty and make complains
  >  about "no output from shell" or something, even tho getting a
  >  empty output is actually what we want.

 That check catches a lot more problems than it causes (even though it
 can be annoying) so in the absence of other ideas I'd rather keep it.
 It shouldn't be fatal, but genuine exec errors should be.

 (also, may I edit the original submission to refer to != instead
 of :=? that was confusing at first.)

 -- 
 David A. Holland
 dholland@netbsd.org

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.