[PyQt] pyqtdeploy-build: Errors building for macx

Patrick Stinson patrickkidd at gmail.com
Tue Jan 9 21:40:01 GMT 2018


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180109/48a92b34/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyqt-skel.zip
Type: application/zip
Size: 2519 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180109/48a92b34/attachment.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180109/48a92b34/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/48a92b34/attachment.bin>


More information about the PyQt mailing list