compiling free radius 1.1.7 on NetBSD
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@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
Ray Phillips wrote:
I've attempted to compile free radius 1.1.7 on a machine running NetBSD/amd64 without success...
FreeRADIUS is in pkgsrc. If the version there isn't 1.1.7, the patches will let you build it on NetBSD.
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.
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.
% sh -c './configure CPPFLAGS=-I/usr/include/krb5 > configure.log 2>&1'
Use CFLAGS, not CPPFLAGS.
Could you suggest a solution to this please?
Edit src/modules/rlm_krb5/Makefile by hand. It's tiny. Alan DeKok.
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
Ray Phillips wrote:
Yes, it is there. I suppose I'm obstinate, but I'd like the original sources to be compilable without having to patch them.
I've fixed it in CVS head. For 1.1.8 (if it's released), we'll see.
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.
Ask the pkgsrc package maintainer for patches, OR create them yourself.
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.)
It's where the Kerberos headers live on many other systems. ...
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)
<shrug> I no longer user NetBSD on a daily basis, and I no longer use Kerberos.
Can you see what should be done about this?
Someone using Kerberos on NetBSD should track down the problem and submit a patch. Alan DeKok.
participants (2)
-
Alan DeKok -
Ray Phillips