[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: PAM builds on Alpha!



The mail crossed on the electronic highway.

If I build the passwd program using the standard rules, the results of   
running the ldd program to see what shared libraries are used by the   
program only shows the libc file.

This is because you have included the libpam.a file. This tells the   
linker to resolve and load the procedures directly from that library and   
bind them into the code as if you wrote a file and compiled it, calling   
it something.o.

The procedure for getting the passwd program to actually use the   
libpam.so file from the /usr/lib directory is to not include libpam.a but   
 -lpam. This tells the linker to resolve the library against the libpam.so   
file and now ldd shows that the passwd program needs "libpam.so.0" as it   
should.

I hope that I have explained it. It is probably better if you try the   
sequence yourself tonight. Try it with the existing code which references   
../../libpam/libpam.a as an argument on the ld program and then try it   
with -lpam. Between the two, run ldd and look at the differences in the   
output.

Now, that is not to say that the passwd program does not use the dynamic   
modules. Both methods will do that. However, to get passwd (and su and   
others) to actually use the dynamic library, libpam.so, you should not   
include the object files, either explicitly by name, or by reference in   
using the .a file, into the link of the program.

 ----------
From:  morgan[SMTP:morgan@physics.ucla.edu]
Sent:  Thursday, May 30, 1996 1:59 PM
To:  pam-list
Subject:  Re: PAM builds on Alpha!

Al Longyear wrote:

> I have been making changes to the build Makefiles for the passwd   
program
> to add the '-lpam' option since the passwd code uses the static version   
    

> of the library (with dynamic references) rather than a true shared   
vesion
> of the library. Perhaps it may be better to simply have a "LIBS" define   
    

> in the makefiles.

I'm not sure what you mean here... On my system, it most certainly
uses dynamic everything... Could you explain a little more?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []