[PyQt] pyqtdeploy-build: Errors building for macx

Patrick Stinson patrickkidd at gmail.com
Wed Jan 10 01:42:26 GMT 2018


And with pyqtdeploy-build for iOS the problem is that Xcode can’t find ffi.h from _ctypes.c:107.

> On Jan 9, 2018, at 5:35 PM, Patrick Stinson <patrickkidd at gmail.com> wrote:
> 
> FWIW, the problems in this thread also happen with a clean pyqt-skeleton project that imports ctypes.
> 
>> On Jan 9, 2018, at 5:12 PM, Patrick Stinson <patrickkidd at gmail.com <mailto:patrickkidd at gmail.com>> wrote:
>> 
>> Looks like darwin64.S is not included in the Xcode target. If I add it it resolves the symbols, but then leads to even more problems:
>> 
>> ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
>> duplicate symbol _ffi_closure_free in:
>>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
>>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
>> duplicate symbol _ffi_closure_alloc in:
>>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o
>>     /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o
>> ld: 2 duplicate symbols for architecture x86_64
>> 
>> It looks like the setup for including python module sources (for ctypes I think?) are kind of a mess?
>> 
>> -P
>> 
>>> On Jan 9, 2018, at 1:40 PM, Patrick Stinson <patrickkidd at gmail.com <mailto:patrickkidd at gmail.com>> wrote:
>>> 
>>> There are compile errors for a project which includes xml.parsers.expat. For some reason xmlparse.c does not recognize that <stdlib.h> should include HAVE_ARC4RANDOM_BUF for macOS, resulting in the following compile error:
>>> 
>>> 
>>> #if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \
>>>     && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \
>>>     && !defined(XML_DEV_URANDOM) \
>>>     && !defined(_WIN32) \
>>>     && !defined(XML_POOR_ENTROPY)
>>> # error  \
>>>     You do not have support for any sources of high quality entropy \
>>>     enabled.  For end user security, that is probably not what you want. \
>>>     \
>>>     Your options include: \
>>>       * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \
>>>       * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \
>>>       * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \
>>>       * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \
>>>       * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \
>>>       * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \
>>>       * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \
>>>       * Windows (RtlGenRandom): _WIN32. \
>>>     \
>>>     If insist on not using any of these, bypass this error by defining \
>>>     XML_POOR_ENTROPY; you have been warned. \
>>>     \
>>>     If you have reasons to patch this detection code away or need changes \
>>>     to the build system, please open a bug.  Thank you!
>>> #endif
>>> 
>>> I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.
>>> 
>>> If I add #define HAVE_ARC4RANDOM_BUF (which should be available via stdlib.h on macos) then the file compiles but I get the following (unrelated) linker errors:
>>> 
>>> Undefined symbols for architecture x86_64:
>>>   "_ffi_call_unix64", referenced from:
>>>       _ffi_call in x86-ffi64.o
>>>   "_ffi_closure_unix64", referenced from:
>>>       _ffi_prep_closure in x86-ffi64.o
>>>      (maybe you meant: _ffi_closure_unix64_inner)
>>> ld: symbol(s) not found for architecture x86_64
>>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>> 
>>> 
>>> I have had little success figuring out what the story is on those ffi symbols.
>>> 
>>> <pyqt-skel.zip>
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180109/da79cdca/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/da79cdca/attachment-0001.bin>


More information about the PyQt mailing list