Как скомпилировать python2 v2.7.16 под Mingw-w64 (у меня есть ошибки компиляции) - PullRequest
0 голосов
/ 02 мая 2019

Я попытался скомпилировать python2 v2.7.16 с помощью MINGW-пакетов git repo:

git clone https://github.com/msys2/MINGW-packages.git

cd MINGW-packages/mingw-w64-python2

MINGW_INSTALLS='mingw32' makepkg-mingw -dLf --nocheck --skippgpcheck

Я всегда получаю следующие ошибки:

../Python-2.7.16/Python/random.c:247:16: warning: implicit declaration of function 'fcntl'; did you mean 'rintl'? [-Wimplicit-function-declaration]
         attr = fcntl(fd, F_GETFD);
                ^~~~~
                rintl
../Python-2.7.16/Python/random.c:247:26: error: 'F_GETFD' undeclared (first use in this function)
         attr = fcntl(fd, F_GETFD);
                          ^~~~~~~
../Python-2.7.16/Python/random.c:247:26: note: each undeclared identifier is reported only once for each function it appears in
../Python-2.7.16/Python/random.c:249:21: error: 'FD_CLOEXEC' undeclared (first use in this function); did you mean 'S_IEXEC'?
             attr |= FD_CLOEXEC;
                     ^~~~~~~~~~
                     S_IEXEC
../Python-2.7.16/Python/random.c:250:29: error: 'F_SETFD' undeclared (first use in this function)
             (void)fcntl(fd, F_SETFD, attr);
                             ^~~~~~~
make: *** [Makefile:1376: Python/random.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...```
...