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: patches to compile for AIX 4.1.x
Type: Stage: test needed
Components: Build, Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, customdesigned, gvanrossum, loewis
Priority: low Keywords: patch

Created on 2005-02-09 21:18 by customdesigned, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Python-2.4-aix.patch customdesigned, 2005-02-09 21:18 AIX 4.1 patch for Python-2.4
Messages (10)
msg47739 - (view) Author: Stuart D. Gathman (customdesigned) Date: 2005-02-09 21:18
Support for AIX 4.1 got lost, or was dropped with
python 2.3.  The only thing AIX 4.1 needs over generic
AIX support is a call to loadbind when loading dynamic
modules.  This patch also provides stubs for openpty in
posixmodule and wgetnstr in cursesmodule.  The openpty
stub is non-functional.  The wgetnstr stub is
functional, but uses a fixed size temporary buffer.
msg47740 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-02-09 23:46
Logged In: YES 
user_id=21627

I don't understand the patch. Why do you provide an
implementation of openpty that says it creates a pseudo tty
master slave pair, and is implementented by setting errno to
ENOENT?

The changes to remove loadbind were made in dynload_aix.c
2.12, where Guido applied #568629, which in turn was from
Oren Tirosh. It was meant to replace the new module, so I
presume the change to dynload_aix was unintentional (but
then, it is probably no problem, as nobody noticed during
the entire life of Python 2.3).

Assigning this to gvanrossum for further comments, and also
asking orenti to comment.
msg47741 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2005-02-09 23:55
Logged In: YES 
user_id=6380

Sorry, I don't have a clue any more.
msg47742 - (view) Author: Stuart D. Gathman (customdesigned) Date: 2005-02-10 01:26
Logged In: YES 
user_id=142072

openpty patch:

The openpty stub is nonfunctional.  I spent a day trying to
emulate enough pty stuff on AIX 4.1 to get it to work - but
failed.  At least with the stub it compiles.  Almost
everything else works on AIX 4.1 (need to get db4.2
installed for bsddb to work, curses has a few bugs).  AIX
4.1 has BSD style ptys (with matching pty and tty pairs),
and also sysv style where opening a magic device assigns you
an arbitrary minor device number.  I'm pretty sure it is
possible to make ptys work reasonably with python on aix
4.1, but I haven't had time to get it to work.  By returning
ENOENT, python code that depends on pty support thinks that
none are available - which is effectively the case at present.

dynload_aix patch:

The change to dynload_aix.c was correct for aix 4.2 and
later.  It is only aix 4.1 that requires the call to
loadbind.  That is why the restored code is ifdefed for
_AIX41 specifically.

I did notice during the lifecycle of python 2.3, in that I
never got python2.3 to run on aix4.1 - but I didn't have
time to track down the problem.  I am just getting around to
it now, but thought I'd go for 2.4 instead.
msg47743 - (view) Author: Stuart D. Gathman (customdesigned) Date: 2005-02-10 03:25
Logged In: YES 
user_id=142072

As to assigning priority.  We have only 2 machines left
which still run AIX 4.1.  I wouldn't be mad if you simply
said "we don't support AIX 4.1 any more" so as not to
clutter the code with ifdefs for an older release that not
many people are still using.  However, those unix servers
just keep going and going, and python is a great scripting
language.  Maybe there should be a separate download page
for patches to get python to work with obscure/obsolete
systems - just so others don't have to repeat my debugging.
msg47744 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-02-10 04:40
Logged In: YES 
user_id=21627

We have PEP 11 (http://www.python.org/peps/pep-0011.html)
for such cases. 

If you don't mind, I can list you as the maintainer of the
AIX 4.1 port, and claim that we won't support any AIX
versions before that (I long wanted to find out what the
oldest AIX version is that we need to support).

Then, if you lose interest, or become unresponsive to
questions, we would mark AIX 4.1 as unsupported, removal of
the code to follow a release later.

We are certainly willing to take patches as long as people
want to contribute them in a timely manner; we don't want to
support Python on systems which don't have any users anymore.
msg47745 - (view) Author: Stuart D. Gathman (customdesigned) Date: 2005-02-10 05:13
Logged In: YES 
user_id=142072

I am happy to be the aix-4.1 maintainer as long as we have
the systems.  You should list aix-4.1.5 as the oldest
supported version (since that is what I have.)  When the
last two 4.1 systems are gone in a few years, the oldest AIX
systems we have will be AIX 4.3.x - which is what the
majority of AIX4 users will have.

AIX rpms are available at http://bmsi.com/aix/  (and a
tar.gz of a binary rpm-3.0.6).
msg47746 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-05 13:05
Logged In: YES 
user_id=21627

I still don't understand why the openpty patch is needed.
You said "at least with the stub it compiles". Does this
imply that it won't compile without the stub? Why? If
HAVE_OPENPTY is not defined (as it apparently isn't), it
should compile just fine.
msg47747 - (view) Author: Stuart D. Gathman (customdesigned) Date: 2005-03-08 04:55
Logged In: YES 
user_id=142072

It compiles, yes.  But the resulting object tries to link to
some functions that don't exist on AIX4.1:

ld: 0711-317 ERROR: Undefined symbol: .grantpt
ld: 0711-317 ERROR: Undefined symbol: .unlockpt
ld: 0711-317 ERROR: Undefined symbol: .ptsname

posixmodule.c rolls its own declarations for these functions
- hence the link rather than compile error.  Strangely,
AIX4.1 has a man page for these functions - but they simply
don't exist in libc.a - or any other IBM supplied library. 
I have searched exhaustively with find . -name "*.a" | xargs
nm | fgrep ptsname.  I also checked IBM PTFs back in
Python2.3 days.

Since neither pty API supported by python actually exists on
AIX4.1, I investigated whether to emulate
grantpt/unlockpt/ptsname or openpty.  I determined that
openpty would actually be easier to emulate - but I haven't
gotten around to it (although my Aunt has one in her kitchen
drawer. :-)  So I put in a stub so it would compile and link
- planning to add the actual functionality when I need it. 
You know - the ol' open source itch scratch.
msg83869 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-20 21:44
Unless someone tells me that providing 'stubs for openpty in posixmodule
and wgetnstr in curses module' is still a valid concern, I'll close this.
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41556
2009-03-30 01:53:28ajaksu2setstatus: pending -> closed
resolution: out of date
2009-03-20 21:44:11ajaksu2setstatus: open -> pending
priority: normal -> low

components: + Build
versions: + Python 2.7, - Python 2.4
nosy: + ajaksu2

messages: + msg83869
stage: test needed
2005-02-09 21:18:24customdesignedcreate