Building Python 1.0 beta on AIX

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Tue, 18 Jan 1994 11:32:56 -0500

Finally got around to giving it a couple of tries:

In building python 1.0 beta on AIX 3.2 with gcc, the build fails
on two modules: timemodule.c and md5module.c

The problem with timemodule.c is with an undefined "altzone" ,
which is not in aix's /usr/include/time.h.

I compiled that by hand and appended a -Daltzone=0 to the gcc
command line, and after that compiled successfully, I restarted
'make'.

Module 'md5module.c' failed to compile due to :
./md5module.c:189: conflicting declarations of `MD5type'
./md5module.c:40: `MD5type' previously declared here

Looking at the source, I find that the second (real) declaration
of MD5type had a conditional line for _AIX:

#ifndef _AIX
static
#endif
typeobject MD5type = {
OB_HEAD_INIT(&Typetype)
...

So I changed the forward declaration from:

< static typeobject MD5type; /* Forward */

to a matching:

> #ifndef _AIX
> static
> #endif
> typeobject MD5type; /* Forward */

[ I don't know why or if the "static" is necessary, but
they DO have to match. ]

'make' continued successfully and the resulting executable
did a successful 'import testall' ; manual test of posix
module and timemodule check out OK, except for ( obviously)
the fact that time.altzone = 0, rather than a function.

- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biological Physics