Ticket #5936 defect new

Opened 10 months ago

Last modified 6 months ago

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) (diff)

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

sendmsg.c.aix.patch Download (475 bytes) - added by schlenk 10 months ago.
Patch to add _LINUX_SOURCE_COMPAT

Change History

1

Changed 10 months ago by exarkun

  • priority changed from low to lowest
  • description modified (diff)

Changed 10 months ago by schlenk

Patch to add _LINUX_SOURCE_COMPAT

2

Changed 9 months ago by thijs

  • keywords aix, review added; aix removed

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

3

Changed 9 months ago by exarkun

  • keywords aix added; aix, removed

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

4

Changed 9 months ago by exarkun

  • owner set to schlenk
  • keywords review removed

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

5

Changed 6 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.

6

Changed 6 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.