You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error on build posixmodule.c in old Cygwin #149125
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.# ifndefXATTR_SIZE_MAX# defineXATTR_SIZE_MAX 65536
# endif# ifndefXATTR_LIST_MAX# defineXATTR_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
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 the Lib folder
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?
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.
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 :-)
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.
Activity
Shrey-N commentedon Apr 30, 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!
TrueCat17 commentedon Apr 30, 2026
@Shrey-N
All that remains is to wait for the
skip newslabel to be added to this PRTrueCat17 commentedon May 6, 2026
@vstinner
Could you take a look at this PR?
vstinner commentedon May 6, 2026
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?
CPython doesn't support Cygwin yet (see PEP 11). Is it really worth it to support old Cygwin versions?
TrueCat17 commentedon May 7, 2026
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
LibfolderBTW, 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?
vstinner commentedon May 13, 2026
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.
TrueCat17 commentedon May 13, 2026
I don't understand why this isn't obvious to you, but ok:
.exeand.exe.sig)setup-x86.exewith param--allow-unsupported-windowsfrom console or (better) from edited link to the file with this paramgccand other (I don't remember) toolscd /cygdrive/c/path/to/your/python/source/v3.14./configure --enable-shared --disable-optimizations --without-ltomake -j4posixmodule.cmake -j4againvstinner commentedon May 13, 2026
I tested Cygwin on Windows 11. Thanks, I managed to build Python with Cygwin following your instructions:
git config --global core.autocrlf input-- I had issues with newlines in the./configurescript without that.git clone https://github.com/python/cpython/ --depth=1cd cpython./configure --with-pydebugmake -j8vstinner commentedon May 15, 2026
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 :-)
TrueCat17 commentedon May 16, 2026
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
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.