<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="">Maybe another or related bug where building for target macos-64 builds python from source with arch flags for iOS?<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="">turin:vendor patrick$ pyqtdeploy-sysroot --component python --target macos-64 sysroot.json </span></div></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="">Building the target Python 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="">Configuring Python v3.6.4 for macos-64</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="">Installing /Users/patrick/dev/vendor/sysroot-macos-64/build/Python-3.6.4/Python-3.6.4/Modules/config.c</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="">Generating /Users/patrick/dev/vendor/sysroot-macos-64/build/Python-3.6.4/Python-3.6.4/pyconfig.h</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="">Installing /Users/patrick/dev/vendor/sysroot-macos-64/build/Python-3.6.4/Python-3.6.4/python.pro</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="">Info: creating stash file /Users/patrick/dev/vendor/sysroot-macos-64/build/Python-3.6.4/Python-3.6.4/.qmake.stash</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="">/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/getbuildinfo.o Modules/getbuildinfo.c</span></div><div><br class=""></div><div><div class="">I installed Qt for both iOS and clang_64 platforms using the standard open source installer, with the following “qt_dir” setup in the qt5 sysroot component:</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(225, 225, 225); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(175, 55, 130);" class="">"qt5"</span><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(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"macos#qt_dir"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class="">: </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"/Users/patrick/dev/vendor/lib/Qt/5.10.0/clang_64"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class="">,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"ios#qt_dir"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class="">: </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"/Users/patrick/dev/vendor/lib/Qt/5.10.0/ios"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class="">,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"ios#ssl"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class="">: </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"securetransport"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class="">,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class=""> </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"macos#ssl"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(225, 225, 225);" class="">: </span><span style="font-variant-ligatures: no-common-ligatures;" class="">"openssl-linked"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(225, 225, 225); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> },</span></div></div></div><div><br class=""></div><div>With this sysroot config:</div><div><br class=""></div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">"python"</span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class="">: {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">"build_host_from_source"</span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #34a1a1" class="">true</span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class="">,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">"build_target_from_source"</span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #34a1a1" class="">true</span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class="">,</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(175, 55, 130); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">"source"</span><span style="font-variant-ligatures: no-common-ligatures; color: #e1e1e1" class="">: </span><span style="font-variant-ligatures: no-common-ligatures" class="">"/Users/patrick/dev/vendor/pyqt-sysroot-base/Python-3.6.4.tgz"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(225, 225, 225); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> },</span></div></div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 8, 2018, at 7:47 PM, Patrick Stinson <<a href="mailto:patrickkidd@gmail.com" class="">patrickkidd@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div 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;" 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 class=""><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></div></div></blockquote></div><br class=""></div></body></html>