NetBSD Problem Report #59073

From dholland@netbsd.org  Thu Feb 13 06:10:08 2025
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0D1471A923A
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Feb 2025 06:10:08 +0000 (UTC)
Message-Id: <20250213061007.790B684DF3@mail.netbsd.org>
Date: Thu, 13 Feb 2025 06:10:07 +0000 (UTC)
From: dholland@NetBSD.org
Reply-To: dholland@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: make(1) sets $* / $(.PREFIX) wrong in -j mode
X-Send-Pr-Version: 3.95

>Number:         59073
>Category:       bin
>Synopsis:       make(1) sets $* / $(.PREFIX) wrong in -j mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 13 06:15:00 +0000 2025
>Last-Modified:  Mon Jan 05 22:45:00 +0000 2026
>Originator:     David A. Holland
>Release:        NetBSD 10.99.10 (20240218)
>Organization:
Quantum Ailurodynamics Lab
>Environment:
System: NetBSD valkyrie 10.99.10 NetBSD 10.99.10 (VALKYRIE2) #0: Mon Feb 19 02:27:48 EST 2024  dholland@valkyrie:/y/objects/usrobj/sys/arch/amd64/compile/VALKYRIE2 amd64
Architecture: x86_64
Machine: amd64
>Description:

Take this makefile:
   --------
SRCS=foo/bar.c
OBJS=$(SRCS:.c=.o)

all: $(OBJS)

.c.o:
        @echo '$$@ is $@'
        @echo '$$< is $<'
        @echo '$$* is $*'
   --------
then mkdir foo and touch foo/bar.c.

Running "make" prints:
$@ is foo/bar.o
$< is foo/bar.c
$* is foo/bar

Running "make -j1" prints:
$@ is foo/bar.o
$< is foo/bar.c
$* is bar

IOW, $* is wrong but only in -j mode.

This is probably related to why I had to revert my candidate fix for
PR 43534 back in 2010, so upon cleaning this up it is probably then
worth looking at that one again.

>How-To-Repeat:

As above.

>Fix:

No idea, alas.

>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59073 CVS commit: pkgsrc/comms/binkd
Date: Thu, 13 Feb 2025 06:25:39 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Thu Feb 13 06:25:39 UTC 2025

 Modified Files:
 	pkgsrc/comms/binkd: Makefile distinfo
 	pkgsrc/comms/binkd/patches: patch-aa

 Log Message:
 comms/binkd: tidy.

 Clear PKG_DESTDIR_SUPPORT=destdir (not user-destdir). There is no
 reason for this that I can find.

 Clear MAKE_JOBS_SAFE=no. Other than a cosmetic problem with a
 post-build message, the actual issue turns out to be a bmake bug.
 (PR 59073) Add a couple small makefile adjustments to cope.

 Clear BROKEN_ON_PLATFORM=${LP64PLATFORMS}. This seems to have been set
 in 1999 and carried around uncritically ever since, across multiple
 updates. It builds cleanly with -Wall on amd64, and while I can't test
 (not sure anyone much can test this nowadays) that's usually a good
 sign, and in 1999 it was described as "hopeless".

 Tidy some pkglint.


 To generate a diff of this commit:
 cvs rdiff -u -r1.34 -r1.35 pkgsrc/comms/binkd/Makefile
 cvs rdiff -u -r1.8 -r1.9 pkgsrc/comms/binkd/distinfo
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/comms/binkd/patches/patch-aa

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

From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59073 CVS commit: src/usr.bin/make/unit-tests
Date: Mon, 5 Jan 2026 22:44:15 +0000

 Module Name:	src
 Committed By:	rillig
 Date:		Mon Jan  5 22:44:14 UTC 2026

 Modified Files:
 	src/usr.bin/make/unit-tests: var-scope-local.exp var-scope-local.mk

 Log Message:
 tests/make: demonstrate differing ${.PREFIX} in jobs and compat mode

 Reported in PR 59073 by David A. Holland.


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/var-scope-local.exp
 cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/var-scope-local.mk

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

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 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.