NetBSD Problem Report #53330
From oster@cs.usask.ca Tue May 29 16:43:54 2018
Return-Path: <oster@cs.usask.ca>
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 AED3F7A1CC
for <gnats-bugs@gnats.NetBSD.org>; Tue, 29 May 2018 16:43:54 +0000 (UTC)
Message-Id: <20180529164352.8A5B7C264C@scrooge.usask.ca>
Date: Tue, 29 May 2018 10:43:52 -0600 (CST)
From: oster@netbsd.org
Reply-To: oster@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: py27-curses broken on NetBSD-7.1_STABLE
X-Send-Pr-Version: 3.95
>Number: 53330
>Category: pkg
>Synopsis: py27-curses broken on NetBSD-7.1_STABLE/amd64
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: leot
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 29 16:45:00 +0000 2018
>Closed-Date: Fri Jun 08 11:08:50 +0000 2018
>Last-Modified: Fri Jun 08 11:08:50 +0000 2018
>Originator: Greg Oster
>Release: NetBSD 7.1_STABLE
>Organization:
>Environment:
System: NetBSD scrooge 7.1_STABLE NetBSD 7.1_STABLE (THOG) #0: Thu Apr 26 08:21:31 CST 2018 oster@thog:/u1/builds/build180/src/obj/amd64/u1/builds/build180/src/sys/arch/amd64/compile/THOG amd64
Architecture: x86_64
Machine: amd64
>Description:
While attempting to build a number of packages that depend on
spidermonkey52 with -current pkgsrc, the following error was
encountered:
checking for localeconv... (cached) yes
creating ./config.data
Creating config.status
Traceback (most recent call last):
File "./../../configure.py", line 107, in <module>
sys.exit(main(sys.argv))
File "./../../configure.py", line 31, in main
return config_status(config)
File "./../../configure.py", line 92, in config_status
from mozbuild.config_status import config_status
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/build/mach_bootstrap.py", line 370, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/python/mozbuild/mozbuild/config_status.py", line 19, in <module>
from mach.logging import LoggingManager
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/build/mach_bootstrap.py", line 370, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/python/mach/mach/logging.py", line 12, in <module>
import blessings
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/build/mach_bootstrap.py", line 370, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/python/blessings/blessings/__init__.py", line 2, in <module>
import curses
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/build/mach_bootstrap.py", line 370, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/usr/pkg/lib/python2.7/curses/__init__.py", line 59, in <module>
from has_key import has_key
File "/usr/pkgsrc/lang/spidermonkey52/work.scrooge/mozjs-52.7.4/build/mach_bootstrap.py", line 370, in __call__
module = self._original_import(name, globals, locals, fromlist, level)
File "/usr/pkg/lib/python2.7/curses/has_key.py", line 11, in <module>
_curses.KEY_A1: 'ka1',
AttributeError: 'module' object has no attribute 'KEY_A1'
Digging a bit further reveals that the underlying issue is actually
just from python27 and curses:
Python 2.7.15 (default, May 24 2018, 15:07:47)
[GCC 4.8.5] on netbsd7
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/pkg/lib/python2.7/curses/__init__.py", line 59, in <module>
from has_key import has_key
File "/usr/pkg/lib/python2.7/curses/has_key.py", line 11, in <module>
_curses.KEY_A1: 'ka1',
AttributeError: 'module' object has no attribute 'KEY_A1'
>>>
>How-To-Repeat:
- build python2.7
- build py-curses for python2.7
- run python2.7
- 'import curses'
- *boom*
>Fix:
please.
Additional details can be provided on request.
Thanks.
>Release-Note:
>Audit-Trail:
From: Greg Oster <oster@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/53330: py27-curses broken on NetBSD-7.1_STABLE
Date: Fri, 1 Jun 2018 12:18:09 -0600
On Tue, 29 May 2018 16:45:00 +0000 (UTC)
oster@netbsd.org wrote:
> Python 2.7.15 (default, May 24 2018, 15:07:47)
> [GCC 4.8.5] on netbsd7
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import curses
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/pkg/lib/python2.7/curses/__init__.py", line 59, in
> <module> from has_key import has_key
> File "/usr/pkg/lib/python2.7/curses/has_key.py", line 11, in
> <module> _curses.KEY_A1: 'ka1',
> AttributeError: 'module' object has no attribute 'KEY_A1'
> >>>
>
> >How-To-Repeat:
> - build python2.7
> - build py-curses for python2.7
> - run python2.7
> - 'import curses'
> - *boom*
>
> >Fix:
> please.
> Additional details can be provided on request.
> Thanks.
>
>
> >Unformatted:
>
>
Further digging reveals this on the broken systems:
ldd /usr/pkg/lib/python2.7/lib-dynload/_curses.so
/usr/pkg/lib/python2.7/lib-dynload/_curses.so:
-lncurses.6 => /usr/pkg/lib/libncurses.so.6
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
-lpython2.7.1.0 => /usr/pkg/lib/libpython2.7.so.1.0
-lutil.7 => /usr/lib/libutil.so.7
-lm.0 => /usr/lib/libm.so.0
-lpthread.1 => /usr/lib/libpthread.so.1
and this on the working 8.0 system:
ldd /usr/pkg/lib/python2.7/lib-dynload/_curses.so
/usr/pkg/lib/python2.7/lib-dynload/_curses.so:
-lcurses.7 => /usr/lib/libcurses.so.7
-lterminfo.1 => /usr/lib/libterminfo.so.1
-lc.12 => /usr/lib/libc.so.12
-lpython2.7.1.0 => /usr/pkg/lib/libpython2.7.so.1.0
-lutil.7 => /usr/lib/libutil.so.7
-lm.0 => /usr/lib/libm.so.0
-lpthread.1 => /usr/lib/libpthread.so.1
That is, 8.0 is using native curses, and 7 is using libncurses from
pkgsrc.
Later...
Greg Oster
State-Changed-From-To: open->feedback
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sat, 02 Jun 2018 16:22:41 +0000
State-Changed-Why:
Possible patch shared, feedback requested.
From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/53330: py27-curses broken on NetBSD-7.1_STABLE
Date: Sat, 02 Jun 2018 18:21:48 +0200
Hello Greg,
Greg Oster writes:
> [...]
> That is, 8.0 is using native curses, and 7 is using libncurses from
> pkgsrc.
> [...]
Not sure if related or not, but on NetBSD-current, despite:
| % python2.7 -c 'import curses'
correctly worked (like on netbsd-8 as reported on the PR)... ...doing:
| % python2.7 -c 'import curses; print curses.KEY_A1'
| Traceback (most recent call last):
| File "<string>", line 1, in <module>
| AttributeError: 'module' object has no attribute 'KEY_A1'
| Exit 1
I think that lang/python27/patches/patch-ah since 2.7.15 is no longer
needed and the following patch should address that (full rationale in
the possible candidate commit message):
<https://www.NetBSD.org/~leot/pkgsrc-patches/python-2.7.15-rm-patch-ah.patch>
Can you please test it and let us know if it fixes the issue?
(after applying them there is no need to rebuild python27, just
`cd pkgsrc/devel/py-curses && make replace' should be enough)
Thank you!
State-Changed-From-To: feedback->open
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sat, 02 Jun 2018 16:34:17 +0000
State-Changed-Why:
Feedback provided, problem still present on netbsd-7.
From: Greg Oster <oster@netbsd.org>
To: Leonardo Taccari <leot@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53330: py27-curses broken on NetBSD-7.1_STABLE
Date: Sat, 2 Jun 2018 10:31:04 -0600
On Sat, 2 Jun 2018 16:25:01 +0000 (UTC)
Leonardo Taccari <leot@NetBSD.org> wrote:
> The following reply was made to PR pkg/53330; it has been noted by
> GNATS.
>
> From: Leonardo Taccari <leot@NetBSD.org>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: pkg/53330: py27-curses broken on NetBSD-7.1_STABLE
> Date: Sat, 02 Jun 2018 18:21:48 +0200
>
> Hello Greg,
>
> Greg Oster writes:
> > [...]
> > That is, 8.0 is using native curses, and 7 is using libncurses
> > from pkgsrc.
> > [...]
>
> Not sure if related or not, but on NetBSD-current, despite:
>
> | % python2.7 -c 'import curses'
>
> correctly worked (like on netbsd-8 as reported on the
> PR)... ...doing:
> | % python2.7 -c 'import curses; print curses.KEY_A1'
> | Traceback (most recent call last):
> | File "<string>", line 1, in <module>
> | AttributeError: 'module' object has no attribute 'KEY_A1'
> | Exit 1
>
> I think that lang/python27/patches/patch-ah since 2.7.15 is no longer
> needed and the following patch should address that (full rationale in
> the possible candidate commit message):
>
> <https://www.NetBSD.org/~leot/pkgsrc-patches/python-2.7.15-rm-patch-ah.patch>
>
> Can you please test it and let us know if it fixes the issue?
> (after applying them there is no need to rebuild python27, just
> `cd pkgsrc/devel/py-curses && make replace' should be enough)
Thanks for the patch, but unfortunately the same error remains :(
Later...
Greg Oster
--
Later...
Greg Oster
From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/53330: py27-curses broken on NetBSD-7.1_STABLE
Date: Sat, 02 Jun 2018 20:22:24 +0200
Hello Greg,
Greg Oster writes:
> [...]
> Thanks for the patch, but unfortunately the same error remains :(
> [...]
(Probably you've already done that but worth to double-check...)
After applying the patch have you also removed the patches/patch-ah.orig
file (if any)? Unfortunately devel/py-curses redefine a `do-patch'
target and apply all the patches also if no corresponding entries
are in distinfo.
Sorry for the possible noise and thank you again!
From: Greg Oster <oster@netbsd.org>
To: Leonardo Taccari <leot@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53330: py27-curses broken on NetBSD-7.1_STABLE
Date: Sat, 2 Jun 2018 17:18:43 -0600
On Sat, 2 Jun 2018 18:25:00 +0000 (UTC)
Leonardo Taccari <leot@NetBSD.org> wrote:
> The following reply was made to PR pkg/53330; it has been noted by
> GNATS.
>
> From: Leonardo Taccari <leot@NetBSD.org>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: pkg/53330: py27-curses broken on NetBSD-7.1_STABLE
> Date: Sat, 02 Jun 2018 20:22:24 +0200
>
> Hello Greg,
>
> Greg Oster writes:
> > [...]
> > Thanks for the patch, but unfortunately the same error remains :(
> > [...]
>
> (Probably you've already done that but worth to double-check...)
>
> After applying the patch have you also removed the
> patches/patch-ah.orig file (if any)? Unfortunately devel/py-curses
> redefine a `do-patch' target and apply all the patches also if no
> corresponding entries are in distinfo.
>
>
> Sorry for the possible noise and thank you again!
>
No, I hadn't removed the patch-ah.orig file! Removing that gets
things working! Thanks! And thanks for checking!!
Later...
Greg Oster
Responsible-Changed-From-To: pkg-manager->leot
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Sun, 03 Jun 2018 07:38:38 +0000
Responsible-Changed-Why:
Take
State-Changed-From-To: open->analyzed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 07:38:38 +0000
State-Changed-Why:
Problem analyzed and proposed patch solve the problem.
(I will commit it in the next minutes and then request
a pullup for pkgsrc-2018Q1)
From: "Leonardo Taccari" <leot@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53330 CVS commit: pkgsrc
Date: Sun, 3 Jun 2018 07:49:27 +0000
Module Name: pkgsrc
Committed By: leot
Date: Sun Jun 3 07:49:27 UTC 2018
Modified Files:
pkgsrc/devel/py-curses: Makefile
pkgsrc/lang/python27: distinfo
Removed Files:
pkgsrc/lang/python27/patches: patch-ah
Log Message:
python27: Remove patches/patch-ah (no longer needed)
Since Python 2.7.15 patches/patch-ah is no longer needed and badly interfere
(e.g. with it `curses.KEY_*' are no longer exposed):
- Prototypes of NetBSD curses(3) are as described, no need to patch them
- Avoid {lines,columns} -> {nlines,columns} rename, they are properly
undef-ed due HAVE_TERM_H.
- Use keyname() (it should be present since NetBSD 2.0)
Bump PKGREVISION for devel/py-curses so it will be properly rebuild.
Fixes PR pkg/53330 reported by <oster>.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 pkgsrc/devel/py-curses/Makefile
cvs rdiff -u -r1.68 -r1.69 pkgsrc/lang/python27/distinfo
cvs rdiff -u -r1.9 -r0 pkgsrc/lang/python27/patches/patch-ah
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->pending-pullups
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 08:14:57 +0000
State-Changed-Why:
Pullup requested ([pullup-pkgsrc #5764])
From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53330 CVS commit: [pkgsrc-2018Q1] pkgsrc
Date: Fri, 8 Jun 2018 10:07:08 +0000
Module Name: pkgsrc
Committed By: bsiegert
Date: Fri Jun 8 10:07:08 UTC 2018
Modified Files:
pkgsrc/devel/py-curses [pkgsrc-2018Q1]: Makefile
pkgsrc/lang/python27 [pkgsrc-2018Q1]: distinfo
Removed Files:
pkgsrc/lang/python27/patches [pkgsrc-2018Q1]: patch-ah
Log Message:
Pullup ticket #5764 - requested by leot
lang/python27: build fix
devel/py-curses: build fix
Revisions pulled up:
- devel/py-curses/Makefile 1.47
- lang/python27/distinfo 1.69
- lang/python27/patches/patch-ah deleted
---
Module Name: pkgsrc
Committed By: leot
Date: Sun Jun 3 07:49:27 UTC 2018
Modified Files:
pkgsrc/devel/py-curses: Makefile
pkgsrc/lang/python27: distinfo
Removed Files:
pkgsrc/lang/python27/patches: patch-ah
Log Message:
python27: Remove patches/patch-ah (no longer needed)
Since Python 2.7.15 patches/patch-ah is no longer needed and badly interfere
(e.g. with it `curses.KEY_*' are no longer exposed):
- Prototypes of NetBSD curses(3) are as described, no need to patch them
- Avoid {lines,columns} -> {nlines,columns} rename, they are properly
undef-ed due HAVE_TERM_H.
- Use keyname() (it should be present since NetBSD 2.0)
Bump PKGREVISION for devel/py-curses so it will be properly rebuild.
Fixes PR pkg/53330 reported by <oster>.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.46.8.1 pkgsrc/devel/py-curses/Makefile
cvs rdiff -u -r1.67.4.1 -r1.67.4.2 pkgsrc/lang/python27/distinfo
cvs rdiff -u -r1.8.12.1 -r0 pkgsrc/lang/python27/patches/patch-ah
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Fri, 08 Jun 2018 11:08:50 +0000
State-Changed-Why:
Fixed in -current and pulled up in 2018Q1.
Thank you Greg for the PR and feedbacks and thanks to
Benny for the pullup!
>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.