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.

Author jr244
Recipients jr244
Date 2008-10-03.13:13:17
SpamBayes Score 0.001386808
Marked as misclassified No
Message-id <1223039660.71.0.470025758339.issue4028@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

there's some issues compiling the multiprocessing module on the SunOS I
have here, where CMSG_LEN, CMSG_ALIGN, CMSG_SPACE and sem_timedwait are
absent.

$ uname -av
SunOS xxxxxxx 5.9 Generic_117171-15 sun4u sparc SUNW,Sun-Fire-V440

it looks like simply defining the first three macros like this works:
#ifndef CMSG_SPACE
#   define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct
cmsghdr))+CMSG_ALIGN(len))
#endif

#ifndef CMSG_ALIGN
#   ifdef __sun__
#       define CMSG_ALIGN _CMSG_DATA_ALIGN
#   else
#       define CMSG_ALIGN(len) (((len)+sizeof(long)-1) & ~(sizeof(long)-1))
#   endif
#endif

#ifndef CMSG_LEN
#   define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr))+(len))
#endif

(from http://mailman.videolan.org/pipermail/vlc-devel/2006-May/024400.html )

and setting HAVE_SEM_TIMEDWAIT=0 in setup.py does the trick for the last
one.  Presumably, adding something like 

    elif platform.startswith('sunos5'):
        macros = dict(
                HAVE_SEM_OPEN=1,
                HAVE_SEM_TIMEDWAIT=0,
                HAVE_FD_TRANSFER=1
                )
        libraries = ['rt']

in setup.py should work, but I have no other SunOS machines to test this on.

thanks
History
Date User Action Args
2008-10-03 13:14:20jr244setrecipients: + jr244
2008-10-03 13:14:20jr244setmessageid: <1223039660.71.0.470025758339.issue4028@psf.upfronthosting.co.za>
2008-10-03 13:13:19jr244linkissue4028 messages
2008-10-03 13:13:17jr244create