pyqtdeploy failed compile Python 3.7.8 for android-64 on macOS Big Sur

天山雪 mozilla88 at foxmail.com
Mon Mar 15 04:44:40 GMT 2021


I want to build pyqt-demo for Android, but unfortunately I failed.


I use an old Macbook Pro laptop, the OS version is macOS Big Sur 11.2.1.




pyqtdeploy version is 3.1.1

clang version is:
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Android NDK version is android-ndk-r21d


Here is my process to compile pyqt-demo for android-64 platform:


cd pyqtdeploy-3.1.1/demo
python3 build-demo.py --target android-64 --qmake ~/Qt/5.15.0/clang_64/bin/qmake --verbose


When compile Modules/posixmodule.c from Python 3.7.8, it failed.


/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -pipe -fwrapv -std=c99 -O3 -fPIC  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.13 -w -DNDEBUG -DPy_BUILD_CORE -DVERSION=\"3.7\" -DVPATH=\".\" -DPREFIX=\"/\" -DEXEC_PREFIX=\"/\" -DPYTHONPATH=\"/lib/python3.7\" -DPLATFORM=\"darwin\" -DMULTIARCH=\"darwin\" -DABIFLAGS=\"m\" -I. -I. -IInclude -I/Users/dlee/programs/Qt/5.15.0/clang_64/mkspecs/macx-clang -o .obj/posixmodule.o Modules/posixmodule.c
Modules/posixmodule.c:61:10: fatal error: 'sys/sysmacros.h' file not found
#include <sys/sysmacros.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.


I don't know how to solve this problem. I'd appreciate it if someone can help me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210315/20b8ceec/attachment.htm>


More information about the PyQt mailing list