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: socket.TCP_* no longer available with cygwin 3.1.6+
Type: compile error Stage: resolved
Components: Build Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, erik.bray, iritkatriel, lazka, matzeri
Priority: normal Keywords: patch

Created on 2020-07-23 07:51 by lazka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
3.6.12-socketmodule.patch matzeri, 2021-01-02 23:24 Patch used on Cygwin packages
Pull Requests
URL Status Linked Edit
PR 21649 merged ZackerySpytz, 2020-07-28 01:23
Messages (4)
msg374126 - (view) Author: Christoph Reiter (lazka) * Date: 2020-07-23 07:51
The TCP macros are provided by netinet/tcp.h, which for some reason is skipped here: https://github.com/python/cpython/blob/592527f3ee59616eca2bd1da771f7c14cee808d5/Modules/socketmodule.h#L11

Until cygwin 3.1.6 these macros were also provided by sys/socket.h, but this got removed in https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=e037192b505b4f233fca9a6deafc9797210f6693

This leads to socket.TCP_NODELAY for example not being available anymore.

git blame leads me to https://github.com/python/cpython/commit/b5daaed30d7c54ba1f516289f3a7a30a864133af introducing this special case, which isn't very helpful. I'd suggest to just remove the cygwin check and always include it (which works fine on my machine)

Downstream bug report for extra context: https://github.com/msys2/MSYS2-packages/issues/2050
msg384245 - (view) Author: Marco Atzeri (matzeri) Date: 2021-01-02 23:24
The Analysis is correct. 
Removing the test for CYGWIN and always include the 
<netinet/tcp.h>

solved the problem building all python (3.6,3.7,3.8) packages

https://sourceware.org/pipermail/cygwin-apps/2020-December/040845.html
https://sourceware.org/pipermail/cygwin-announce/2020-December/009853.html

attached patch used on the build.
Similar one was applied to the rebuild of 2.7.18
msg386918 - (view) Author: Christoph Reiter (lazka) * Date: 2021-02-13 09:12
ping. The PR looks good to me.
msg404501 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-10-20 17:15
New changeset d8e181925123ab1fd3dfcad3b29325b2b0ff704b by Zackery Spytz in branch 'main':
bpo-41374: Remove obsolete exclusion of netinet/tcp.h on Cygwin (GH-21649)
https://github.com/python/cpython/commit/d8e181925123ab1fd3dfcad3b29325b2b0ff704b
History
Date User Action Args
2022-04-11 14:59:34adminsetgithub: 85546
2021-10-20 17:15:24iritkatrielsetversions: + Python 3.11, - Python 3.6, Python 3.7, Python 3.8
2021-10-20 17:15:19iritkatrielsetstatus: open -> closed
superseder: Cygwin is unsupported - close all open issues and list them here. ->
resolution: duplicate -> fixed
2021-10-20 17:15:07iritkatrielsetnosy: + iritkatriel
messages: + msg404501
2021-10-20 16:32:36iritkatrielsetstatus: closed -> open
2021-10-20 12:12:28iritkatrielsetstatus: open -> closed
superseder: Cygwin is unsupported - close all open issues and list them here.
resolution: duplicate
stage: patch review -> resolved
2021-02-13 09:12:29lazkasetmessages: + msg386918
2021-01-02 23:24:50matzerisetfiles: + 3.6.12-socketmodule.patch
versions: + Python 3.6, Python 3.7
nosy: + matzeri

messages: + msg384245
2020-07-28 01:23:43ZackerySpytzsetkeywords: + patch
nosy: + ZackerySpytz

pull_requests: + pull_request20789
stage: patch review
2020-07-23 18:21:25lazkasetnosy: + erik.bray
2020-07-23 07:51:44lazkacreate