compiling free radius 1.1.7 on NetBSD

Ray Phillips r.phillips at uq.edu.au
Tue Aug 28 02:12:18 CEST 2007


I've attempted to compile free radius 1.1.7 on a machine running 
NetBSD/amd64  without success...

% uname -v
NetBSD 4.99.20 (GENERIC.MP) #0: Thu Jul  5 13:21:09 EST 2007 
ray at jb.jkmrc.uq.edu.au:/usr/obj/sys/arch/amd64/compile/GENERIC.MP
%

At first configure couldn't find krb5.h and make failed:

% ls -l
total 4064
-rw-------  1 ray  wheel  2063278 Aug 26 01:39 freeradius-1.1.7.tar.bz2
% tar jxf *
% cd *7
% sh -c './configure > configure.log 2>&1'
% sh -c 'gmake > gmake.log 2>&1'
% sed -n '651,670p' configure.log
=== configuring in src/modules/rlm_krb5 
(/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules/rlm_krb5)
configure: running /bin/ksh ./configure '--prefix=/usr/local' 
'--enable-ltdl-install' --cache-file=/dev/null --srcdir=.
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 ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for krb5.h... no
checking for krb5_encrypt_data in -lk5crypto... no
checking for DH_new in -lcrypto... yes
checking for set_com_err_hook in -lcom_err... yes
checking for krb5_init_context in -lkrb5... yes
configure: creating ./config.status
config.status: creating Makefile
=== configuring in src/modules/rlm_ldap 
(/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules/rlm_ldap)
% wc -l gmake.log
      985 gmake.log
% sed -n '920,931p' 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  -g -O2 -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 -c rlm_krb5.c
mkdir .libs
  gcc -g -O2 -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 -c rlm_krb5.c  -fPIC -DPIC -o .libs/rlm_krb5.o
rlm_krb5.c:39:18: error: krb5.h: No such file or directory
rlm_krb5.c:40:21: error: com_err.h: No such file or directory
rlm_krb5.c:45: error: expected specifier-qualifier-list before 'krb5_context'
rlm_krb5.c:57: error: expected ')' before 'context'
rlm_krb5.c: In function 'krb5_instantiate':
rlm_krb5.c:174: error: 'krb5_context' undeclared (first use in this function)
rlm_krb5.c:174: error: (Each undeclared identifier is reported only once
%

krb5.h was present though:

% ls -l /usr/include/krb5
total 436
-r--r--r--  1 root  wheel    792 Jul  5 10:39 asn1_err.h
-r--r--r--  1 root  wheel   1934 Jul  5 10:39 base64.h
-r--r--r--  1 root  wheel   2571 Jul  5 10:39 com_err.h
-r--r--r--  1 root  wheel   2397 Jul  5 10:39 com_right.h
-r--r--r--  1 root  wheel   2875 Jul  5 10:39 getarg.h
-r--r--r--  1 root  wheel    464 Jul  5 10:39 hdb-private.h
-r--r--r--  1 root  wheel   3236 Jul  5 10:39 hdb-protos.h
-r--r--r--  1 root  wheel   3634 Jul  5 10:39 hdb.h
-r--r--r--  1 root  wheel   5593 Jul  5 10:39 hdb_asn1.h
-r--r--r--  1 root  wheel    835 Jul  5 10:39 hdb_err.h
-r--r--r--  1 root  wheel   1156 Jul  5 10:39 heim_err.h
-r--r--r--  1 root  wheel    724 Jul  5 10:39 k524_err.h
-r--r--r--  1 root  wheel   6819 Jul  5 10:39 kafs.h
-r--r--r--  1 root  wheel   1830 Jul  5 10:39 krb5-private.h
-r--r--r--  1 root  wheel  61078 Jul  5 10:39 krb5-protos.h
-r--r--r--  1 root  wheel  21060 Jul  5 10:39 krb5.h
-r--r--r--  1 root  wheel  35798 Jul  5 10:39 krb5_asn1.h
-r--r--r--  1 root  wheel   6644 Jul  5 10:39 krb5_err.h
-r--r--r--  1 root  wheel   2049 Jul  5 10:39 parse_bytes.h
-r--r--r--  1 root  wheel   2074 Jul  5 10:39 parse_time.h
-r--r--r--  1 root  wheel   2525 Jul  5 10:39 parse_units.h
-r--r--r--  1 root  wheel   4388 Jul  5 10:39 resolve.h
-r--r--r--  1 root  wheel   7457 Jul  5 10:39 roken-common.h
-r--r--r--  1 root  wheel   5050 Jul  5 10:39 roken.h
-r--r--r--  1 root  wheel   2134 Jul  5 10:39 rtbl.h
-r--r--r--  1 root  wheel   2302 Jul  5 10:39 sl.h
-r--r--r--  1 root  wheel   2324 Jul  5 10:39 ss.h
%

so I ran configure again, explicitly telling it the path to krb5.h 
(with a freshly untar'ed source tree):

% sh -c './configure CPPFLAGS=-I/usr/include/krb5 > configure.log 2>&1'
% sed -n '649,668p' configure.log
=== configuring in src/modules/rlm_krb5 
(/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules/rlm_krb5)
configure: running /bin/ksh ./configure '--prefix=/usr/local' 
'CPPFLAGS=-I/usr/include/krb5' '--enable-ltdl-install' 
--cache-file=/dev/null --srcdir=.
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 ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for krb5.h... yes
checking for krb5_encrypt_data in -lk5crypto... no
checking for DH_new in -lcrypto... yes
checking for set_com_err_hook in -lcom_err... yes
checking for krb5_init_context in -lkrb5... yes
configure: creating ./config.status
config.status: creating Makefile
=== configuring in src/modules/rlm_ldap 
(/usr/home/ray/installers/freeradius/1.1.7/freeradius-1.1.7/src/modules/rlm_ldap)
% sh -c 'gmake > gmake.log 2>&1'
%

Even though configure found krb5.h, make gave the same error as before:

% wc -l gmake.log
      985 gmake.log
% sed -n '920,931p' 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  -g -O2 -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 -c rlm_krb5.c
mkdir .libs
  gcc -g -O2 -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 -c rlm_krb5.c  -fPIC -DPIC -o .libs/rlm_krb5.o
rlm_krb5.c:39:18: error: krb5.h: No such file or directory
rlm_krb5.c:40:21: error: com_err.h: No such file or directory
rlm_krb5.c:45: error: expected specifier-qualifier-list before 'krb5_context'
rlm_krb5.c:57: error: expected ')' before 'context'
rlm_krb5.c: In function 'krb5_instantiate':
rlm_krb5.c:174: error: 'krb5_context' undeclared (first use in this function)
rlm_krb5.c:174: error: (Each undeclared identifier is reported only once
%

Could you suggest a solution to this please?


Ray



More information about the Freeradius-Users mailing list