<html><body 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></body></html>