NetBSD Problem Report #55539
From www@netbsd.org Tue Aug 4 14:47:00 2020
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 "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 353801A9217
for <gnats-bugs@gnats.NetBSD.org>; Tue, 4 Aug 2020 14:47:00 +0000 (UTC)
Message-Id: <20200804144659.4E4271A923A@mollari.NetBSD.org>
Date: Tue, 4 Aug 2020 14:46:59 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: pkgsrc graphviz-2.44.1 fails too build - failure to expand make variable?
X-Send-Pr-Version: www-1.0
>Number: 55539
>Category: pkg
>Synopsis: pkgsrc graphviz-2.44.1 fails too build - failure to expand make variable?
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: rillig
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 04 14:50:00 +0000 2020
>Closed-Date: Sat Sep 05 05:19:32 +0000 2020
>Last-Modified: Sat Sep 05 05:19:32 +0000 2020
>Originator: Jason Thorpe
>Release: NetBSD 9.99.69 - pkgsrc trunk from Aug 3 2020
>Organization:
RISCy Business
>Environment:
NetBSD stinky 9.99.69 NetBSD 9.99.69 (GENERIC) #0: Mon Aug 3 06:30:00 UTC 2020 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
graphviz-2.44.1 build gets stuck with an apparent failure to expand a make variable. This may be a recent regression in make?
===> Building for graphviz-2.44.1
touch /home/nbsd/pkgsrc/graphics/graphviz/work/graphviz-2.44.1/Makefile /home/nbsd/pkgsrc/graphics/graphviz/work/graphviz-2.44.1/graphviz_version.h
/usr/bin/make all-recursive
Making all in libltdl
/usr/bin/make all-am
Making all in lib
Making all in cdt
groff -Tps -man >cdt.3.ps
>How-To-Repeat:
Attempt to build graphviz-2.44.1 from pkgsrc-current on the Aug 03 NetBSD daily build of NetBSD/amd64.
>Fix:
"USE_TOOLS+= gmake" works around the problem. (Must do a "make clean" first.)
>Release-Note:
>Audit-Trail:
From: Tobias Nygren <tnn@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539: pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?
Date: Tue, 4 Aug 2020 20:39:22 +0200
Could not reproduce. Output of "ident /usr/bin/make"?
From: Jason Thorpe <thorpej@me.com>
To: Tobias Nygren <tnn@netbsd.org>
Cc: pkg-manager@netbsd.org,
gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org,
gnats-bugs@netbsd.org
Subject: Re: pkg/55539: pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?
Date: Tue, 4 Aug 2020 11:42:40 -0700
> On Aug 4, 2020, at 11:40 AM, Tobias Nygren <tnn@NetBSD.org> wrote:
>
> Could not reproduce. Output of "ident /usr/bin/make"?
stinky:thorpej 111$ ident /usr/bin/make
/usr/bin/make:
$NetBSD: crt0.S,v 1.4 2018/11/26 17:37:46 joerg Exp $
$NetBSD: crt0-common.c,v 1.23 2018/12/28 20:12:35 christos Exp $
$NetBSD: crti.S,v 1.1 2010/08/07 18:01:35 joerg Exp $
$NetBSD: crtbegin.S,v 1.2 2010/11/30 18:37:59 joerg Exp $
$NetBSD: arch.c,v 1.80 2020/08/01 14:47:49 rillig Exp $
$NetBSD: buf.c,v 1.30 2020/08/01 21:51:22 rillig Exp $
$NetBSD: compat.c,v 1.118 2020/08/01 14:47:49 rillig Exp $
$NetBSD: cond.c,v 1.87 2020/08/01 21:40:49 rillig Exp $
$NetBSD: dir.c,v 1.83 2020/08/01 14:47:49 rillig Exp $
$NetBSD: for.c,v 1.60 2020/08/02 08:10:36 rillig Exp $
$NetBSD: hash.c,v 1.26 2020/08/01 14:47:49 rillig Exp $
$NetBSD: job.c,v 1.205 2020/08/01 14:47:49 rillig Exp $
$NetBSD: lst.c,v 1.3 2020/08/01 14:47:49 rillig Exp $
$NetBSD: main.c,v 1.295 2020/08/02 08:06:35 rillig Exp $
$NetBSD: make.c,v 1.103 2020/08/01 09:55:00 rillig Exp $
$NetBSD: make_malloc.c,v 1.12 2020/07/03 08:02:55 rillig Exp $
$NetBSD: metachar.c,v 1.5 2015/06/19 08:03:35 mlelstv Exp $
$NetBSD: parse.c,v 1.246 2020/08/01 14:47:49 rillig Exp $
$NetBSD: str.c,v 1.54 2020/08/01 10:44:23 rillig Exp $
$NetBSD: strlist.c,v 1.4 2009/01/24 11:59:39 dsl Exp $
$NetBSD: suff.c,v 1.93 2020/08/01 14:47:49 rillig Exp $
$NetBSD: targ.c,v 1.64 2020/07/20 18:12:48 sjg Exp $
$NetBSD: trace.c,v 1.14 2020/08/01 09:55:00 rillig Exp $
$NetBSD: var.c,v 1.407 2020/08/02 20:13:05 rillig Exp $
$NetBSD: util.c,v 1.58 2020/08/01 14:47:49 rillig Exp $
$NetBSD: crtend.S,v 1.1 2010/08/07 18:01:34 joerg Exp $
$NetBSD: crtn.S,v 1.1 2010/08/07 18:01:35 joerg Exp $
stinky:thorpej 112$
-- thorpej
From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539: pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?
Date: Tue, 04 Aug 2020 20:05:47 -0400
I can't reproduce this issue with make from a -current userland built
on July 20th by TNF releng, so, yes, this would seem to be a recent
regression. Having said that, it's still a problem in other contexts,
regardless. I can reproduce this with the make shipped with NetBSD
8.2_STABLE and 9.0_STABLE, since those versions don't define $< in the
context in question. (The confusing thing is that "bmake" as built as a
tool for pbulk builds will be newer than "make" from userland, so that
particular version from pkgsrc does work here; sandboxed builds succeed
on supported releases where a simple "make package" fails.)
Dave
From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539: pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?
Date: Tue, 04 Aug 2020 22:33:47 -0400
I should have written "pbulk builds *may* succeed on NetBSD releases
where 'make package' does not". A pbulk build of the latest graphviz
update happens to have worked for me in a 9.0_STABLE setup I created
in late June.
Dave
Responsible-Changed-From-To: pkg-manager->rillig
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Wed, 05 Aug 2020 09:54:46 +0000
Responsible-Changed-Why:
This is likely caused by recent make changes. Could you have a look at it?
From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539 (pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?)
Date: Thu, 6 Aug 2020 09:24:34 +0200
Thanks for the detailed information so far.
I've built usr.bin/make with the exact same ident strings, and I could
reproduce it on NetBSD 8.0 x86_64. For the record, here is what I did.
I checked out usr.bin/make:
cvs up -D2020.08.02.20.13.06 -C
I added to usr.bin/make/Makefile:
CPPFLAGS+= -D_PATH_DEFSYSPATH='"/home/rillig/pkg/share/mk"'
I built make:
make -s cleandir
make -s make test
I built graphviz (with my default of MAKE_JOBS=7):
cd ~/proj/pkgsrc/graphics/graphviz
~/proj/src/usr.bin/make/make MAKE_FLAGS=-dv 2>&1 | tee out-parallel
This build succeeded.
I then built graphviz again in sequential mode:
env MAKE_JOBS_SAFE=no \
~/proj/src/usr.bin/make/make MAKE_FLAGS=-dv 2>&1 \
| tee out-sequential
This build stopped when groff tried to read a document from stdin to
produce cdt.3.ps, just as in the original report:
...
CCLD libcdt_C.la
cdt.3.ps:> = ./cdt.3
cdt.3.ps:? = ./cdt.3
groff -Tps -man >cdt.3.ps
^C
Here, the document name from $< is missing, and that's no surprise
because there is no variable assignment to $<, only to $>. The relevant
lines from Makefile.am are:
cdt.3.ps: $(srcdir)/cdt.3
@GROFF@ -Tps -man $< >$@
The variable $< is called .IMPSRC and only applies to .SUFFIXES rules
like these:
.3.ps:
@GROFF@ -Tps -man $< >$@
Therefore the behavior in sequential mode makes sense to me.
There's something strange going on here though. The parallel build had
the exact same command lines but continued even though there was no
input on stdin. This might be an unrelated bug. At least I didn't
modify any of that code recently, I modified almost exclusively the
variable parsing and handling.
In parallel mode, for the target cdt.3.ps, the variables @ * > and ? are
set, but not <, just like in sequential mode.
In parallel mode, cdt.3.ps ends up as an empty file, which is much worse
than a build that gets stuck reading from stdin.
I could reproduce the missing argument to groff with bmake from pkgsrc,
the version from 2020-05-24. Therefore, this does not seem like a
recent regression to me.
But on the way to this bug I found an actual difference between bmake
from 2020-05-24 and usr.bin/make from 2020-08-02: The package
graphics/gts builds fine using bmake, but fails with "libtool: cannot
find tag" using usr.bin/make. I'll investigate this.
State-Changed-From-To: open->analyzed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Thu, 06 Aug 2020 07:26:06 +0000
State-Changed-Why:
Analyzed, found one or two bugs.
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539 (pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?)
Date: Fri, 7 Aug 2020 09:43:01 +0100
pbulk of py38-iniconfig-1.0.1 just gave me:
=> Checking file-check results for py38-iniconfig-1.0.1
ERROR: ************************************************************
ERROR: The following files are in the PLIST but not in /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg:
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-1.0.1-py3.8.egg-info/PKG-INFO
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-1.0.1-py3.8.egg-info/SOURCES.txt
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-1.0.1-py3.8.egg-info/dependency_links.txt
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-1.0.1-py3.8.egg-info/top_level.txt
ERROR: ************************************************************
ERROR: The following files are in /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg but not in the PLIST:
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-0.0.0-py3.8.egg-info/PKG-INFO
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-0.0.0-py3.8.egg-info/SOURCES.txt
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-0.0.0-py3.8.egg-info/dependency_links.txt
ERROR: /tmp/pkgsrc/devel/py-iniconfig/work/.destdir/usr/pkg/lib/python3.8/site-packages/iniconfig-0.0.0-py3.8.egg-info/top_level.txt
*** Error code 1
$ make show-var VARNAME=EGG_INFODIR
iniconfig-1.0.1-py3.8.egg-info
Might this be a manifestation of the same bug as not quite so -current
users don't see this?
From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539 (pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?)
Date: Fri, 7 Aug 2020 17:27:13 +0200
On 07.08.2020 10:45, Patrick Welche wrote:
> site-packages/iniconfig-0.0.0-py3.8.egg-info/PKG-INFO
>
> Might this be a manifestation of the same bug as not quite so -current
> users don't see this?
After digging into this, I don't think there is any regression in the
latest usr.bin/make.
I have built usr.bin/make from -D2013.01.01.00.00.00 with a custom
-D_PATH_DEFSYSPATH=3D'"/home/rillig/pkg/share/mk"', and it behaves the
same as the current usr.bin/make, as well as the pkgsrc bmake from
2020-05-24.
My analysis from yesterday may be flawed, I'm not exactly sure. There
was indeed a difference, but when I tried again today, I couldn't
reproduce it anymore.
Just in case some other bugs show up, I have prepared a bunch of make
versions, with custom _PATH_DEFSYSPATH, and they all behave consistently.
A potential source of different behavior is the _PATH_DEFSYSPATH that I
already mentioned, since /usr/share/mk has changed in the last few years
and definitely differs from $pkgsrc_prefix/share/mk. This must be
strictly kept apart when trying to attribute any bugs to usr.bin/make.
Regarding the iniconfig-0.0.0, I have no idea where this 0.0.0 comes
from. Did you try to run it with different versions of make(1), to
verify that my latest changes broke it?
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539 (pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?)
Date: Fri, 7 Aug 2020 16:35:49 +0100
On Fri, Aug 07, 2020 at 03:30:02PM +0000, Roland Illig wrote:
> Regarding the iniconfig-0.0.0, I have no idea where this 0.0.0 comes
> from. Did you try to run it with different versions of make(1), to
> verify that my latest changes broke it?
I just took adam@'s word that it worked for him (the committer).
Will take a closer look...
From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55539 CVS commit: pkgsrc/graphics/graphviz
Date: Sun, 9 Aug 2020 16:04:44 +0000
Module Name: pkgsrc
Committed By: rillig
Date: Sun Aug 9 16:04:44 UTC 2020
Modified Files:
pkgsrc/graphics/graphviz: Makefile
Log Message:
graphics/graphviz: fix build with BSD make
BSD make does not know the $< variable in explicit rules, it only knows
it for inference rules like ".c.o". This resulted in $< expanding to an
empty string, which in turn got the build stuck because it tried to read
from stdin. But not in parallel mode, where stdin was redirected to an
empty file, resulting in an empty PostScript file being installed.
Fixes PR pkg/55539.
To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.218 pkgsrc/graphics/graphviz/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->feedback
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sun, 09 Aug 2020 16:08:55 +0000
State-Changed-Why:
Waiting for feedback.
In the meantime, I fixed graphics/graphviz.
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55539 (pkgsrc graphviz-2.44.1 fails too build - failure to
expand make variable?)
Date: Mon, 10 Aug 2020 09:48:45 +0100
On Fri, Aug 07, 2020 at 03:40:01PM +0000, Patrick Welche wrote:
> On Fri, Aug 07, 2020 at 03:30:02PM +0000, Roland Illig wrote:
> > Regarding the iniconfig-0.0.0, I have no idea where this 0.0.0 comes
> > from. Did you try to run it with different versions of make(1), to
> > verify that my latest changes broke it?
make is blameless. On the broken box
# diff -u PKG-INFO iniconfig.egg-info/PKG-INFO
--- PKG-INFO 2020-07-31 09:57:47.918844500 +0100
+++ iniconfig.egg-info/PKG-INFO 2020-08-07 17:03:03.015266644 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: iniconfig
-Version: 1.0.1
+Version: 0.0.0
Summary: iniconfig: brain-dead simple config-ini parsing
Home-page: http://github.com/RonnyPfannschmidt/iniconfig
Author: Ronny Pfannschmidt, Holger Krekel
yet not on another just-as-current AFAICT box that difference isn't there.
(both -current, both python3.8 as default, same py38-setuptools-44.1.1)
Ah! On the "working" one, py38-setuptools_scm is installed. Installing
that on the "broken" one, the build succeeds! (reversible - uninstall _scm
and it breaks)
In the meantime, joerg committed a more direct fix:
http://mail-index.netbsd.org/pkgsrc-changes/2020/08/08/msg218631.html
State-Changed-From-To: feedback->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sat, 05 Sep 2020 05:19:32 +0000
State-Changed-Why:
It's not a problem with make.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.