The problem seems to be a race with building libbsd (and unlucky
timing in my build). Adding libbsd to DEPENDS fixes the problem.
For some added context, libtdb uses a nonstandard ./configure from the
Samba project based on a configuration utility called Waf that I'm a
complete noob on. Perhaps there is some way to disable libbsd support
instead.