NetBSD Problem Report #50550

From www@NetBSD.org  Mon Dec 14 09:58:12 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(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 237837ABDD
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 14 Dec 2015 09:58:12 +0000 (UTC)
Message-Id: <20151214095811.12A6E7ACBE@mollari.NetBSD.org>
Date: Mon, 14 Dec 2015 09:58:11 +0000 (UTC)
From: carsten.kunze@arcor.de
Reply-To: carsten.kunze@arcor.de
To: gnats-bugs@NetBSD.org
Subject: Deleting suffixes with an empty .SUFFIXES line causes issues in make
X-Send-Pr-Version: www-1.0

>Number:         50550
>Category:       toolchain
>Synopsis:       make: deleting suffixes with an empty .SUFFIXES line causes issues
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rillig
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 14 10:00:00 +0000 2015
>Closed-Date:    Sun Jun 29 07:40:38 +0000 2025
>Last-Modified:  Sun Jun 29 07:50:47 +0000 2025
>Originator:     Carsten Kunze
>Release:        at least 7.0 up to CURRENT
>Organization:
>Environment:
NetBSD pcdd146.dmosdesign.com 7.99.23 NetBSD 7.99.23 (GENERIC.201512040830Z) #0: Fri Dec  4 09:27:03 UTC 2015  builds@b45.netbsd.org:/home/builds/ab/HEAD/amd64/201512040830Z-obj/home/source/ab/HEAD/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When there is a file "test.1.man" and a makefile:

.SUFFIXES:
.SUFFIXES: .roff .in .ps .mom .pdf .me .ms .ps .html .txt .texi .dvi .pdf .xhtml .man .c .cpp .log .o .obj .sed .sin .test .test$(EXEEXT) .trs .ypp

.man:
        @echo Making $@ from $<
        rm -f $@
        @LC_ALL=C \
         sed -e "s|foo|bar|g" \
         $< >$@

"make test.1" results in "make: don't know how to make test.1. Stop".

When ".man" is put to the start of the list it works.  It also works when the first .SUFFIXES line is removed.  So deleting suffixes with an empty .SUFFIXES line may cause issues.

(This problem was found while building current groff which does not work on NetBSD currently.)
>How-To-Repeat:
Create a file named test.1.man and a makefile with the contents shown in "Full description".  Run "make test.1" -> failes.  If ".SUFFIXES" is removed *and/or* ".man" is put at begin of the list it works.
>Fix:

>Release-Note:

>Audit-Trail:
From: Carsten Kunze <carsten.kunze@arcor.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/50550
Date: Sun, 4 Dec 2016 08:01:44 +0100 (CET)

 Tested, solution is working.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 13 Aug 2021 21:31:23 +0000
State-Changed-Why:
 > Tested, solution is working.
Did that solution (not described in here AFAICT) ever get committed?


Responsible-Changed-From-To: toolchain-manager->rillig
Responsible-Changed-By: rillig@NetBSD.org
Responsible-Changed-When: Sun, 29 Jun 2025 07:40:38 +0000
Responsible-Changed-Why:
I'm taking it.


State-Changed-From-To: feedback->dead
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sun, 29 Jun 2025 07:40:38 +0000
State-Changed-Why:
I tried all make versions from 1993 to today, and they work fine.
They all output "Making test.1 from test.1.man",
except for some memory handling bugs here or there.
None of the versions outputs "don't know how to make test.1".


State-Changed-From-To: dead->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sun, 29 Jun 2025 07:50:47 +0000
State-Changed-Why:
Correction: the bug was fixed in suff.c 1.75 from 2015-12-20.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.