Opened 2 years ago

Last modified 21 months ago

#5936 defect new

Building sendmsg.so on AIX requires extra define

Reported by: schlenk Owned by: schlenk
Priority: lowest Milestone:
Component: core Keywords: aix
Cc: Branch:
Author: Launchpad Bug:

Description (last modified by exarkun)

When building the 12.2.0 release with GCC on AIX, the symbols
CMSG_SIZE and CMSG_LEN come up as undefined.

 twisted/python/sendmsg.c: In function 'sendmsg_sendmsg':
 twisted/python/sendmsg.c:243: warning: implicit declaration of function 'CMSG_SPACE'
 twisted/python/sendmsg.c:306: warning: implicit declaration of function 'CMSG_LEN'

Those symbols are only defined when _LINUX_SOURCE_COMPAT is defined on AIX.

Adding -D_LINUX_SOURCE_COMPAT to CFLAGS or in front of the sys/socket.h include fixes it.

Attachments (1)

sendmsg.c.aix.patch (475 bytes) - added by schlenk 2 years ago.
Patch to add _LINUX_SOURCE_COMPAT

Download all attachments as: .zip

Change History (7)

comment:1 Changed 2 years ago by exarkun

  • Description modified (diff)
  • Priority changed from low to lowest

Changed 2 years ago by schlenk

Patch to add _LINUX_SOURCE_COMPAT

comment:2 Changed 2 years ago by thijs

  • Keywords review added

Putting the patch up for review. See ReviewProcess on how to get your patch reviewed.

comment:3 Changed 2 years ago by exarkun

  • Keywords changed from aix, review to aix review

Don't use "," in the keywords field.

comment:4 Changed 2 years ago by exarkun

  • Keywords review removed
  • Owner set to schlenk

Compilation is nice. But how about the unit tests? Does the patch make them pass?

comment:5 Changed 21 months ago by glyph

schlenk, thanks for submitting this fix, but it will be difficult for us to apply it without access to any AIX machines and especially without an AIX buildbot to verify that Twisted works at all. We don't support the AIX platform, and we can't really do so until someone has contributed hardware for a consistently-available buildbot. Would you be interested in contributing one, or, if we can come up with one of our own (for example, via the snakebite project) helping to administer our buildbot on that machine or helping us fix other issues that arise?

Thanks.

comment:6 Changed 21 months ago by schlenk

Just had a look at the Snakebite project, they actually have an AIX box (AIX 7.1) already, just no xlc (native) compiler license anymore. But twisted kind of works when built with gcc, just needs the native linker.

Sadly (well, not really sad about it, more trouble than its worth), we have decided to get rid of the AIX platform for new developments at work, so i could hardly argue for inclusion of the patch and effort spent on maintenance for AIX.

About tests: I tried to run the tests, but they hang while running some subprocess tests, didn't have time to analyze deeper. The network/web parts seem to work fine though (and we use them in production without any patches besides this one).

Note: See TracTickets for help on using tickets.