NetBSD Problem Report #53796

From  Mon Dec 17 01:37:49 2018
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 02B677A1DA
	for <>; Mon, 17 Dec 2018 01:37:49 +0000 (UTC)
Message-Id: <>
Date: Mon, 17 Dec 2018 01:37:47 +0000 (UTC)
Subject: make prints wrong makefile path in an error message
X-Send-Pr-Version: www-1.0

>Number:         53796
>Category:       toolchain
>Synopsis:       make prints wrong makefile path in an error message
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 17 01:40:00 +0000 2018
>Last-Modified:  Tue Dec 25 14:10:00 +0000 2018
>Originator:     Valery Ushakov
>Release:        NetBSD 8
Make seems to mangle the path to an included makefile in an error message 
when that makefile contains an error.

$ mkdir -p m/m/m/m
$ echo '.include "../../../../"' > m/m/m/m/Makefile
$ cat >
        echo hello world
$ cd m/m/m/m
$ make
make: "../../../../../../../../" line 1: Unassociated shell command "error"
make: Fatal errors encountered -- cannot continue

Note the the number of ".."s is double.

I've just stumbled into it with a current build, but I can see this bug
also on my -6 system.



From: "Christos Zoulas" <>
Subject: PR/53796 CVS commit: src/usr.bin/make
Date: Sun, 16 Dec 2018 21:06:01 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Mon Dec 17 02:06:00 UTC 2018

 Modified Files:
 	src/usr.bin/make: parse.c

 Log Message:
 PR/53796: Valery Ushakov: make prints wrong makefile path in an error message
 Use ${.CURDIR} if ${.PARSEDIR} is not absolute.

 To generate a diff of this commit:
 cvs rdiff -u -r1.229 -r1.230 src/usr.bin/make/parse.c

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

State-Changed-From-To: open->feedback
State-Changed-When: Tue, 25 Dec 2018 13:26:30 +0000
Is this solution good?

From: Valery Ushakov <>
Subject: Re: toolchain/53796 (make prints wrong makefile path in an error
Date: Tue, 25 Dec 2018 17:07:59 +0300

 On Tue, Dec 25, 2018 at 13:26:31 +0000, wrote:

 > State-Changed-From-To: open->feedback

 Why?  Am I in possession of unique ability to run make in some
 esoteric setup?



NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.