This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [AIX] module _curses fails to build since ESCDELAY has been added
Type: compile error Stage: resolved
Components: Build, Extension Modules Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Michael.Felt, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2019-12-10 18:41 by Michael.Felt, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bpo-39020-AIX.patch Michael.Felt, 2020-02-01 15:20
Pull Requests
URL Status Linked Edit
PR 18302 closed serhiy.storchaka, 2020-02-01 13:04
PR 18303 closed Michael.Felt, 2020-02-01 16:14
Messages (13)
msg358210 - (view) Author: Michael Felt (Michael.Felt) * Date: 2019-12-10 18:41
Did not notice this earlier - as the buildbot does not report it: issue38312 introduced a regression with regard to AIX.

Not sure how to classify component (as Build, C API, or Library, so left blank)

Failed to build these modules:
_curses                                                        

commit b32cb97bce472dad337c6b2f071883f6234e21d8
Author: Anthony Sottile <asottile@umich.edu>
Date:   Thu Oct 31 02:13:48 2019 -0700

    bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938)

Background: ncurses is not part of AIX; curses. ncurses packages provided by other parties are not stable enough for, among other things, allow the buildbot to pass.

Prior to this commit AIX passed all tests related to _curses.
msg358213 - (view) Author: Michael Felt (Michael.Felt) * Date: 2019-12-10 19:06
I am thinking along two lines:

a) tell setup.py to not build _curses, just as _curses_panel

b) figure out how to use configure tests, to establish that ESCDELAY is not available AND then tell _cursesmodule.* that these routines are not available (and add that to the new docs for these routines).
msg358216 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-12-10 19:40
I prefer option (b). We can also just use

#if !defined(_AIX) || defined(NCURSES_VERSION)

Interesting, a comment in curses.h:

 * Notes:
 *	a. ESCDELAY was an undocumented feature under AIX curses.
 *	   It gives the ESC expire time in milliseconds.
msg358229 - (view) Author: Michael Felt (Michael.Felt) * Date: 2019-12-10 22:47
quote: Interesting, a comment in curses.h:

 * Notes:
 *	a. ESCDELAY was an undocumented feature under AIX curses.
 *	   It gives the ESC expire time in milliseconds.

iirc - that is a symbolic link to ncurses.h from ncurses-devel RPM package, not something from AIX itself.

On my test partitions - where I do not install RPMs, I do not have that comment. Likewise, I did see that comment on the gccfarm POWER8 provided by IBM (which has ncurses-devel installed, or I would have never known :) )
msg361162 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-02-01 11:35
Adding 3.8 before I post a PR - as I think the initial merge that introduced the regression was before master was considered 3.9.
msg361166 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-02-01 13:07
NetBSD also uses non-ncurses implementation of curses, but it supports ESCDELAY, set_escdelay(), etc. This is not a difference between ncurses and non-ncurse, but a problem specific to the AIX implementation of curses.

Please check that PR 18302 fixes the build.
msg361167 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-02-01 14:54
removed 3.8, this is new for 3.9.

Have established that all four functions added in issue38132 do not exist in stock AIX libcurses.a

Was working on my own PR, but shall look at yours first.
msg361169 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-02-01 15:05
Have looked at your PR. It will not work on AIX because AIX libcurses is missing all four new functions.

Once I finished my test on AIX - shall I add my patch as a file here, so you can integrate into yours?

I hope that is easier than two PRs.
msg361170 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-02-01 15:20
Here is the patch I am working on.

I appreciate your example on how to deal with the undefined variables. I had done that incorrectly initially.
msg361172 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-02-01 16:16
Thanks again for PR 18202. I followed your lead and made the additional changes and posted as PR 18203.
msg361173 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-02-01 16:18
Blinded - got the numbers wrong!

So, again: Thanks for PR 18302. I followed your lead and made the additional changes and posted as PR 18303 in the hope this is easier for all.
msg361175 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-02-01 16:59
Thank you Michael. Sorry, I just missed that you are working on your PR.
msg363306 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-03-03 21:33
This issue was resolved by issue39802. Marking as fixed, and closed.
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83201
2020-03-03 21:33:29Michael.Feltsetstatus: open -> closed
resolution: fixed
messages: + msg363306

stage: patch review -> resolved
2020-02-01 16:59:22serhiy.storchakasetmessages: + msg361175
2020-02-01 16:18:47Michael.Feltsetmessages: + msg361173
2020-02-01 16:16:32Michael.Feltsetmessages: + msg361172
2020-02-01 16:14:36Michael.Feltsetpull_requests: + pull_request17680
2020-02-01 15:20:31Michael.Feltsetfiles: + bpo-39020-AIX.patch

messages: + msg361170
2020-02-01 15:05:10Michael.Feltsetmessages: + msg361169
2020-02-01 14:54:26Michael.Feltsetmessages: + msg361167
versions: - Python 3.8
2020-02-01 13:07:19serhiy.storchakasetmessages: + msg361166
2020-02-01 13:04:45serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request17679
2020-02-01 11:35:03Michael.Feltsetmessages: + msg361162
versions: + Python 3.8
2019-12-10 22:47:09Michael.Feltsetmessages: + msg358229
2019-12-10 19:40:39serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg358216
2019-12-10 19:29:13zach.waresetcomponents: + Build
title: [AIX] module _ctypes fails to build since ESCDELAY has been added -> [AIX] module _curses fails to build since ESCDELAY has been added
2019-12-10 19:06:26Michael.Feltsetmessages: + msg358213
2019-12-10 19:01:30Michael.Feltsetcomponents: + Extension Modules
2019-12-10 18:41:14Michael.Feltcreate