Slackware does not use PAM
Due to security concerns (regarding the quality of the PAM implementation), Slackware does not include PAM. It is said to be possible to PAM-ify Slackware if one really wants to, but I'd assume it's not entirely easy.
So unless you have added PAM yourself, this is the likely cause of your problems. Try recompiling without PAM support.