Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
libpam makefile assumes incorrect path for libdl on Ubuntu Natty #71
Original issue 71 created by mikalstill on 2011-05-12T02:49:06.000Z:
What steps will reproduce the problem?
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Latest mercurial source, on Ubuntu Natty.
Please provide any additional information below.
libdl isn't where the makefile expects it to be. It is instead here:
mikal@molokai:/lib/x86_64-linux-gnu$ ls -l libdl*
Comment #1 originally posted by charles.lacroix on 2011-05-12T15:24:09.000Z:
I had same issue on centos 5.6
i modified the Makefile to point at the libdl in /usr/lib64/libdl.so
google-authenticator: google-authenticator.o base32.o hmac.o sha1.o
demo: demo.o pam_google_authenticator_demo.o base32.o hmac.o sha1.o
-o $@ $+
Comment #6 originally posted by tiran79 on 2011-10-12T00:27:46.000Z:
The bug is related to the new multiarch system introduced by recent Debian and Ubuntu builds. Architecture specific libraries have been moved to /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) or /lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH).
Comment #7 originally posted by jakob.p80 on 2011-11-20T18:03:33.000Z:
For me (on oneiric) linking against libdl (via -ldl) did not work alone - I had to change the ordering of the object files and linker flags. Seems to be due to the --as-needed option passed to ld per default.
Here the statement from http://wiki.debian.org/ToolChain/DSOLinking#Onlylinkwithneededlibraries
Our old approach of trying to test for whether we need to pass the "-ldl" option by searching for "libdl.so" proved unreliable. So, instead, we now actually try passing this option to the compiler and see what happens. Hopefully, that'll be more robust.