GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Error on build posixmodule.c in old Cygwin · Issue #149125 · python/cpython

Error on build posixmodule.c in old Cygwin #149125

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Error on build posixmodule.c in old Cygwin#149125
Copy link
Labels
OS-unsupportedbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@TrueCat17
TrueCat17
opened on Apr 29, 2026
Issue body actions

Bug report

Bug description:

Line 253 includes the file cygwin/limits.h with the comment // Needed for XATTR_SIZE_MAX and XATTR_LIST_MAX.
But this only applies to new versions of Cygwin, i.e. after June 16, 2023, as far as I understand: git-for-windows/msys2-runtime@538b29a
In previous versions, such constants are simply missing, and accordingly, errors occur during compilation

I fixed it like this:

#    include <cygwin/limits.h>  // Needed for XATTR_SIZE_MAX and XATTR_LIST_MAX.
#    ifndef XATTR_SIZE_MAX
#      define XATTR_SIZE_MAX 65536
#    endif
#    ifndef XATTR_LIST_MAX
#      define XATTR_LIST_MAX 65536
#    endif

Everything works for me, however, I have not checked the accuracy of these limits
It’s even possible, in my case, that functions that use these constants are not called at all
However, I still fixed the building for myself this way

CPython version: 3.14.4
Cygwin 3.3.6-341 (win7 32-bit)

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Linked PRs

  • fix building posixmodule.c in old cygwin gh-149125 #149193

Activity

  1. TrueCat17
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Apr 29, 2026
  2. StanFromIreland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    OS-unsupported
    on Apr 29, 2026
  3. github-project-automation
    added this to Unsupported platformson Apr 29, 2026
  4. picnixz
    added
    buildThe build process and cross-buildThe build process and cross-build
    on Apr 29, 2026
  5. Shrey-N commented on Apr 30, 2026

    @Shrey-N
    Shrey-N
    on Apr 30, 2026
    Contributor
    More actions

    Hi @TrueCat17,

    I have tested your patch and can confirm that it resolves the compilation error,

    Would you like to submit a PR for this? I am happy to assist if needed!

  6. TrueCat17 commented on Apr 30, 2026

    @TrueCat17
    TrueCat17
    on Apr 30, 2026
    Author
    More actions

    @Shrey-N
    All that remains is to wait for the skip news label to be added to this PR

    Reacted by Shrey Naithani
  7. TrueCat17 commented on May 6, 2026

    @TrueCat17
    TrueCat17
    on May 6, 2026
    Author
    More actions

    @vstinner
    Could you take a look at this PR?

  8. vstinner commented on May 6, 2026

    @vstinner
    vstinner
    on May 6, 2026
    Member
    More actions

    I never tried to build CPython on Cygwin. I failed to find Cygwin documentation https://devguide.python.org/ and https://docs.python.org/dev/. To review such change, I would to be able to build CPython myself. Where can I find documentation about how to build CPython on Cygwin?

    But this only applies to new versions of Cygwin, i.e. after June 16, 2023,

    CPython doesn't support Cygwin yet (see PEP 11). Is it really worth it to support old Cygwin versions?

  9. TrueCat17 commented on May 7, 2026

    @TrueCat17
    TrueCat17
    on May 7, 2026
    Author
    More actions

    I'm building Python for win7 32-bit, this can only be done using the old Cygwin
    I don’t have the question “is it necessary?”, I only have “I need it”
    It doesn't matter to me whether this platform is officially supported, what matters to me is that it is actually supported
    There are a lot of references to Cygwin in the Python code; to support this platform there is a bunch of code that is included by the preprocessor or directly written in Python in the Lib folder

    BTW, you can look at the list of values ​​for sys.platform, for example:
    https://docs.python.org/dev/library/sys.html

    And the ONLY problem is the absence of 2 constants in this one file
    After fixing it, everything works exactly as it should (at least for me)
    I've sent out a PR that fixes this issue
    It does not affect other platforms - only Cygwin
    It does not even touch its new versions - only the old ones, which lack 2 necessary constants, this is directly checked

    So what's the problem with accepting this PR?
    What bad will happen from this?
    Have I done anything wrong?

  10. vstinner commented on May 13, 2026

    @vstinner
    vstinner
    on May 13, 2026
    Member
    More actions

    So what's the problem with accepting this PR?

    I need step by step instructions on how to build Python with Cygwin if you want me to review this PR. I don't want to merge a PR if I cannot test it manually myself.

  11. TrueCat17 commented on May 13, 2026

    @TrueCat17
    TrueCat17
    on May 13, 2026
    Author
    More actions

    I don't understand why this isn't obvious to you, but ok:

    • Install win7 32-bit;
    • Download old Cygwin x86 with archived repo, links:
      • https://cygwin.com/install.html (common page with info, links to .exe and .exe.sig)
      • https://cygwin.com/setup-x86.exe (from bottom part of common page, mb unavailable for downloading)
      • http://ctm.crouchingtigerhiddenfruitbat.org/pub/cygwin/setup/snapshots/setup-x86-2.924.exe (Cygwin Time Machine, available, http only, md5 = fa18e75fc94a13a1c7234ce0b4923c8c, sha256 = 041fa66c4ef7630c48f984cdfcabe67dd722550ddd949198a82eb609bb9ca7f5)
      • old repo for win7 32-bit: http://ctm.crouchingtigerhiddenfruitbat.org/pub/cygwin/circa/2022/11/23/063457 (circa_URL)
    • Run setup-x86.exe with param --allow-unsupported-windows from console or (better) from edited link to the file with this param
    • Choose gcc and other (I don't remember) tools
    • Start cygwin
    • cd /cygdrive/c/path/to/your/python/source/v3.14
    • ./configure --enable-shared --disable-optimizations --without-lto
    • make -j4
    • Expected: error on compile posixmodule.c
    • Apply PR patch
    • make -j4 again
    • Expected: built
  12. vstinner commented on May 13, 2026

    @vstinner
    vstinner
    on May 13, 2026
    Member
    More actions

    I tested Cygwin on Windows 11. Thanks, I managed to build Python with Cygwin following your instructions:

    • Download https://cygwin.com/setup-x86_64.exe
    • Run setup-x86_64.exe : select "gcc-core" and "make" packages.
    • Start Cygwin shell
    • Type: git config --global core.autocrlf input -- I had issues with newlines in the ./configure script without that.
    • Run git clone https://github.com/python/cpython/ --depth=1
    • Type: cd cpython
    • Type: ./configure --with-pydebug
    • Type: make -j8
  13. vstinner
    added a parent issue on May 15, 2026
    • Enhance Cygwin support #149879
  14. vstinner commented on May 15, 2026

    @vstinner
    vstinner
    on May 15, 2026
    Member
    More actions

    Cygwin 3.3.6-341 (win7 32-bit)

    This version was released in September 2022: https://cygwin.com/pipermail/cygwin-announce/2022-September/010707.html

    It's the last version supporting 32-bit x86: https://cygwin.com/pipermail/cygwin-announce/2022-November/010777.html

    Right now, Cygwin is not supported by Python. Adding support for a legacy Cygwin version in Python doesn't sound like a good idea. I would prefer to focus first on 64-bit Windows which is supported by Cygwin. There are many issues which should be fixed first to support Cygwin in Python. I created gh-149879 meta issue for Cygwin.

    If you want to support Cygwin on 32-bit Python/Windows, you can maintain a patch or a CPython fork with your changes.

    For now, I prefer closing this PR. You're welcome to help fixing other issues in gh-149879 :-)

    Reacted by Zachary Ware
  15. vstinner
    closed this as not plannedon May 15, 2026
  16. github-project-automation
    moved this to Done in Unsupported platformson May 15, 2026
  17. TrueCat17 commented on May 16, 2026

    @TrueCat17
    TrueCat17
    on May 16, 2026
    Author
    More actions

    To “add” this outdated platform, you need to add 6 lines of code that I have already written, which are guaranteed not to break anything on other platforms, and on this one too, since now the building generally fails
    In general, for the entire CPython project - just these 6 lines
    What's so difficult about this?

    I feel like I'm talking to a bot
    I sent a small fix that fixes everything, but time after time you tell me about an allegedly unsupported platform, which for some reason is mentioned dozens of times in the project

    If you want to support Cygwin on 32-bit Python/Windows, you can maintain a patch or a CPython fork with your changes.

    Thank you, damn it, for the permission

    Good luck with further sabotage, I've had enough of this nonsense
    I just hope that other people encountering these problems can find these cygwin-issues in the future if necessary.

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

    OS-unsupportedbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Unsupported platforms
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.