You need to be linking against libresolv. You should suggest to the sudo maintainers that they use the krb5-config script to determine what kerberos libraries to use.