If a system comes with the kerberos and ldap libraries installed, the configure option --without-krb5 fails to turn off kerberos support in the build. If you really want a samba build without kerberos, you need to specify --without-ads as well. This bug hides the naive reproduction of bug #7327.
Looks like --without-krb5 has gone away but --without-ads doesn't avoid krb5: # ./configure --without-ads --without-ldap && make -j # ldd bin/smbd| grep krb5 libkrb5samba-samba4.so => /home/abartlet/samba/bin/shared/private/libkrb5samba-samba4.so (0x00007f81833a5000) libauthkrb5-samba4.so => /home/abartlet/samba/bin/shared/private/libauthkrb5-samba4.so (0x00007f817f789000) libndr-krb5pac.so.0 => /home/abartlet/samba/bin/shared/libndr-krb5pac.so.0 (0x00007f817ccbf000) libkrb5-samba4.so.26 => /home/abartlet/samba/bin/shared/private/libkrb5-samba4.so.26 (0x00007f817b15f000) libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f81788cd000) libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f81766f5000) libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f81760b4000) so this bug is still valid (which might be a feature, we can assume krb5).