So. I wanted to install
gnupg from FreeBSD ports on an older box. Somehow it depended on something that depended on the LDAP libraries. Which broke authentication on the box. And in fixing that, lots of other dependencies needed to be updated. It turned into a horrible mess and some ports wouldn’t reinstall cleanly and no amount of
portmaster shenanigans would fix it without removing swathes of stuff first.
In trying to find out which shared libraries were now broken, I wrote a very crude script to find out which binaries broke.