package python (for cygwin c lib) compatibility issue with UCR64
Description / Steps to reproduce the issue
Issue:
pyconfig.h has been set up for msys (cygwin c library) and isn’t compatible with UCRT64 (and I’d guess other libraries?)
While trying to build some pip packages, gcc has fatal error sys/select.h: No such file or directory.
Related Issue: #3307
Reproduce:
Inside MSYS2 UCRT64
- Install default python with pip.
-
pip install ujsonorpip install brotli(Or any time gcc includes python.h) (Remove if already installed)
Temporary fix:
Install pip packages from MSYS2 MSYS, it works but is bit hacky and pretty annoying but does the job for the time being.
OR
[Dirty, please don’t do that if you’re unsure] Comment all the HAVE_SYS_XYZ you don’t have, directly in /usr/include/python3.11/pyconfig.h You can see which ones you have at /ucrt64/include/sys
Expected behavior
Being able to use pip no matter the environment.
Actual behavior
Some pip packages can only be installed using MSYS environment.
Verification
- [X] I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
MINGW64_NT-10.0-22621
Are you willing to submit a PR?
Maybe in the future
I'd guess this is a case of mixing msys/cygwin and native gcc.
You need to install the native Python and toolchain for UCRT64:
pacman -S mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-python-pip mingw-w64-ucrt-x86_64-gcc