[Pkg-shadow-devel] LIBPAM=-lpam on non-PAM systems

Nicolas François nicolas.francois at centraliens.net
Sun May 3 20:46:46 UTC 2009


On Sun, May 03, 2009 at 12:39:22PM -0600, matthew at linuxfromscratch.org wrote:
> 
> I'm trying to compile shadow-4.1.3.1 under a non-PAM environment.
> 
> ./configure --sysconfdir=/etc
> make
> 
> results in:
> 
> libtool: link: gcc -g -O2 -o login login.o login_nopam.o  ../libmisc/libmisc.a .
> ./lib/.libs/libshadow.a -lpam -lcrypt
> /usr/bin/ld: cannot find -lpam
> collect2: ld returned 1 exit status
> make[2]: *** [login] Error 1
> 
> src/Makefile shows login_LDADD references $(LIBPAM) and, sure enough, LIBPAM=-lpam
> in config.log.
> 
> I can workaround this by specifying --without-libpam to ./configure, but I kind of
> hoped that configure should be able to figure out that -lpam doesn't exist
> automatically.

configure should detect if you have PAM installed when you do not specify
--without-libpam.

Can you check if your config.log contains "checking for pam_start in -lpam"
And what is the result afterwards.

Setting LIBPAM is not sufficient, there is also the USE_PAM #define that
should be undef, so it would be much easier to just use --without-libpam.

There seems to be a bug in configure.in anyway since it detected your
system as PAM enabled, but fails to build afterwards.

Could it be that you have a PAM library and headers installed in a non
standard directory?

Best Regards,
-- 
Nekral



More information about the Pkg-shadow-devel mailing list