<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="">And with pyqtdeploy-build for iOS the problem is that Xcode can’t find ffi.h from _ctypes.c:107.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 9, 2018, at 5:35 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=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">FWIW, the problems in this thread also happen with a clean pyqt-skeleton project that imports <i class="">ctypes</i>.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jan 9, 2018, at 5:12 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=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">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:<div class=""><br class=""></div><div class=""><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">duplicate symbol _ffi_closure_free in:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">duplicate symbol _ffi_closure_alloc in:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/closures.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">    /Users/patrick/dev/pkdiagram/build/osx/Family Diagram.build/Debug/Family Diagram.build/Objects-normal/x86_64/malloc_closure.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">ld: 2 duplicate symbols for architecture x86_64</div><div class=""><br class=""></div><div class="">It looks like the setup for including python module sources (for ctypes I think?) are kind of a mess?</div><div class=""><br class=""></div><div class="">-P</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jan 9, 2018, at 1:40 PM, Patrick Stinson <<a href="mailto:patrickkidd@gmail.com" class="">patrickkidd@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">There are compile errors for a project which includes <b class="">xml.parsers.expat</b>. For some reason xmlparse.c does not recognize that <stdlib.h> should include <span style="color: rgb(120, 73, 42); font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">HAVE_ARC4RANDOM_BUF</span> for macOS, resulting in the following compile error:<div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">#if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    && !defined(XML_DEV_URANDOM) \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    && !defined(_WIN32) \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    && !defined(XML_POOR_ENTROPY)</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class=""># <span style="text-decoration: underline" class="">e</span>rror  \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    You do not have support for any sources of high quality entropy \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    enabled.  For end user security, that is probably not what you want. \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    Your options include: \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * BSD / macOS >=10.7 (arc4random_buf): HAVE_ARC4RANDOM_BUF, \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * BSD / macOS <10.7 (arc4random): HAVE_ARC4RANDOM, \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * libbsd (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * Linux / BSD / macOS (/dev/urandom): XML_DEV_URANDOM \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">      * Windows (RtlGenRandom): _WIN32. \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    If insist on not using any of these, bypass this error by defining \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    XML_POOR_ENTROPY; you have been warned. \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    If you have reasons to patch this detection code away or need changes \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">    to the build system, please open a bug.  Thank you!</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(120, 73, 42); background-color: rgb(255, 255, 255);" class="">#endif</div><div class=""><br class=""></div><div class="">I have attached a bare-bones skeleton which imports qt and xml.parsers.expat.</div><div class=""><br class=""></div><div class="">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:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">Undefined symbols for architecture x86_64:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">  "_ffi_call_unix64", referenced from:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">      _ffi_call in x86-ffi64.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">  "_ffi_closure_unix64", referenced from:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">      _ffi_prep_closure in x86-ffi64.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">     (maybe you meant: _ffi_closure_unix64_inner)</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">ld: symbol(s) not found for architecture x86_64</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">clang: error: linker command failed with exit code 1 (use -v to see invocation)</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I have had little success figuring out what the story is on those ffi symbols.</div><div class=""><br class=""></div><div class=""></div></div></div><span id="cid:9CA42128-90F8-4A4B-8B3F-6C54257A3D6B" class=""><pyqt-skel.zip></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""></div></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>