Hide Forgot
pam-1.2.1-5.fc24.i686 rpm package does not create a symbolic link for libpam.so in the /usr/lib folder for 32 bit binaries [ running on a 64 bit installation ]. so if i try to compile the 32 code and try to link with libpam.so it cracks saying cant find libpam.so gcc -L/usr/lib -m32 -shared -fPIC sample.cpp -o libsample.so -lpam I had to manually create a symbolic link like below in /usr/lib as root to solve this problem. cd /usr/lib ln -s libpam.so.0.84.1 libpam.so Then it works!
You have to install pam-devel.i686 for that.