NetBSD Problem Report #58359
From www@netbsd.org Sat Jun 22 13:15:53 2024
Return-Path: <www@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 6D48C1A923C
for <gnats-bugs@gnats.NetBSD.org>; Sat, 22 Jun 2024 13:15:53 +0000 (UTC)
Message-Id: <20240622131552.777911A923E@mollari.NetBSD.org>
Date: Sat, 22 Jun 2024 13:15:52 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: libcbor/lib/Makefile has inadequate dependency
X-Send-Pr-Version: www-1.0
>Number: 58359
>Category: lib
>Synopsis: libcbor/lib/Makefile has inadequate dependency
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: riastradh
>State: needs-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 22 13:20:00 +0000 2024
>Closed-Date:
>Last-Modified: Mon Jun 24 18:05:01 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10
>Organization:
The NetOBJS Foundation
>Environment:
>Description:
The libcbor build requires a file configuration.h which we create by explicit make rules:
${OBJS}: cbor/configuration.h
cbor/configuration.h: ${VERS_FILE}
@mkdir -p cbor && ( \
echo '#define CBOR_MAJOR_VERSION ${CBOR_VERSION_MAJOR}' && \
...
echo '#define CBOR_INLINE_SPECIFIER ') > ${.TARGET}
However, this file is used not just to build OBJS, i.e., the .o files of the static library, but also the .po and .pico and .ln files and so on.
>How-To-Repeat:
make -jLARGE
>Fix:
Use ALLOBJS instead of OBJS.
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58359 CVS commit: src/external/mit/libcbor/lib
Date: Sat, 22 Jun 2024 13:36:54 +0000
Module Name: src
Committed By: riastradh
Date: Sat Jun 22 13:36:54 UTC 2024
Modified Files:
src/external/mit/libcbor/lib: Makefile
Log Message:
libcbor: Fix make dependencies on configuration.h.
PR lib/58359
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mit/libcbor/lib/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: lib-bug-people->riastradh
Responsible-Changed-By: riastradh@NetBSD.org
Responsible-Changed-When: Sat, 22 Jun 2024 13:43:24 +0000
Responsible-Changed-Why:
mine
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 22 Jun 2024 13:43:24 +0000
State-Changed-Why:
needs pullup-10
inapplicable <=9, no libcbor
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/58359 CVS commit: src/external/mit/libcbor/lib
Date: Mon, 24 Jun 2024 18:01:04 +0000
Module Name: src
Committed By: riastradh
Date: Mon Jun 24 18:01:04 UTC 2024
Modified Files:
src/external/mit/libcbor/lib: Makefile
Log Message:
libcbor: Undo make dependencies `fix' and tidy up.
1. There is no need for ${ALLOBJS} to depend on cbor/configuration.h,
because cbor/configuration.h is already installed by make includes
long before we get to make dependall, let alone make all.
2. Now that we don't use ${ALLOBJS} in a rule, put bsd.lib.mk at the
end where it normally belongs.
3. Make the cbor/configuration.h recipe interruption-safe by writing
to a temporary file first and then renaming it.
4. Nix needless empty .BEGIN rule. Pretty sure this doesn't do
anything.
My previous hypothesis about why this could have happened ceased to
make sense once I realized that cbor/configuration.h is supposed to
be installed in /usr/include. I no longer have a hypothesis about
how PR lib/58359 could have happened, unless perhaps the build had
been previously interrupted, leaving an empty
$DESTDIR/usr/include/cbor/configuration.h file.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/libcbor/lib/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.