Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lazka mannequin opened this issue Jul 23, 2020 · 4 comments
Closed

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

lazka mannequin opened this issue Jul 23, 2020 · 4 comments
Labels
3.11 only security fixes build The build process and cross-build

Comments

@lazka
Copy link
Mannequin

lazka mannequin commented Jul 23, 2020

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']

    @lazka
    Copy link
    Mannequin Author

    lazka mannequin commented Jul 23, 2020

    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

    @lazka lazka mannequin added 3.8 only security fixes build The build process and cross-build labels Jul 23, 2020
    @matzeri
    Copy link
    Mannequin

    matzeri mannequin commented Jan 2, 2021

    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

    @matzeri matzeri mannequin added the 3.7 (EOL) end of life label Jan 2, 2021
    @lazka
    Copy link
    Mannequin Author

    lazka mannequin commented Feb 13, 2021

    ping. The PR looks good to me.

    @iritkatriel
    Copy link
    Member

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

    @iritkatriel iritkatriel added 3.11 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes labels Oct 20, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant