I use dovecot under FreeBSD 10.3 and build using poudriere. My build server has 12 cores builds typically happen in parallel and I find software that is not parallel make friendly will fail once every month or so.
Attached is a build log from this afternoon that failed because doveadm-util.o had not finished building when the attempt to link test-doveadm-util happened.
Looking in src/doveadm/Makefile* in the build tree the only place I see doveadm-util.o is in a make variable:
test_doveadm_util_LDADD = doveadm-util.o $(test_libs) $(MODULE_LIBS)
This is only used in the test-doveadm-util rule:
test-doveadm-util$(EXEEXT): $(test_doveadm_util_OBJECTS)
$(test_doveadm_util_DEPENDENCIES) $(EXTRA_test_doveadm_util_DEPENDENCIES) @rm -f test-doveadm-util$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_doveadm_util_OBJECTS) $(test_doveadm_util_LDADD) $(LIBS)
So the problem is that doveadm-util.o needs to be an explicit dependency for test-doveadm-util.
I believe one possible fix would be to add doveadm-util.o to test_doveadm_util_DEPENDENCIES:
test_doveadm_util_DEPENDENCIES = $(test_deps)
bug this isn't something that can easily tested.
Craig