compiling free radius 1.1.7 on NetBSD

Ray Phillips r.phillips at uq.edu.au
Tue Aug 28 11:23:05 CEST 2007


Thanks for your reply Alan.

>  > I've attempted to compile free radius 1.1.7 on a machine running
>>  NetBSD/amd64  without success...
>
>   FreeRADIUS is in pkgsrc.

Yes, it is there.  I suppose I'm obstinate, but I'd like the original 
sources to be compilable without having to patch them.

>If the version there isn't 1.1.7,

The 2007Q2 pkgsrc, which I think is the most recent, contains FreeRADIUS 1.1.6.

>the patches will let you build it on NetBSD.

If you understand them.  :)  It looks to me as though none of the 
patches in /usr/pkgsrc/net/freeradius/patches apply to files in 
./src/modules/rlm_krb5.

>  > At first configure couldn't find krb5.h and make failed:
>
>   I've fixed that in CVS head.  If it can't find krb5.h, it doesn't
>build the module.

Thanks.

>  > so I ran configure again, explicitly telling it the path to krb5.h (with
>>  a freshly untar'ed source tree):
>
>   All that does is refresh the source.  It does NOT delete any files
>left over from a previous configure run.

Sorry, I meant I deleted the directory where I'd just run 
./configure, executed 'tar jxf freeradius-1.1.7.tar.bz2' and started 
again in the new freeradius-1.1.7 directory.

>  > % sh -c './configure CPPFLAGS=-I/usr/include/krb5 > configure.log 2>&1'
>
>   Use CFLAGS, not CPPFLAGS.

OK.

>  > Could you suggest a solution to this please?
>
>   Edit src/modules/rlm_krb5/Makefile by hand.  It's tiny.

I did actually try that but didn't mention it because I thought it 
might have been a silly approach...  I noticed 
./src/modules/rlm_krb5/Makefile contains the line

include ../rules.mak

and ./src/modules/rules.mak contains ' contains the line

$(RLM_DIR)../../../Make.inc

and ./Make.inc contains the line:

CFLAGS          = $(INCLUDE) -I/usr/include/krb5 -D_REENTRANT 
-D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG

(I don't know which directory RLM_DIR is but guess that path points 
to freeradius-1.1.7/Makefile.inc ?) so I thought 
./src/modules/rlm_krb/Makefile would implicitly know to use 
-I/usr/include/krb5.  Anyway, I'll try again now...

% ls
freeradius-1.1.7.tar.bz2
% tar jxf *
% cd freeradius-1.1.7
% /usr/bin/time sh -c './configure CFLAGS=-I/usr/include/krb5 > 
configure.log 2>&1'
        33.24 real        15.51 user        16.47 sys
% vi src/modules/rlm_krb5/Makefile

change the RLM_FLAGS line to

RLM_CFLAGS =     -I/usr/include/et -I/usr/include/krb5

(what's normally in /usr/include/et by the way?  I've not heard of 
that directory.)

% /usr/bin/time sh -c 'gmake > gmake.log 2>&1'
        23.74 real        14.38 user        11.71 sys
% sed -n '920,$p' gmake.log
Making all in rlm_krb5...
gmake[6]: Entering directory 
`/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules/rlm_krb5'
/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/libtool 
--mode=compile gcc  -I/usr/include/krb5 -D_REENTRANT 
-D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG 
-I/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/include 
-I/usr/include/et -I/usr/include/krb5 -c rlm_krb5.c
mkdir .libs
  gcc -I/usr/include/krb5 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS 
-Wall -D_GNU_SOURCE -DNDEBUG 
-I/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/include 
-I/usr/include/et -I/usr/include/krb5 -c rlm_krb5.c  -fPIC -DPIC -o 
.libs/rlm_krb5.o
rlm_krb5.c: In function 'verify_krb5_tgt':
rlm_krb5.c:96: warning: implicit declaration of function 'krb5_princ_component'
rlm_krb5.c:96: error: 'c' undeclared (first use in this function)
rlm_krb5.c:96: error: (Each undeclared identifier is reported only once
rlm_krb5.c:96: error: for each function it appears in.)
rlm_krb5.c:96: error: invalid type argument of '->'
rlm_krb5.c:105: warning: passing argument 2 of 
'krb5_kt_read_service_key' discards qualifiers from pointer target 
type
rlm_krb5.c: In function 'krb5_auth':
rlm_krb5.c:217: warning: initialization makes pointer from integer 
without a cast
rlm_krb5.c:219: warning: excess elements in struct initializer
rlm_krb5.c:219: warning: (near initialization for 'tgtname')
rlm_krb5.c:257: warning: pointer targets in assignment differ in signedness
rlm_krb5.c:258: warning: pointer targets in assignment differ in signedness
rlm_krb5.c:292: error: request for member 'length' in something not a 
structure or union
rlm_krb5.c:293: error: request for member 'data' in something not a 
structure or union
rlm_krb5.c:296: error: request for member 'length' in something not a 
structure or union
rlm_krb5.c:297: error: request for member 'data' in something not a 
structure or union
gmake[6]: *** [rlm_krb5.lo] Error 1
gmake[6]: Leaving directory 
`/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules/rlm_krb5'
gmake[5]: *** [common] Error 2
gmake[5]: Leaving directory 
`/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules'
gmake[4]: *** [all] Error 2
gmake[4]: Leaving directory 
`/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules'
gmake[3]: *** [common] Error 2
gmake[3]: Leaving directory 
`/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory 
`/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src'
gmake[1]: *** [common] Error 2
gmake[1]: Leaving directory 
`/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7'
gmake: *** [all] Error 2
%

Can you see what should be done about this?


Ray



More information about the Freeradius-Users mailing list