On Tue, Mar 22, 2016 at 01:43:48PM +0100, Thorsten Kukuk wrote:
On Tue, Mar 22, Dmitry V. Levin wrote:
> On Tue, Mar 22, 2016 at 12:51:10PM +0100, Thorsten Kukuk wrote:
> >
> > Hi,
> >
> > I tried to compile Linux-PAM today with "--enable-static-modules".
> > It's a nightmare :(
>
> It used to be compileable right after commit
> 3c69856acf9af74368b789b1ed867b433db0ed02.
That's over 4 years ago ;)
That was the last time we've got a bug report related to
--enable-static-modules.
> > Some problems are easy fixable, but we have a structural
problem:
> > I get a verlong long list of "multiple definition of" errors.
> > Every module compiled static provides the same function names:
> > pam_sm_open_session, pam_sm_close_session, etc.
> > Looks like current toolchain does not like this.
>
> It might be a bug in toolchain.
I don't think so. From what I read until now, it only worked
by pure luck.
The correct fix would be, to declare all pam_sm_* functions
static if we compile PAM static.
Yes, all these functions used to be static in --enable-static-modules mode
by virtue of using PAM_EXTERN keyword.
But I prefer to remove that code.
Me too.
--
ldv