On 13.12.2020 09:52, Mark Geisert wrote:
Mark Geisert wrote:
This seems to be a problem setting up a platform-specific build directory. The sysconfig.py script wants to use "lib." + platform + pythonversion but the platform string somehow gets corrupted into non-utf8 bytes.  For instance, building Python 3.8 comes up with:
     lib.cygwin-\365\377\377o-\377o-3.8
as the directory name.  Broken, but could work.  The build failure happens because the script tries to write this directory name into a file but it's not a valid utf8 string.  The directory name should have been:
     lib.cygwin-3.2.0-x86_64-3.8

And the corruption is due to something about a recent change to the operation of Cygwin's uname() function.  The change was introduced in Cygwin API version 335; I'm running 340 on my test machine.  This being a fairly recent change might possibly explain why nobody else has run into this issue yet.

Basically, os.uname within Python is calling Cygwin's uname() passing the address of a buffer declared to be 'struct utsname'.  The structure layout changed in API 335.  What I've hit is a mismatch between what Python expects and Cygwin delivers.

I'll move this discussion over to the developers list tomorrow.

..mark

thanks for the analysis

let me know if you think we should correct the python build in any way

Regards
Marco

Reply via email to