<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">AFAICT getrandom does not exist on Darwin/macOS; I can reproduce the first problem.<div><br></div><div>I can’t reproduce the second problem on macOS 13.</div><div><br></div><div><p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">debbie  3:36PM tz ?2 % make CFLAGS="-DHAVE_GETRANDOM=0"</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -DHAVE_GETRANDOM=0   -c -o zic.o zic.c</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -o zic -DHAVE_GETRANDOM=0  zic.o </span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -DHAVE_GETRANDOM=0   -c -o zdump.o zdump.c</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -DHAVE_GETRANDOM=0   -c -o localtime.o localtime.c</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -DHAVE_GETRANDOM=0   -c -o asctime.o asctime.c</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -DHAVE_GETRANDOM=0   -c -o strftime.o strftime.c</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -o zdump -DHAVE_GETRANDOM=0  zdump.o localtime.o asctime.o strftime.o </span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">cc -DTZDIR='"/usr/share/zoneinfo"' -DHAVE_GETRANDOM=0   -c -o difftime.o difftime.c</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">rm -f libtz.a</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">ar -rc libtz.a localtime.o asctime.o difftime.o strftime.o</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">: libtz.a</span></p><div><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div>Debbie</div><div><br><blockquote type="cite"><div>On Oct 29, 2022, at 3:29 PM, Gilmore Davidson via tz <tz@iana.org> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi, I’m getting errors when running make on the 2022f release, on my macOS Monterrey (12.6.1) machine.<div><br></div><div>There are two separate errors. When I run `make` with no arguments, I get the following:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>cc -DTZDIR='"/usr/share/zoneinfo"'    -c -o zic.o zic.c</div><div>zic.c:1194:11: error: implicit declaration of function 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration]</div><div>      s = getrandom(entropy_buffer, sizeof entropy_buffer, 0);</div><div>          ^</div><div>1 error generated.</div></div><div><br></div></blockquote><div><br></div><div>After some digging, I tried running `make CFLAGS="-DHAVE_GETRANDOM=0”`, which then presents a different error:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>cc -DTZDIR='"/usr/share/zoneinfo"' -o zic -DHAVE_GETRANDOM=0  zic.o</div><div>Undefined symbols for architecture x86_64:</div><div>  "_libintl_gettext", referenced from:</div><div>      _main in zic.o</div><div>      _close_file in zic.o</div><div>      _usage in zic.o</div><div>      _warning in zic.o</div><div>      _infile in zic.o</div><div>      _adjleap in zic.o</div><div>      _associate in zic.o</div><div>      ...</div><div>  "_libintl_setlocale", referenced from:</div><div>      _main in zic.o</div><div>  "_libintl_textdomain", referenced from:</div><div>      _main in zic.o</div><div>ld: symbol(s) not found for architecture x86_64</div><div>clang: error: linker command failed with exit code 1 (use -v to see invocation)</div></div><div><br></div></blockquote><div><br></div><div>I’m not a C programmer so I’m out of my depth with trying to diagnose workarounds. Possibly there’s just another CFLAGS argument I need to provide, or I’ve got something else weird in my environment?</div><div><br></div><div>Some extra bits of context:</div><div><br></div><div><ul class="MailOutline"><li>These errors also happen on latest `main` branch (commit 9f1f40cd).</li><li>I can compile 2022e without issue.</li><li>The getrandom error appears in commit 0733c65c ("Improve randomness of zic temp file names”).</li><li>The linking error appears in commit e5b2ee63 ("Use C23 __has_include if available”).</li><li>masOS 12.6.1 / Make 3.81 / clang 14.0.0</li></ul><div><br></div><div>Also, the Makefile comment for the HAVE_GETRANDOM flag says "-DHAVE_GETRANDOM if getgrandom works (e.g., GNU/Linux)*” — is “getgrandom” a typo?</div><div><br></div></div><div>Cheers,</div><div>Gil</div><div><br></div></div></div></blockquote></div><br></div></body></html>