[2187] in Kerberos-V5-bugs
Compiling krb5 on Redhat Linux
daemon@ATHENA.MIT.EDU (Larry V. Streepy, Jr.)
Tue Aug 27 17:18:56 1996
Date: Tue, 27 Aug 1996 15:17:28 -0600
From: "Larry V. Streepy, Jr." <streepy@healthcare.com>
To: krb5-bugs@MIT.EDU
I have been compiling krb5 for Linux today and for the most part things
went very well. Here are the two gotchas I've run across so far:
1. The auto configure stuff loks for ndbm specifically. On Linux you
have the ndbm.h include file, but not the library. Instead, you get
libgdbm.a which handles both ndbm and old dbm style stuff. After
some trial and error I 'setenv LIBS -lgdbm' and this seems to help.
I think that the autoconf scripts should check for -gdbm. This would
handle Linux automagically.
2. In src/appl/bsd the configure stuff adds -Dsrandom=srand48. Under
Linux, this causes fatal errors when compiling stdlib.h. I think a
more appropriate fix would be to ifdef the code on a symbol defined
by configure, like USE_SRAND48. Here's a diff:
*** krlogind.c.orig Tue Aug 27 15:13:51 1996
--- krlogind.c Tue Aug 27 15:10:04 1996
***************
*** 298,303 ****
--- 298,308 ----
#define VHANG_LAST /* vhangup must occur on close, not open
*/
#endif
+ #ifdef USE_SRAND48
+ #define srandom srand48
+ #define random lrand48
+ #endif
+
void fatal(), fatalperror(), doit(), usage(), do_krb_login();
int princ_maps_to_lname(), default_realm();
*** krlogin.c.orig Tue Aug 27 15:15:03 1996
--- krlogin.c Tue Aug 27 15:09:26 1996
***************
*** 243,248 ****
--- 243,253 ----
#define DEFAULT_COLS 80
#endif
+ #ifdef USE_SRAND48
+ #define srandom srand48
+ #define random lrand48
+ #endif
+
int
get_window_size(fd, wp)
int fd;
*** Makefile.orig Tue Aug 27 15:16:01 1996
--- Makefile Tue Aug 27 15:11:02 1996
***************
*** 6,12 ****
srcdir = ../../../src/appl/bsd
VPATH = ../../../src/appl/bsd
! DEFS = -DRETSIGTYPE=void -DHAS_UTIMES=1 -DHAVE_GETUTENT=1
-DHAVE_SETREUID=1 -DHAVE_KILLPG=1 -DHAVE_GETDTABLESIZE=1
-DHAVE_INITGROUPS=1 -DHAVE_SETPRIORITY=1 -DHAVE_SETREUID=1
-Dsrandom=srand48 -Drandom=lrand48 -DPOSIX_SIGNALS=1 -DHAVE_UNISTD_H=1
-DHAVE_LASTLOG_H=1 -DUSE_DIRENT_H=1 -DPOSIX_TERMIOS=1 -DHAVE_SETOWN=1
-DNO_UT_EXIT=1 -I${SRCTOP}/include -I${BUILDTOP}/include
-DGETGRP_ONEARG=1 -DKERBEROS
CC = gcc
CCOPTS = -DHasNdbmTrue
LIBS = -lgdbm
--- 6,12 ----
srcdir = ../../../src/appl/bsd
VPATH = ../../../src/appl/bsd
! DEFS = -DRETSIGTYPE=void -DHAS_UTIMES=1 -DHAVE_GETUTENT=1
-DHAVE_SETREUID=1 -DHAVE_KILLPG=1 -DHAVE_GETDTABLESIZE=1
-DHAVE_INITGROUPS=1 -DHAVE_SETPRIORITY=1 -DHAVE_SETREUID=1 -DUSE_SRAND48
-DPOSIX_SIGNALS=1 -DHAVE_UNISTD_H=1 -DHAVE_LASTLOG_H=1 -DUSE_DIRENT_H=1
-DPOSIX_TERMIOS=1 -DHAVE_SETOWN=1 -DNO_UT_EXIT=1 -I${SRCTOP}/include
-I${BUILDTOP}/include -DGETGRP_ONEARG=1 -DKERBEROS
CC = gcc
CCOPTS = -DHasNdbmTrue
LIBS = -lgdbm
Thanks for taking the time to look at these suggestions.
--
Larry V. Streepy, Jr.
V.P. of Technology, Healthcare Communications, Inc.
mailto:streepy@healthcare.com
(214) 851-7033 (Dallas Main #)
(970) 626-5028 (My office #)