Builing Python 2.6 on AIX 5.2

M.-A. Lemburg mal at egenix.com
Tue Oct 7 12:40:48 CEST 2008


On 2008-10-07 12:24, brasse wrote:
> OK. I have made some changes in the source that lets me build on AIX
> 5.2. I thought I could post the patch here and perhaps someone can
> tell me if I am on the wrong track or if this is an OK fix on AIX.

Thanks. Please post the patch on the Python bug tracker, so we can
include this  patch in Python 2.6.1:

http://bugs.python.org/issue?@template=item

> Basically I have changed setup.py to define HAVE_SEM_TIMED_WAIT=0 on
> aix. I have also defined CMESG_SPACE and CMESG_LEN in terms of
> _CMSG_ALIGN (see http://homepage.mac.com/cjgibbons/rubyonaixhowto/x72.html)
> in multipocessing.c. (I realise that this breaks some other platforms,
> but right now I just need to build on AIX).
> 
> Here is a patch:
> 
> diff -Naur Python-2.6/Modules/_multiprocessing/multiprocessing.c
> Python-2.6-clean-patch/Modules/_multiprocessing/multiprocessing.c
> --- Python-2.6/Modules/_multiprocessing/multiprocessing.c
> 2008-06-14 00:38:33.000000000 +0200
> +++ Python-2.6-clean-patch/Modules/_multiprocessing/
> multiprocessing.c   2008-10-07 12:23:55.000000000 +0200
> @@ -8,6 +8,13 @@
> 
>  #include "multiprocessing.h"
> 
> +#ifndef CMSG_SPACE
> +#define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) +
> _CMSG_ALIGN(len))
> +#endif
> +#ifndef CMSG_LEN
> +#define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
> +#endif
> +
>  PyObject *create_win32_namespace(void);
> 
>  PyObject *pickle_dumps, *pickle_loads, *pickle_protocol;
> diff -Naur Python-2.6/setup.py Python-2.6-clean-patch/setup.py
> --- Python-2.6/setup.py 2008-09-30 02:15:45.000000000 +0200
> +++ Python-2.6-clean-patch/setup.py     2008-10-07 12:23:34.000000000
> +0200
> @@ -1277,6 +1277,14 @@
>                  )
>              libraries = []
> 
> +        elif platform.startswith('aix'):
> +            macros = dict(
> +                HAVE_SEM_OPEN=1,
> +                HAVE_SEM_TIMEDWAIT=0,
> +                HAVE_FD_TRANSFER=1
> +                )
> +            libraries = ['rt']
> +
>          else:                                   # Linux and other
> unices
>              macros = dict(
>                  HAVE_SEM_OPEN=1,
> 
> Perhaps this should go to some other list?
> 
> :.:: mattias
> --
> http://mail.python.org/mailman/listinfo/python-list

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 07 2008)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611



More information about the Python-list mailing list