Created attachment 235173 [details]
Attached build log from Poudriere. FreeBSD 13.1 amd64.
I had a look. There are a few observations. First: it looks for a wrong set of libs -lldap_r-2.4 -llber-2.4 and -lldap_r -llber.
This is easily corrected, however next I run into another problem.
Although LDFLAGS_openldap is correctly populated with -L/usr/local/lib -Wl,--rpath=/usr/local/lib actual invocation of cc is done with default -L/usr/lib -Wl,--rpath=/usr/lib which is obviously wrong and the test still fails.
I will have a closer look later