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.

classification
Title: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris
Type: Stage:
Components: Versions: Python 3.2, Python 3.3, Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: trent Nosy List: baikie, jcea, trent
Priority: normal Keywords:

Created on 2012-10-17 10:21 by trent, last changed 2022-04-11 14:57 by admin.

Messages (2)
msg173154 - (view) Author: Trent Nelson (trent) * (Python committer) Date: 2012-10-17 10:21
Sample test_socket -v output:

testSendmsgDataGenerator (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg"
testSendmsgExcessCmsgReject (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg"
testSendmsgGather (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg"
testSendmsgNoDestAddr (test.test_socket.SendmsgUDPTest) ... skipped "don't have sendmsg"
testRecvmsg (test.test_socket.RecvmsgUDPTest) ... skipped "don't have recvmsg"
testRecvmsgAfterClose (test.test_socket.RecvmsgUDPTest) ... skipped "don't have recvmsg"
testRecvmsgBadArgs (test.test_socket.RecvmsgUDPTest) ... skipped "don't have recvmsg"

This is on the Solaris 10 box.  sendmsg/recvmsg etc definitely exist.

Haven't investigated yet.
msg173330 - (view) Author: Trent Nelson (trent) * (Python committer) Date: 2012-10-19 12:19
After some investigation, I've established the following cause:

    1. Our Solaris builds should add -D_XPG4_2 to CPPFLAGS.  I've been
       manually setting this on the Solaris build slaves.  This define
       ensures all the POSIX 95 things get picked up (like sendmsg etc).

    2. Even when it is in CPPFLAGS, it doesn't get picked up when
       building extension modules, such as socketmodule.c, because they
       are built solely with CCSHARED.

The first issue can be fixed via configure.ac/Makefile.pre.in.

As for the second issue... it's somewhat odd that there's no documented
way to ensure extra flags get passed $CC when building extensions.  Then
again, it's always been like this, and nobody has complained to date.

Thus, rather than introduce a public/documented way for extending flags
passed to $CC when building extension modules, I think for now, altering
configure.ac/Makefile.pre.in to also tweak CCSHARED when on Solaris as
part of fixing the first part is sufficient.

Patch to follow.

    Trent.

P.S.: when -D_XPG4_2 is added to CCSHARED, the socket sendmsg stuff gets
      built and... *drum-roll* fails some tests :-)
History
Date User Action Args
2022-04-11 14:57:37adminsetgithub: 60467
2015-08-02 20:46:31baikiesetnosy: + baikie
2012-10-19 12:19:30trentsettitle: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris -> sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris
2012-10-19 12:19:10trentsetmessages: + msg173330
title: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris -> sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris
2012-10-17 10:21:45trentcreate