Repository navigation
Error on build posixmodule.c in old Cygwin #149125
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Apr 29, 2026 - addedextension-modulesC modules in the Modules dirC modules in the Modules dir
on Apr 29, 2026 - addedbuildThe build process and cross-buildThe build process and cross-build
on Apr 29, 2026 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!
@Shrey-N
All that remains is to wait for theskip newslabel to be added to this PRReacted by Shrey Naithani@vstinner
Could you take a look at this PR?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?
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 theLibfolderBTW, you can look at the list of values for
sys.platform, for example:
https://docs.python.org/dev/library/sys.htmlAnd 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 checkedSo what's the problem with accepting this PR?
What bad will happen from this?
Have I done anything wrong?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.
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
.exeand.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)
- https://cygwin.com/install.html (common page with info, links to
- Run
setup-x86.exewith param--allow-unsupported-windowsfrom console or (better) from edited link to the file with this param - Choose
gccand other (I don't remember) tools - Start cygwin
cd /cygdrive/c/path/to/your/python/source/v3.14./configure --enable-shared --disable-optimizations --without-ltomake -j4- Expected: error on compile
posixmodule.c - Apply PR patch
make -j4again- Expected: built
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./configurescript without that. - Run
git clone https://github.com/python/cpython/ --depth=1 - Type:
cd cpython - Type:
./configure --with-pydebug - Type:
make -j8
- added a parent issue
on May 15, 2026 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 WareTo “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 projectIf 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.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Bug report
Bug description:
Line
253includes the filecygwin/limits.hwith 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:
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