NetBSD Problem Report #60239

From martin@duskware.de  Fri May  8 09:35:52 2026
Return-Path: <martin@duskware.de>
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) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EDFB11A9239
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  8 May 2026 09:35:51 +0000 (UTC)
Message-Id: <20260508093548.911FFE1FF7A@mail.duskware.de>
Date: Fri, 08 May 2026 11:35:43 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: tools are used in the cleandir phase before being build
X-Send-Pr-Version: 3.95
X-From4GNATS: "martin@NetBSD.org via gnats" <gnats-admin@NetBSD.org>

>Number:         60239
>Category:       toolchain
>Synopsis:       tools are used in the cleandir phase before being build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 08 09:40:00 +0000 2026
>Originator:     Martin Husemann
>Release:        NetBSD 11.99.5
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD big-apple.aprisoft.de 11.99.5 NetBSD 11.99.5 (POWERMAC_G5.MP) #159: Thu Apr 2 12:04:52 CEST 2026 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/macppc/compile/POWERMAC_G5.MP macppc
Architecture: powerpc
Machine: macppc
>Description:

Stumbled over this by accident, it seems to be mostly harmless but causes
distracting warnings.

We have some places in various makefiles like this sniplet from bin/sh/Makefile:

BUILD_DATE!=    ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%Y%m%d%H%M%S"

This is all fine, but it is also invoked during the cleandir phase of the
build, which happens before the tools are even build.

This causes warnings/errors:

.../src/bin/sh/Makefile:38: warning: Command "/home/builds/ab/netbsd-11/vax/20260507182340Z-tools/bin/nbdate -u -r "1778178220" "+%Y%m%d%H%M%S"" exited with status 127

Besides for TOOL_DATE I have also seen it for TOOL_SED (but am not sure this
list is complete).

>How-To-Repeat:

Look at build logs/code inspection

>Fix:
wrap the != with TOOLS_* in .if excluding cleandir?

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.