[1776] in Kerberos-V5-bugs
Problems and solutions compiling under HPUX 9.05
daemon@ATHENA.MIT.EDU (Andrew Berry)
Tue Jan 16 02:21:38 1996
To: krb5-bugs@MIT.EDU
Cc: gaskell@dstc.qut.edu.au
Date: Tue, 16 Jan 96 17:21:12 +1000
From: Andrew Berry <andyb@dstc.cs.uq.edu.au>
I had a few problems compiling the kerberos 5.B.5 sources. The details (and
resolution) are as follows:
-------------------------------------------------------------------------------
Machine: HP 9000/715
OS: HPUX version 9.05
Compiler: Native
Make: Native
Conf command: ./configure --with-ccopts="-Aa -Wl,-a,archive" \
--with-cppopts="-D_POSIX_SOURCE -D_HPUX_SOURCE -Dhpux"
Problem: Prototypes for "getopt" and "rename" are inconsistent with
system includes
Compiler output:
cc: "/usr/include/stdlib.h", line 169: error 1711: Inconsistent parameter list
declaration for "getopt".
cc: "/usr/include/sys/unistd.h", line 226: error 1711: Inconsistent parameter
list declaration for "getopt".
cc: "/usr/include/sys/unistd.h", line 245: error 1711: Inconsistent parameter
list declaration for "rename".
Files affected:
lib/krb5/asn.1/asn1_decode.c
--- fixed by removing -D_HPUX_SOURCE flag on cc command line
lib/krb5/ccache/file/fcc_maybe.c
--- fixed by removing -DHAVE_UNISTD_H=1 flag on cc command line
lib/krb5/krb/chk_trans.c, gc_frm_kdc.c, preauth.c, unparse.c
--- fixed by removing -D_HPUX_SOURCE flag on cc command line
lib/krb5/rcache/rc_io.c
--- fixed by swapping stdio.h and krb5.h includes in source file
lib/krb5/os/timeofday.c
lib/kdb/kdb_dbm.c
--- fixed by removing -DHAVE_UNISTD_H=1 flag on cc command line
lib/des425/key_sched.c, quad_cksum.c, str_to_key.c
--- fixed by removing -D_HPUX_SOURCE flag on cc command line
kadmin/v5server/srv_main.c
--- fixed by removing -D_HPUX_SOURCE flag on cc command line
kadmin.old/client/kadmin_add.c, kadmin_cpw.c
--- fixed by moving k5-int.h include to top of includes
kadmin.old/server/adm_server.c, adm_network.c, adm_process.c, adm_nego.c,
adm_kpasswd.c, adm_check.c
--- fixed by moving k5-int.h include to top of includes
slave/kprop.c, kpropd.c
--- fixed by moving k5-int.h include to top of includes
appl/movemail.c
--- fixed my moving krb5.h include to top of includes
tests/asn.1/krb5_encode_test.c
--- fixed by removing -D_HPUX_SOURCE flag on cc command line
tests/hammer/kdc5_hammer.c
--- fixed by removing -D_HPUX_SOURCE flag on cc command line
-------------------------------------------------------------------------------
I also tried
* commenting out any prototypes for getopt in any krb5 include files
(bsdlib.h, fake-stdlib.h, krb4-proto.h) but this made no difference.
* compiling a "hello world" program that included the system include files:
/usr/include/stdio.h
/usr/include/stdlib.h
/usr/include/sys/unistd.h
since all of these files define a prototype for getopt. I thought there
might be a problem in the system files, but no error occured.
Seems like there's some #defines that are causing problems in the HP-UX
configuration, but I've no real idea where to start looking. Note that the
configuration flags I used came from some notes on:
http://ubvms.cc.buffalo.edu/~tkslen/kerberos.html
from a user with the same OS version as me.
Other problems:
---------------
had to compile tf_util.c with the NEED_UTIMES flag set to resolve symbols in a
later binary (forgot which binary, sorry :-).
appl/bsd/krcp.c requires seteuid but it isn't provided on hp-ux. I just
copied the #define from lib/krb4/kuserok.c into the source file.
appl/bsd/krshd.c was using the wrong number of arguments for setpgrp. I just
removed the -DSETPGRP_TWOARG=1 from the cc command line.
appl/bsd/krlogind.c had the wrong number of arguments for getpgrp. I removed
the -DGETPGRP_ONEARG=1 from the cc command line.
appl/bsd/krlogind.c also needed to include <sys/bsdtty.h> to get TIOCGPGRP
defined.
appl/bsd/login.c wanted TIOCNXCL and TIOCSETD. HP-UX doesn't have them. I
just put #if around these to avoid the problem. Not sure if this is
sufficient. Comments appreciated.
Hope you find this stuff useful.
Ciao,
AndyB (Andrew Berry)
=======================================================================
email: andyb@dstc.edu.au \||/ Department of Computer Science
voice: +61 7 3365 3241 @@ The University of Queensland
fax: +61 7 3365 1999 \/ Australia 4072
======== URL: http://www.dstc.edu.au/AU/staff/andrew-berry.html =======