[tz] Errors compiling 2022f on macOS
Deborah Goldsmith
goldsmit at apple.com
Sun Oct 30 06:47:03 UTC 2022
Haha I just happened to have gettext installed on my system; it’s not a standard part of macOS. It would probably be best to compile it out by default on Darwin systems.
Debbie
> On Oct 29, 2022, at 8:53 PM, Paul Eggert via tz <tz at iana.org> wrote:
>
> On 2022-10-29 15:29, Gilmore Davidson via tz wrote:
>
>> cc -DTZDIR='"/usr/share/zoneinfo"' -c -o zic.o zic.c
>> zic.c:1194:11: error: implicit declaration of function 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>> s = getrandom(entropy_buffer, sizeof entropy_buffer, 0);
>> ^
>
> Thanks for reporting the problem. Please try the attached patch, which I installed in the development repository. Alternatively as you mentioned, you can work around this problem by appending -DHAVE_GETRANDOM=0 to CFLAGS.
>
>
>
>> cc -DTZDIR='"/usr/share/zoneinfo"' -o zic -DHAVE_GETRANDOM=0 zic.o
>> Undefined symbols for architecture x86_64:
>> "_libintl_gettext", referenced from:
>
> This looks like a not uncommon configuration issue on macOS. You might try reinstalling gettext. See <https://github.com/EOSIO/eos/issues/2392>, which suggests:
>
> brew reinstall gettext
> brew unlink gettext && brew link gettext --force --overwrite
>
> (I don't use brew so don't know what this means.) Deborah reports not being able to reproduce the problem on macOS; perhaps it's a macOS versioning issue if it's not a brew issue?
>
> Alternatively, you can work around this second problem by appending "-DHAVE_GETTEXT=0" to CFLAGS. The attached patch tries to improve the commentary a bit in this area.
>
>
>> Also, the Makefile comment for the HAVE_GETRANDOM flag says "-DHAVE_GETRANDOM if getgrandom works (e.g., GNU/Linux)*” — is “getgrandom” a typo?
>
> Thanks, also fixed in the attached patch.
> <0001-Fix-GET_RANDOM-default-on-macOS.patch>
More information about the tz
mailing list