google / google-authenticator-libpam

Apache License 2.0
1.77k stars 281 forks source link

Tests fail on Ubuntu due to missing -lpam #109

Closed mgorny closed 6 years ago

mgorny commented 6 years ago
$ ./tests/pam_google_authenticator_unittest 
Testing base32 encoding
Testing base32 decoding
Testing HMAC_SHA1
Loading PAM module
dlopen(): ./.libs/libpam_google_authenticator_testing.so: undefined symbol: pam_strerror

Apparently the Makefile is missing -lpam for the testing module. To be honest, I have no clue why it works on Gentoo but fails on the Ubuntu setup Semaphore is using:

$ uname -a
Linux semaphore-1807 4.4.0-130-generic #156~14.04.1-Ubuntu SMP Thu Jun 14 13:51:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ThomasHabets commented 6 years ago

Curious.

./tests/pam_google_authenticator_unittest links to -lpam but libpam_google_authenticator_testing.so does not.

I'll add it. Let me know if that fixes it for you. It worked before and after for me. Check the master branch.

ThomasHabets commented 6 years ago

Thanks! This fixed the test on travis-CI for GCC.