|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Can't compile FreeRADIUS with pam moduleHy guys,
I'm using version 2.1.7. And I'm having trouble at building freeradius from de source with pam module (rlm_pam). Here's what I'm doing: # ./configure --with-modules=rlm_pam # make Then I get the following error, during the pam module compilation: rlm_pam.c:123: warning: 'struct pam_response' declared inside parameter list rlm_pam.c:123: warning: its scope is only this definition or declaration, which is probably not what you want rlm_pam.c:123: warning: 'struct pam_message' declared inside parameter list rlm_pam.c: In function 'PAM_conv': rlm_pam.c:131: error: invalid application of 'sizeof' to incomplete type 'struct pam_response' rlm_pam.c:132: error: invalid application of 'sizeof' to incomplete type 'struct pam_response' rlm_pam.c:134: error: dereferencing pointer to incomplete type rlm_pam.c:135: error: 'PAM_PROMPT_ECHO_ON' undeclared (first use in this function) rlm_pam.c:135: error: (Each undeclared identifier is reported only once rlm_pam.c:135: error: for each function it appears in.) rlm_pam.c:136: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:136: error: dereferencing pointer to incomplete type rlm_pam.c:136: error: 'PAM_SUCCESS' undeclared (first use in this function) rlm_pam.c:137: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:137: error: dereferencing pointer to incomplete type rlm_pam.c:139: error: 'PAM_PROMPT_ECHO_OFF' undeclared (first use in this function) rlm_pam.c:140: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:140: error: dereferencing pointer to incomplete type rlm_pam.c:141: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:141: error: dereferencing pointer to incomplete type rlm_pam.c:143: error: 'PAM_TEXT_INFO' undeclared (first use in this function) rlm_pam.c:146: error: 'PAM_ERROR_MSG' undeclared (first use in this function) rlm_pam.c:150: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:150: error: dereferencing pointer to incomplete type rlm_pam.c:152: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:152: error: dereferencing pointer to incomplete type rlm_pam.c:152: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:152: error: dereferencing pointer to incomplete type rlm_pam.c:153: error: invalid use of undefined type 'struct pam_response' rlm_pam.c:153: error: dereferencing pointer to incomplete type rlm_pam.c:158: error: 'PAM_CONV_ERR' undeclared (first use in this function) Any ideas? Am I doing something wrong? Thank you, -- Chico Sokol - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleChico Sokol wrote:
> Hy guys, > I'm using version 2.1.7. And I'm having trouble at building freeradius > from de source with pam module (rlm_pam). Here's what I'm doing: > > # ./configure --with-modules=rlm_pam > # make > > Then I get the following error, during the pam module compilation: > > rlm_pam.c:123: warning: 'struct pam_response' declared inside > parameter list You don't have the PAM development header files installed. You will need to figure out where they are (which package, etc.), and install them. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleHum... I need development header files? I have pam installed, and the
header files does exist at /usr/include/pam: -rw-r--r-- 1 root root 2972 2009-10-29 18:58 _pam_compat.h -rw-r--r-- 1 root root 6101 2009-10-29 18:58 _pam_macros.h -rw-r--r-- 1 root root 12837 2009-10-29 18:58 _pam_types.h -rw-r--r-- 1 root root 3297 2009-11-06 10:15 pam_appl.h -rw-r--r-- 1 root root 7203 2009-10-29 18:58 pam_client.h -rw-r--r-- 1 root root 3251 2009-10-29 18:58 pam_ext.h -rw-r--r-- 1 root root 1140 2009-10-29 18:58 pam_filter.h -rw-r--r-- 1 root root 1577 2009-10-29 18:58 pam_misc.h -rw-r--r-- 1 root root 6432 2009-10-29 18:58 pam_modules.h -rw-r--r-- 1 root root 4076 2009-10-29 18:58 pam_modutil.h Thanks, On Fri, Nov 6, 2009 at 2:18 PM, Alan DeKok <aland@...> wrote: > Chico Sokol wrote: >> Hy guys, >> I'm using version 2.1.7. And I'm having trouble at building freeradius >> from de source with pam module (rlm_pam). Here's what I'm doing: >> >> # ./configure --with-modules=rlm_pam >> # make >> >> Then I get the following error, during the pam module compilation: >> >> rlm_pam.c:123: warning: 'struct pam_response' declared inside >> parameter list > > You don't have the PAM development header files installed. You will > need to figure out where they are (which package, etc.), and install them. > > Alan DeKok. > - > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html > -- Chico Sokol - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleOn 11/06/2009 08:30 AM, Chico Sokol wrote:
> Hum... I need development header files? I have pam installed, and the > header files does exist at /usr/include/pam: Did you install these *after* running configure? If so you'll have to run configure again so it can find them and set the right compiler flags. -- John Dennis <jdennis@...> Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleChico Sokol wrote:
> Hum... I need development header files? I have pam installed, and the > header files does exist at /usr/include/pam: <shrug> Then the PAM module and header files are no longer compatible. I don't use PAM, so I'm not really sure what the underlying issue is. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam module>Did you install these *after* running configure? If so you'll have to run configure again so it can find them >and set the right compiler flags.
No I've ran configure after installing pam package. On Fri, Nov 6, 2009 at 11:47 AM, Alan DeKok <aland@...> wrote: > Chico Sokol wrote: >> Hum... I need development header files? I have pam installed, and the >> header files does exist at /usr/include/pam: > > <shrug> Then the PAM module and header files are no longer > compatible. I don't use PAM, so I'm not really sure what the underlying > issue is. > > Alan DeKok. > - > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html > -- Chico Sokol - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleAny ideas here?
Somebody have ever built FreeRADIUS with pam module? On Fri, Nov 6, 2009 at 5:36 PM, Chico Sokol <chico.sokol@...> wrote: >>Did you install these *after* running configure? If so you'll have to run configure again so it can find them >and set the right compiler flags. > > No I've ran configure after installing pam package. > > > On Fri, Nov 6, 2009 at 11:47 AM, Alan DeKok <aland@...> wrote: >> Chico Sokol wrote: >>> Hum... I need development header files? I have pam installed, and the >>> header files does exist at /usr/include/pam: >> >> <shrug> Then the PAM module and header files are no longer >> compatible. I don't use PAM, so I'm not really sure what the underlying >> issue is. >> >> Alan DeKok. >> - >> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html >> > > > > -- > Chico Sokol > -- Chico Sokol - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleOn 11/09/2009 03:54 PM, Chico Sokol wrote:
> Any ideas here? > > Somebody have ever built FreeRADIUS with pam module? > > On Fri, Nov 6, 2009 at 5:36 PM, Chico Sokol<chico.sokol@...> wrote: >>> Did you install these *after* running configure? If so you'll have to run configure again so it can find them>and set the right compiler flags. >> >> No I've ran configure after installing pam package. >> >> >> On Fri, Nov 6, 2009 at 11:47 AM, Alan DeKok<aland@...> wrote: >>> Chico Sokol wrote: >>>> Hum... I need development header files? I have pam installed, and the >>>> header files does exist at /usr/include/pam: >>> >>> <shrug> Then the PAM module and header files are no longer >>> compatible. I don't use PAM, so I'm not really sure what the underlying >>> issue is. >>> >>> Alan DeKok. Beats me, it works perfectly here for the Red Hat packages. On our systems (e.g. Fedora, RHEL, CentOS) you need to have the pam-devel package installed. In the output of your configure step you should see something like this: === configuring in src/modules/rlm_pam checking for i686-pc-linux-gnu-gcc... no checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for dlopen in -ldl... yes checking for pam_start in -lpam... yes checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking security/pam_appl.h usability... yes checking security/pam_appl.h presence... yes checking for security/pam_appl.h... yes checking pam/pam_appl.h usability... no checking pam/pam_appl.h presence... no checking for pam/pam_appl.h... no configure: creating ./config.status config.status: creating Makefile config.status: creating config.h Notice how the configure script in rlm_pam checks for the header file in both /usr/include/security and /usr/include/pam You said your files were installed in /usr/include/pam if I recall correctly. Is that what your configure output shows? If they are and you're getting type errors from the compiler then you've got bad pam header files. -- John Dennis <jdennis@...> Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleFunny, configure's output seems to be fine:
checking for pam_start in -lpam... yes checking security/pam_appl.h usability... yes checking security/pam_appl.h presence... yes checking for security/pam_appl.h... yes checking pam/pam_appl.h usability... yes checking pam/pam_appl.h presence... yes checking for pam/pam_appl.h... yes Well, I solved by changing the module's code (rlm_pam.c), including always my pam header file (witch is placed at /usr/include/pam), without that configure directive. It's definitely not the best way to fix it, but it works. Thanks, On Mon, Nov 9, 2009 at 10:50 PM, John Dennis <jdennis@...> wrote: > On 11/09/2009 03:54 PM, Chico Sokol wrote: >> >> Any ideas here? >> >> Somebody have ever built FreeRADIUS with pam module? >> >> On Fri, Nov 6, 2009 at 5:36 PM, Chico Sokol<chico.sokol@...> wrote: >>>> >>>> Did you install these *after* running configure? If so you'll have to >>>> run configure again so it can find them>and set the right compiler flags. >>> >>> No I've ran configure after installing pam package. >>> >>> >>> On Fri, Nov 6, 2009 at 11:47 AM, Alan DeKok<aland@...> >>> wrote: >>>> >>>> Chico Sokol wrote: >>>>> >>>>> Hum... I need development header files? I have pam installed, and the >>>>> header files does exist at /usr/include/pam: >>>> >>>> <shrug> Then the PAM module and header files are no longer >>>> compatible. I don't use PAM, so I'm not really sure what the underlying >>>> issue is. >>>> >>>> Alan DeKok. > > Beats me, it works perfectly here for the Red Hat packages. On our systems > (e.g. Fedora, RHEL, CentOS) you need to have the pam-devel package > installed. In the output of your configure step you should see something > like this: > > === configuring in src/modules/rlm_pam > checking for i686-pc-linux-gnu-gcc... no > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking how to run the C preprocessor... gcc -E > checking for dlopen in -ldl... yes > checking for pam_start in -lpam... yes > checking for egrep... grep -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking security/pam_appl.h usability... yes > checking security/pam_appl.h presence... yes > checking for security/pam_appl.h... yes > checking pam/pam_appl.h usability... no > checking pam/pam_appl.h presence... no > checking for pam/pam_appl.h... no > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > > > Notice how the configure script in rlm_pam checks for the header file in > both /usr/include/security and /usr/include/pam > > You said your files were installed in /usr/include/pam if I recall > correctly. Is that what your configure output shows? > > If they are and you're getting type errors from the compiler then you've got > bad pam header files. > > > -- > John Dennis <jdennis@...> > > Looking to carve out IT costs? > www.redhat.com/carveoutcosts/ > - > List info/subscribe/unsubscribe? See > http://www.freeradius.org/list/users.html > -- Chico Sokol - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
|
|
Re: Can't compile FreeRADIUS with pam moduleOn 11/09/2009 05:05 PM, Chico Sokol wrote:
> Funny, configure's output seems to be fine: > > checking for pam_start in -lpam... yes > checking security/pam_appl.h usability... yes > checking security/pam_appl.h presence... yes > checking for security/pam_appl.h... yes > checking pam/pam_appl.h usability... yes > checking pam/pam_appl.h presence... yes > checking for pam/pam_appl.h... yes > > Well, I solved by changing the module's code (rlm_pam.c), including > always my pam header file (witch is placed at /usr/include/pam), > without that configure directive. It's definitely not the best way to > fix it, but it works. Ah ... I think I see the problem. You have *both* sets of pam header files installed on your system, that's weird, how did that happen? Anyway the rlm_pam configure script and code look wrong to me. The header file check in configure.in is coded this way: AC_CHECK_HEADERS( \ security/pam_appl.h \ pam/pam_appl.h \ ) And the C code in rlm_pam.c has this: #ifdef HAVE_SECURITY_PAM_APPL_H #include <security/pam_appl.h> #endif #ifdef HAVE_PAM_PAM_APPL_H #include <pam/pam_appl.h> #endif Hopefully you can see what will happen when you have both sets of header files installed, the compiler will try include them twice and it will succeed because the "guard" at the top of header looks like this: #ifndef _SECURITY_PAM_APPL_H #define _SECURITY_PAM_APPL_H I presume the guard for pam/pam_appl.h looks the same. Thus you'll include the definitions twice which is clearly wrong and will cause compiler errors. So the easy fix is don't install duplicate sets of pam header files. But the more robust fix would be to fix configure.in and the C code include directives so that the action-if-found clause of AC_CHECK_HEADERS added a -I to pam_cflags with the directory the header was found in and then did an explicit "break" The C code should be: #include "pam_appl.h" This way the if more than one set of header files is installed it picks the first one in the list it finds and sets an explicit -I include directive for it. -- John Dennis <jdennis@...> Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html |
| Free embeddable forum powered by Nabble | Forum Help |