[PyQt] ANN: pyqtdeploy v2.0 Released
Phil Thompson
phil at riverbankcomputing.com
Tue Jan 9 11:38:24 GMT 2018
On 9 Jan 2018, at 3:47 am, Patrick Stinson <patrickkidd at gmail.com> wrote:
>
> Phil,
>
> There is a current bug in building python (maybe 3.5.2 - 3.6.4?) for iOS which does not correctly #undef HAVE_SYSTEM or #define HAVE_SYSTEM 0 around Modules/posixmodule.c:200 for v3.5.2 or Modules/posixmodule.c:180 in v3.6.4 , causing a compile error (see below). In the past I had to edit this file manually before the build phase, which worked fine because the build phase was separated from the configure/qmake phase. But, it seems like pyqtdeploy-sysroot v2 might need to patch the file to accomplish this? Or maybe there is a better way?
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -pipe -fwrapv -std=c99 -g -fPIC -arch arm64 -arch x86_64 -Xarch_arm64 -miphoneos-version-min=10.0 -Xarch_arm64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -Xarch_x86_64 -mios-simulator-version-min=10.0 -Xarch_x86_64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -fobjc-nonfragile-abi -fobjc-legacy-dispatch -w -fembed-bitcode-marker -DQT_COMPILER_SUPPORTS_SSE2 -DNDEBUG -DPy_BUILD_CORE -DVERSION=\"3.6\" -DVPATH=\".\" -DPREFIX=\"/\" -DEXEC_PREFIX=\"/\" -DPYTHONPATH=\"/lib/python3.6\" -DPLATFORM=\"darwin\" -DMULTIARCH=\"ios\" -DABIFLAGS=\"m\" -I. -I../../../../lib/Qt/5.10.0/ios/mkspecs/common/uikit -I. -IInclude -I../../../../lib/Qt/5.10.0/ios/mkspecs/macx-ios-clang -o .obj/posixmodule.o Modules/posixmodule.c
> Modules/posixmodule.c:4138:14: error: 'system' is unavailable: not available on iOS
> result = system(bytes);
> ^
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/usr/include/stdlib.h:195:6: note: 'system' has been explicitly marked unavailable here
> int system(const char *) __DARWIN_ALIAS_C(system);
> ^
> 1 error generated.
> make: *** [.obj/posixmodule.o] Error 1
> Traceback (most recent call last):
> File "/usr/local/bin/pyqtdeploy-sysroot", line 11, in <module>
> sys.exit(main())
> File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/pyqtdeploysysroot_main.py", line 83, in main
> sysroot.build_components(args.component, args.no_clean)
> File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/sysroot.py", line 102, in build_components
> component.build(self)
> File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/plugins/python/python.py", line 98, in build
> self._build_target_from_source(sysroot, archive)
> File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/plugins/python/python.py", line 200, in _build_target_from_source
> sysroot.run(sysroot.host_make)
> File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/sysroot.py", line 550, in run
> subprocess.check_call(args)
> File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '('make',)' returned non-zero exit status 2.
> turin:vendor patrick$
Yuck - are you using Xcode9?
Do you have any problems with Xcode9 with a macOS target?
Phil
More information about the PyQt
mailing list