NetBSD Problem Report #56747
From john@daisy.zia.io Sun Mar 13 18:57:49 2022
Return-Path: <john@daisy.zia.io>
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))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8AF051A921F
for <gnats-bugs@gnats.NetBSD.org>; Sun, 13 Mar 2022 18:57:49 +0000 (UTC)
Message-Id: <202203131857.22DIvdxx013419@daisy.zia.io>
Date: Sun, 13 Mar 2022 18:57:39 GMT
From: john@ziaspace.com
Reply-To: john@ziaspace.com
To: gnats-bugs@NetBSD.org
Subject: textproc/py-libxml2 fails with python310
X-Send-Pr-Version: 3.95
>Number: 56747
>Category: pkg
>Synopsis: textproc/py-libxml2 fails with python310
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gutteridge
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 13 19:00:01 +0000 2022
>Closed-Date: Tue Mar 15 03:26:52 +0000 2022
>Last-Modified: Tue Mar 15 03:26:52 +0000 2022
>Originator: John Klos
>Release: NetBSD 9.2_STABLE
>Organization:
>Environment:
System: NetBSD daisy.zia.io 9.2_STABLE NetBSD 9.2_STABLE (DAISY) #0: Sun Mar 13 01:23:07 UTC 2022 john@daisy.zia.io:/usr/obj-amd64/sys/arch/amd64/compile/DAISY amd64
Architecture: x86_64
Machine: amd64
>Description:
On NetBSD of all ages and macOS, at least, textproc/py-libxml2 fails with:
...
===> wrapper-message [py310-libxml2-2.9.13] ===> Creating toolchain wrappers for py310-libxml2-2.9.13
===> build-message [py310-libxml2-2.9.13] ===> Building for py310-libxml2-2.9.13
=> Fixing hardcoded paths.
WARNING: [subst.mk:setup] Nothing changed in "python/setup.py".
ERROR: [subst.mk:setup] The filename pattern "python/setup.py" has no effect.
*** Error code 1
Stop.
make[1]: stopped in /usr/pkgsrc/textproc/py-libxml2
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/textproc/py-libxml2
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: John Klos <john@ziaspace.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56747: textproc/py-libxml2 fails with python310
Date: Mon, 14 Mar 2022 13:52:06 +0000 (UTC)
This happens for python 3.9, too:
===> build-message [py39-libxml2-2.9.13] ===> Building for py39-libxml2-2.9.13
=> Fixing hardcoded paths.
WARNING: [subst.mk:setup] Nothing changed in "python/setup.py".
ERROR: [subst.mk:setup] The filename pattern "python/setup.py" has no effect.
*** Error code 1
Stop.
make[1]: stopped in /usr/pkgsrc/textproc/py-libxml2
From: "David H. Gutteridge" <david@gutteridge.ca>
To: Gnats Bugs <gnats-bugs@netbsd.org>
Cc:
Subject: Re: pkg/56747: textproc/py-libxml2 fails with python310
Date: Mon, 14 Mar 2022 12:12:56 -0400
I'm not able to reproduce this on NetBSD or Linux. What versions of
devel/py-setuptools and Python itself do you have installed?
Dave
From: "David H. Gutteridge" <david@gutteridge.ca>
To: John Klos <john@ziaspace.com>, Gnats Bugs <gnats-bugs@netbsd.org>
Cc:
Subject: Re: pkg/56747: textproc/py-libxml2 fails with python310
Date: Mon, 14 Mar 2022 22:39:01 -0400
On 2022-03-14 15:14, John Klos wrote:
> On six or so systems:
>
> python310-3.10.2
> py310-setuptools-60.9.3
>
> On one system:
>
> python39-3.9.10
> py39-setuptools-60.9.3
>
> Perhaps mk/subst.mk doesn't gracefully handle instances where the
> substitution isn't necessary, like where LOCALBASE is already
> /usr/local. It couldn't be that simple, could it?
Yes, I think that's very likely what's happening here. Could you please
try the following patch?
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/py-libxml2/Makefile,v
retrieving revision 1.78
diff -u -r1.78 Makefile
--- Makefile 12 Mar 2022 07:33:22 -0000 1.78
+++ Makefile 15 Mar 2022 02:35:18 -0000
@@ -16,6 +16,7 @@
SUBST_MESSAGE.setup= Fixing hardcoded paths.
SUBST_STAGE.setup= pre-build
SUBST_FILES.setup= python/setup.py
+SUBST_NOOP_OK.setup= yes
SUBST_SED.setup= -e
"/ROOT/s,'/usr/local','${BUILDLINK_PREFIX.libxml2}',g"
SUBST_SED.setup+= -e
"/^\"/s,/usr/include,${BUILDLINK_PREFIX.iconv}/include,g"
SUBST_SED.setup+= -e
"/^\"/s,/usr/local/include,${BUILDLINK_PREFIX.iconv}/include,g"
Dave
From: John Klos <john@ziaspace.com>
To: "David H. Gutteridge" <david@gutteridge.ca>
Cc: Gnats Bugs <gnats-bugs@netbsd.org>
Subject: Re: pkg/56747: textproc/py-libxml2 fails with python310
Date: Tue, 15 Mar 2022 03:06:56 +0000 (UTC)
> Yes, I think that's very likely what's happening here. Could you please
> try the following patch?
> +SUBST_NOOP_OK.setup= yes
That's exactly it. Thank you! I learned something new today :)
John Klos
Responsible-Changed-From-To: pkg-manager->gutteridge
Responsible-Changed-By: gutteridge@NetBSD.org
Responsible-Changed-When: Tue, 15 Mar 2022 03:17:58 +0000
Responsible-Changed-Why:
Take.
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56747 CVS commit: pkgsrc/textproc/py-libxml2
Date: Tue, 15 Mar 2022 03:21:20 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Tue Mar 15 03:21:20 UTC 2022
Modified Files:
pkgsrc/textproc/py-libxml2: Makefile
Log Message:
py-libxml2: fix packaging checks when PREFIX is /usr/local
Substituting for /usr/local is a no-op in this case. Addresses
PR pkg/56747 from John Klos.
To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 pkgsrc/textproc/py-libxml2/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Tue, 15 Mar 2022 03:26:52 +0000
State-Changed-Why:
Fix applied. Thanks for the PR!
>Unformatted:
(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.