Skip to content

socket.TCP_* no longer available with cygwin 3.1.6+ #85546

Closed

Description

@lazka
mannequin
BPO 41374
Nosy @embray, @lazka, @ZackerySpytz, @iritkatriel, @matzeri
PRs
  • bpo-41374: Include netinet/tcp.h on Cygwin #21649
  • Files
  • 3.6.12-socketmodule.patch: Patch used on Cygwin packages
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-10-20.17:15:19.285>
    created_at = <Date 2020-07-23.07:51:44.046>
    labels = ['build', '3.11']
    title = 'socket.TCP_* no longer available with cygwin 3.1.6+'
    updated_at = <Date 2021-10-20.17:15:24.662>
    user = 'https://github.com/lazka'

    bugs.python.org fields:

    activity = <Date 2021-10-20.17:15:24.662>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-20.17:15:19.285>
    closer = 'iritkatriel'
    components = ['Build']
    creation = <Date 2020-07-23.07:51:44.046>
    creator = 'lazka'
    dependencies = []
    files = ['49717']
    hgrepos = []
    issue_num = 41374
    keywords = ['patch']
    message_count = 4.0
    messages = ['374126', '384245', '386918', '404501']
    nosy_count = 5.0
    nosy_names = ['erik.bray', 'lazka', 'ZackerySpytz', 'iritkatriel', 'matzeri']
    pr_nums = ['21649']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue41374'
    versions = ['Python 3.11']

    Activity

    1. lazka commented on Jul 23, 2020

      lazkamannequin
      MannequinAuthor

      The TCP macros are provided by netinet/tcp.h, which for some reason is skipped here:

      # if !defined(__CYGWIN__)

      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 b5daaed 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: msys2/MSYS2-packages#2050

    2. added
      buildThe build process and cross-build
      on Jul 23, 2020
    3. matzeri commented on Jan 2, 2021

      matzerimannequin
      Mannequin

      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

    4. lazka commented on Feb 13, 2021

      lazkamannequin
      MannequinAuthor

      ping. The PR looks good to me.

    5. iritkatriel commented on Oct 20, 2021

      @iritkatriel
      Member

      New changeset d8e1819 by Zackery Spytz in branch 'main':
      bpo-41374: Remove obsolete exclusion of netinet/tcp.h on Cygwin (GH-21649)
      d8e1819

    6. added
      3.11only security fixes
      and removed on Oct 20, 2021
    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixesbuildThe build process and cross-build

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions