[PyQt] ANN: pyqtdeploy v2.0 Released
Patrick Stinson
patrickkidd at gmail.com
Tue Jan 9 20:07:54 GMT 2018
The build for the entire ios-64 sysroot completed once I I patched and re-zipped Python-3.4.6 @ Modules/posixmodule.c:200:
#if defined(__APPLE__) && defined(__MACH__)
/* Apple OSX and iOS (Darwin). ------------------------------ */
#include <TargetConditionals.h>
#if TARGET_IPHONE_SIMULATOR == 1
/* iOS in Xcode simulator */
#undef HAVE_SYSTEM
#elif TARGET_OS_IPHONE == 1
/* iOS on iPhone, iPad, etc. */
#undef HAVE_SYSTEM
#elif TARGET_OS_MAC == 1
/* OSX */
#endif
#endif
Then pyqtdeplpoy-build fails with this:
pyqtdeploy-build --verbose --sysroot ~/dev/vendor/sysroot-ios-64 --target ios-64 --build-dir build/ios pkdiagram.pdy
Cleaning /Users/patrick/dev/pkdiagram/build/ios
Creating directory /Users/patrick/dev/pkdiagram/build/ios
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/pkdiagram
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/pkdiagram/objects
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/pkdiagram/util
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/collections
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/ctypes
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/email
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/encodings
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/http
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/importlib
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/logging
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/xml
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/xml/parsers
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/chardet
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/chardet/cli
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/idna
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/requests
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib3
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib3/contrib
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib3/contrib/_securetransport
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib3/packages
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib3/packages/backports
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib3/packages/ssl_match_hostname
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/urllib3/util
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/xlsxwriter
Creating directory /Users/patrick/dev/pkdiagram/build/ios/resources/PyQt5
Running '/Users/patrick/dev/vendor/sysroot-ios-64/bin/python -OO /var/folders/5t/xnfn85cs1kq_xdllp0wqyx3w0000gn/T/qt_temp-eHXZbe/freeze.py /var/folders/5t/xnfn85cs1kq_xdllp0wqyx3w0000gn/T/qt_temp-eHXZbe/jobs.csv'
pyqtdeploy-build: Unable to freeze files: execvp: No such file or directory
make: *** [build/ios/Family Diagram.pro] Error 1
turin:pkdiagram patrick$
Indeed, sysroot-ios-64/bin/python does not exist, but sysroot-ios-64/host/bin/python does.
-Patrick
> On Jan 9, 2018, at 10:20 AM, Patrick Stinson <patrickkidd at gmail.com> wrote:
>
> Yes, this is with latest Xcode 9. No problems building a Mac target. I believe this is a bug in the python code, as iOS is not properly detected and accounted for by the source. It also happens when I manually try to build python for iOS.
>
> -Patrick
>
>> On Jan 9, 2018, at 3:38 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
>>
>>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180109/d2cf18de/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/20180109/d2cf18de/attachment-0001.bin>
More information about the PyQt
mailing list