I've gotten no replies as yet, but I diagnosed a bit further.
One of the symbols that the link step complained about: binary_to_hex_append, referenced in src/lib-var-expand-crypt/var-expand-crypt.c, declared in the header file src/lib/hex-binary.h.
$ cd src/lib $ nm .libs/liblib.a ... hex-binary.o: 0000000000000000 T _binary_to_hex 0000000000000308 T _binary_to_hex_append $
IOW, that function has been successfully compiled and appears in both hex-binary.o and the object archive "src/lib/.libs/liblib.a".
Meanwhile, here's the actual compile command for lib-var-expand-crypt:
$ cd src/lib-var-expand-crypt $ make -n echo " CCLD " var_expand_crypt.la;/bin/sh ../../libtool --silent --tag=CC --mode=link gcc -std=gnu11 -I/opt/homebrew/include -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -export-dynamic -avoid-version -module -no-undefined -L/opt/homebrew/lib -o var_expand_crypt.la -rpath /opt/homebrew/lib/dovecot var-expand-crypt.lo ... $
Nothing in that link step seems to reference "liblib.a" (or "liblib.la", or anything like that).
Why doesn't this link step seem to reference the right library?
Does 2.4.1 build for anyone on MacOS??
It's been a *long* while since I dealt with building source with the GNU toolchain (libtool and friends), so I'm a bit rusty here.
Help, please?