emerging x11-misc/alock on a system without pam fails with the following error; auth_pam.c:39:31: error: security/pam_appl.h: No such file or directory auth_pam.c:69: error: 'PAM_SUCCESS' undeclared here (not in a function) auth_pam.c:72: warning: 'struct pam_response' declared inside parameter list auth_pam.c:72: warning: its scope is only this definition or declaration, which is probably not what you want auth_pam.c:72: warning: 'struct pam_message' declared inside parameter list auth_pam.c: In function 'PAM_conv': auth_pam.c:82: error: dereferencing pointer to incomplete type auth_pam.c:83: error: 'PAM_PROMPT_ECHO_ON' undeclared (first use in this function) auth_pam.c:83: error: (Each undeclared identifier is reported only once auth_pam.c:83: error: for each function it appears in.) auth_pam.c:84: error: invalid application of 'sizeof' to incomplete type 'struct pam_response' auth_pam.c:84: error: 'PAM_CONV_ERR' undeclared (first use in this function) auth_pam.c:85: error: invalid use of undefined type 'struct pam_response' auth_pam.c:85: error: dereferencing pointer to incomplete type auth_pam.c:85: error: invalid use of undefined type 'struct pam_response' auth_pam.c:85: error: dereferencing pointer to incomplete type auth_pam.c:86: error: invalid use of undefined type 'struct pam_response' auth_pam.c:86: error: dereferencing pointer to incomplete type auth_pam.c:93: error: invalid use of undefined type 'struct pam_response' auth_pam.c:93: error: dereferencing pointer to incomplete type auth_pam.c:96: error: 'PAM_PROMPT_ECHO_OFF' undeclared (first use in this function) auth_pam.c:97: error: invalid application of 'sizeof' to incomplete type 'struct pam_response' auth_pam.c:98: error: invalid use of undefined type 'struct pam_response' auth_pam.c:98: error: dereferencing pointer to incomplete type auth_pam.c:98: error: invalid use of undefined type 'struct pam_response' auth_pam.c:98: error: dereferencing pointer to incomplete type auth_pam.c:99: error: invalid use of undefined type 'struct pam_response' auth_pam.c:99: error: dereferencing pointer to incomplete type auth_pam.c:106: error: invalid use of undefined type 'struct pam_response' auth_pam.c:106: error: dereferencing pointer to incomplete type auth_pam.c:109: error: 'PAM_TEXT_INFO' undeclared (first use in this function) auth_pam.c:112: error: 'PAM_ERROR_MSG' undeclared (first use in this function) auth_pam.c: At top level: auth_pam.c:124: error: variable 'PAM_conversation' has initializer but incomplete type auth_pam.c:125: warning: excess elements in struct initializer auth_pam.c:125: warning: (near initialization for 'PAM_conversation') auth_pam.c:126: warning: excess elements in struct initializer auth_pam.c:126: warning: (near initialization for 'PAM_conversation') auth_pam.c: In function 'alock_auth_pam_auth': auth_pam.c:159: error: 'pam_handle_t' undeclared (first use in this function) auth_pam.c:159: error: 'pam_handle' undeclared (first use in this function) auth_pam.c:166: warning: implicit declaration of function 'pam_start' auth_pam.c:167: warning: implicit declaration of function 'pam_strerror' auth_pam.c:167: warning: format '%s' expects type 'char *', but argument 3 has type 'int' auth_pam.c:167: warning: implicit declaration of function 'pam_end' auth_pam.c:168: warning: implicit declaration of function 'pam_authenticate' auth_pam.c:169: warning: format '%s' expects type 'char *', but argument 3 has type 'int' auth_pam.c:171: warning: format '%s' expects type 'char *', but argument 3 has type 'int' make[1]: *** [auth_pam.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/portage/tmp/portage/x11-misc/alock-60-r3/work/alock-svn-60/src' make: *** [alock] Error 2 Emerging pam first solves it, so pam should probably be added to DEPEND... Reproducible: Always
Created attachment 151961 [details] alock-60-r3 ebuild with virtual/pam added to DEPEND alock-60-r3 ebuild with virtual/pam added to DEPEND
Created attachment 152567 [details] updated ebuild, controls pam via USE flag I didn't realise that pam usage was actually optional, as it didn't fail configure. This ebuild has pam and imlib2 support controlled via USE flags, and displays an einfo message informing the user that they'll need to make /usr/bin/alock SUID in order to use the system passwords without pam (the message isn't ery well worded, though...). You could make it install suid if pam isn't enabled, or add a suid USE flag, but I think this is simpler and safer. Other things which are enabled but acould be disabled or controlled by use flags are xrender, xcursor, xpm and hash support, and passwd support could be omitted altogether, which may be worthwhile when using pam.
Commited, thank you for testing alock.
Created attachment 153677 [details] fix --with-imlib2 The updated ebuild committed to portage has the imlib2 use flag changed to imlib, which is actually what it should have been, how ever it also changed $(use_with imlib2) to $(use_with imlib), which is ignored as --with-imlib is incorrect. Here's another ebuild with $(use_with imlib imlib2) instead.
Re-opening because of broken USE=imlib, hope that's okay...
err... looks like this is fixed in alock-94 already.