[PyQt] ANN: pyqtdeploy v2.0 Released
Patrick Stinson
patrickkidd at gmail.com
Tue Jan 9 03:47:13 GMT 2018
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$
-Patrick
> On Jan 7, 2018, at 8:35 AM, Patrick Stinson <patrickkidd at gmail.com> wrote:
>
> Ah Ok, that is encouraging as my method was (obviously) kind of a pain to maintain. I will rebuild my sysroots with v2 and report back.
>
> -Patrick
>
>> On Jan 7, 2018, at 3:30 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
>>
>>> On 6 Jan 2018, at 6:55 pm, Patrick Stinson <patrickkidd at gmail.com> wrote:
>>>
>>> OK that’s interesting. Then for example, what is the suggested way to linke the standard python C module “_socket” in the exe, and have it’s module init method PyInit__socket” called on startup? Selecting “socket” in the pyqtdeploy gui didn’t do all of that for me.
>>
>> The demo (indirectly) uses _socket and that works fine.
>>
>> Do you have an example?
>>
>> Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180108/52ce0a62/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1403 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180108/52ce0a62/attachment-0001.bin>
More information about the PyQt
mailing list