[1502] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Declarations of u_* causing problems

daemon@ATHENA.MIT.EDU (Richard Basch)
Wed Jun 28 11:40:42 1995

Date: Wed, 28 Jun 1995 11:38:07 -0400
To: krb5-bugs@MIT.EDU
From: "Richard Basch" <basch@lehman.com>


Enclosed is the original bug report, but first the post-mortem:

The Makefile generated first refers to the source directory with the -I
commands, rather than the build directory.  The source directory
include/krb5 might have a bogus autoconf.h in it, which would override
the build "configure".  In addition, for some reason, in my tree,
include/krb5/.cvsignore lists autoconf.h.in instead of autoconf.h.

Here is a patch for the -Kpic problem I previously reported...

diff -u -r1.1.1.1 configure.in
--- 1.1.1.1	1995/06/27 20:07:52
+++ configure.in	1995/06/28 14:54:34
@@ -42,7 +42,10 @@
 ;;
 *-*-solaris*)
 	echo "Enabling shared libraries for Solaris...."
-	krb5_cv_shlibs_cflags=-Kpic
+	case "${CC}" in
+	gcc|*/gcc|gcc-*|*/gcc-*)	krb5_cv_shlibs_cflags=-fpic ;;
+	*)	krb5_cv_shlibs_cflags=-Kpic ;;
+	esac
 	krb5_cv_shlibs_ext=so
        krb5_cv_noshlibs_ext=a
 	krb5_cv_shlibs_dir=shared

-Richard

The following excerpt demonstrates a problem that is seen with most
files during my Solaris 2.3 build, and the following configuration parameters:

../mit-krb5/src/configure  --srcdir=../mit-krb5/src
	--with-krb4=/opt/kerberos --enable-shared --with-cc=gcc

(I manually edited config.cache to change -Kpic to -fpic, and re-ran
the configure to make sure the Makefiles were correct.)

gcc  -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_PRAGMA_WEAK=1  -DKRB5_KRB4_COMPAT -I../../../mit-krb5/src/lib/des425/../.././include -I../.././include -I../../../mit-krb5/src/lib/des425/../.././include/krb5 -I../.././include/krb5 -I../../../mit-krb5/src/lib/des425/../crypto/des -I../../../mit-krb5/src/lib/des425/../../include/kerberosIV -c ../../../mit-krb5/src/lib/des425/cksum.c
In file included from ../.././include/krb5.h:73,
                 from ../../../mit-krb5/src/lib/des425/../.././include/k5-int.h:15,
                 from ../../../mit-krb5/src/lib/des425/des.h:34,
                 from ../../../mit-krb5/src/lib/des425/cksum.c:38:
/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.3/2.6.0/include/sys/types.h:235: redefinition of `u_char'
../../../mit-krb5/src/lib/des425/../.././include/krb5/k5-config.h:175: `u_char' previously declared here
/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.3/2.6.0/include/sys/types.h:236: redefinition of `u_short'
../../../mit-krb5/src/lib/des425/../.././include/krb5/k5-config.h:174: `u_short' previously declared here
/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.3/2.6.0/include/sys/types.h:237: redefinition of `u_int'
../../../mit-krb5/src/lib/des425/../.././include/krb5/k5-config.h:173: `u_int' previously declared here
/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.3/2.6.0/include/sys/types.h:238: redefinition of `u_long'
../../../mit-krb5/src/lib/des425/../.././include/krb5/k5-config.h:172: `u_long' previously declared here
In file included from ../../../mit-krb5/src/lib/des425/../.././include/krb5/ext-proto.h:32,
                 from ../../../mit-krb5/src/lib/des425/../.././include/k5-int.h:29,
                 from ../../../mit-krb5/src/lib/des425/des.h:34,
                 from ../../../mit-krb5/src/lib/des425/cksum.c:38:
/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.3/2.6.0/include/stdlib.h:93: warning: conflicting types for built-in function `abs'
make[2]: *** [cksum.o] Error 1

Richard Basch

Lehman Brothers, Inc.           Email: basch@lehman.com
101 Hudson Street 33rd Flr.     Fax:   (201) 524-5828
Jersey City, NJ  07302          Voice: (201) 524-5049


home help back first fref pref prev next nref lref last post