<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Phil,<div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/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</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Modules/posixmodule.c:4138:14: </span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">error: </span><span style="font-variant-ligatures: no-common-ligatures" class="">'system' is unavailable: not available on iOS</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    result = system(bytes);</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(52, 188, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">             ^</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(255, 255, 255); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/usr/include/stdlib.h:195:6: </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">note: </span><span style="font-variant-ligatures: no-common-ligatures; color: #f4f4f4" class="">'system' has been explicitly marked unavailable here</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">int      system(const char *) __DARWIN_ALIAS_C(system);</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(52, 188, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">         ^</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">1 error generated.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">make: *** [.obj/posixmodule.o] Error 1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Traceback (most recent call last):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "/usr/local/bin/pyqtdeploy-sysroot", line 11, in <module></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    sys.exit(main())</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/pyqtdeploysysroot_main.py", line 83, in main</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    sysroot.build_components(args.component, args.no_clean)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/sysroot.py", line 102, in build_components</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    component.build(self)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/plugins/python/python.py", line 98, in build</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    self._build_target_from_source(sysroot, archive)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/plugins/python/python.py", line 200, in _build_target_from_source</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    sysroot.run(sysroot.host_make)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  File "/usr/local/lib/python3.6/site-packages/pyqtdeploy/sysroot/sysroot.py", line 550, in run</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    subprocess.check_call(args)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  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</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    raise CalledProcessError(retcode, cmd)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">subprocess.CalledProcessError: Command '('make',)' returned non-zero exit status 2.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">turin:vendor patrick$ </span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class="">-Patrick<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 7, 2018, at 8:35 AM, Patrick Stinson <<a href="mailto:patrickkidd@gmail.com" class="">patrickkidd@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">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.<br class=""><br class="">-Patrick<br class=""><br class=""><blockquote type="cite" class="">On Jan 7, 2018, at 3:30 AM, Phil Thompson <<a href="mailto:phil@riverbankcomputing.com" class="">phil@riverbankcomputing.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">On 6 Jan 2018, at 6:55 pm, Patrick Stinson <<a href="mailto:patrickkidd@gmail.com" class="">patrickkidd@gmail.com</a>> wrote:<br class=""><br class="">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.<br class=""></blockquote><br class="">The demo (indirectly) uses _socket and that works fine.<br class=""><br class="">Do you have an example?<br class=""><br class="">Phil<br class=""></blockquote></div></div></blockquote></div><br class=""></div></body></html>