[OpenAFS-devel] 1.5.25 and struct rpcStats

Arno Schuring aelschuring@hotmail.com
Fri, 19 Oct 2007 23:55:56 +0200


This is a multi-part message in MIME format.
--------------050202070401060107010704
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit


Hello list,

trying to compile 1.5.25 on my linux box (P4, 2.6.21, gcc-4.2.1), I hit
the following error (I configured with ./configure
--with-afs-sysname=i386_linux26):

gcc -pipe  -O2 -I/home/golem/buildfs/openafs-1.5.25/src/config -I. -I.
-I/home/golem/buildfs/openafs-1.5.25/include
-I/home/golem/buildfs/openafs-1.5.25/include/afs
-I/home/golem/buildfs/openafs-1.5.25/include/rx
-I/home/golem/buildfs/openafs-1.5.25
-I/home/golem/buildfs/openafs-1.5.25/src
-I/home/golem/buildfs/openafs-1.5.25/src -D_LARGEFILE64_SOURCE  -c rxstat.c
rxstat.c:47: error: expected declaration specifiers or '...' before
'rpcStats'
rxstat.c: In function 'MRXSTATS_RetrieveProcessRPCStats':
rxstat.c:54: error: 'stats' undeclared (first use in this function)
rxstat.c:54: error: (Each undeclared identifier is reported only once
rxstat.c:54: error: for each function it appears in.)
rxstat.c: At top level:
rxstat.c:67: error: expected declaration specifiers or '...' before
'rpcStats'
rxstat.c: In function 'MRXSTATS_RetrievePeerRPCStats':
rxstat.c:74: error: 'stats' undeclared (first use in this function)


grepping the source, I cannot find any declaration of rpcStats (save for
a typedef afs_uint32 in rxstat.xg). Is this supposed to be generated
from somewhere, or am I missing a package that provides this?

Included is a patch I used to remove the hardcoded paths to /lib/cpp. It
can be autodetected from autoconf, so there is no need to hardcode these
paths. (it is probably not necessary to include AC_PROG_CPP in
configure.in, I think).

I'm currently working on a patch to move the /vicep* partitions to the
more FHS-friendly /srv/vice. Does a change like this have any change of
being merged upstream or should I keep it to myself?


Regards,
Arno Schuring


--------------050202070401060107010704
Content-Type: text/x-patch;
 name="openafs-1.5.25-use-AC_PROG_CPP.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="openafs-1.5.25-use-AC_PROG_CPP.patch"

diff -aur openafs-1.5.25~/configure.in openafs-1.5.25/configure.in
--- openafs-1.5.25~/configure.in	2007-09-20 06:14:04.000000000 +0200
+++ openafs-1.5.25/configure.in	2007-10-19 20:15:04.306372442 +0200
@@ -3,6 +3,7 @@
 AC_CONFIG_HEADER(src/config/afsconfig.h)
 
 AC_PROG_CC
+AC_PROG_CPP
 OPENAFS_CONFIGURE_COMMON
 
 if test -d 'doc/man-pages' ; then
diff -aur openafs-1.5.25~/src/config/Makefile.config.in openafs-1.5.25/src/config/Makefile.config.in
--- openafs-1.5.25~/src/config/Makefile.config.in	2006-04-26 17:36:21.000000000 +0200
+++ openafs-1.5.25/src/config/Makefile.config.in	2007-10-19 21:04:36.598160160 +0200
@@ -32,6 +32,7 @@
 AFSD_LIBS = @AFSD_LIBS@
 AFSD_LDFLAGS = @AFSD_LDFLAGS@
 CC = @CC@
+CPP = @CPP@
 CCOBJ = @CCOBJ@
 CCXPG2 = @CCXPG2@
 CFLAGS = @CFLAGS@
diff -aur openafs-1.5.25~/src/libafsrpc/Makefile.in openafs-1.5.25/src/libafsrpc/Makefile.in
--- openafs-1.5.25~/src/libafsrpc/Makefile.in	2005-08-16 00:30:47.000000000 +0200
+++ openafs-1.5.25/src/libafsrpc/Makefile.in	2007-10-19 20:55:03.541903722 +0200
@@ -354,7 +354,7 @@
 syscall.o: ${SYS}/syscall.s
 	case "$(SYS_NAME)" in \
 	     sun4x_5* | sunx86_5*) \
-		/usr/ccs/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
+		$(CPP)  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
 		as -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	 sgi_* | *_darwin_* ) \
@@ -366,7 +366,7 @@
 	 *bsd* ) \
 		touch syscall.o ;; \
 	 *) \
-		/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
+		$(CPP)  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
 		as -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	esac
diff -aur openafs-1.5.25~/src/lwp/Makefile.in openafs-1.5.25/src/lwp/Makefile.in
--- openafs-1.5.25~/src/lwp/Makefile.in	2006-03-09 07:34:43.000000000 +0100
+++ openafs-1.5.25/src/lwp/Makefile.in	2007-10-19 20:55:29.044407146 +0200
@@ -37,7 +37,7 @@
 	pmax_he1) \
 		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} process.s;; \
 	sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* ) \
-		/usr/ccs/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
+		$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
 		${AS} process.ss -o process.o; \
 			$(RM) process.ss ;; \
 	sgi_5* ) \
@@ -45,11 +45,11 @@
 	sgi_61 | sgi_62 | sgi_63 ) \
 		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} ${ARCHFLAGS} -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
 	s390_*) \
-		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
+		$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
 		${AS} -ahlns process.ss -o process.o >process.lst; \
 		$(RM) process.ss ;; \
 	s390x_*) \
-		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390x.s >process.ss; \
+		$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s390x.s >process.ss; \
 		${AS} -ahlns process.ss -o process.o >process.lst; \
 		$(RM) process.ss ;; \
 	*_darwin* ) \
@@ -88,11 +88,11 @@
 		${AS} process.ss -o process.o ;  \
 		$(RM) -f process.S ;;\
 	ncrx86_* | sunx86_*) \
-		/usr/ccs/lib/cpp -P -D__sun -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
+		$(CPP) -P -D__sun -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
 		${AS} -o process.o process.ss; \
 		$(RM) process.ss ;; \
 	alpha_nbsd* ) \
-		/usr/bin/cpp -DASSEMBLER -P -I${TOP_INCDIR} ${srcdir}/process.s > process.ss; \
+		$(CPP) -DASSEMBLER -P -I${TOP_INCDIR} ${srcdir}/process.s > process.ss; \
 		${AS} -o process.o process.ss; \
 		$(RM) process.ss ;; \
 	hp* | *_linux* | *_umlinux* | sgi_64 | sgi_65 ) \
@@ -103,11 +103,11 @@
 	ia64_hpux11* | hp_ux11* ) \
 		${CC} ${CFLAGS} -c ${srcdir}/process.c;; \
 	i386_*) \
-		/lib/cpp -P -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
+		$(CPP) -P -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
 		${AS} process.ss -o process.o; \
 		$(RM) process.ss ;; \
 	*) \
-		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
+		$(CPP) -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \
 		${AS} process.ss -o process.o; \
 		$(RM) process.ss ;; \
 	esac
diff -aur openafs-1.5.25~/src/rxgen/Makefile.in openafs-1.5.25/src/rxgen/Makefile.in
--- openafs-1.5.25~/src/rxgen/Makefile.in	2003-01-11 08:34:52.000000000 +0100
+++ openafs-1.5.25/src/rxgen/Makefile.in	2007-10-19 21:07:31.115292684 +0200
@@ -18,6 +18,9 @@
 rxgen: $(OBJS) AFS_component_version_number.c $(HDRS)
 	$(CC) $(CFLAGS) $(OBJS) $(XLIBS) -o $@
 
+rpc_main.o: rpc_main.c
+	$(CCOBJ) $(CFLAGS) -c $< -D__PROG_CPP__="\"$(CPP)\""
+
 #
 # Install targets
 #
diff -aur openafs-1.5.25~/src/rxgen/rpc_main.c openafs-1.5.25/src/rxgen/rpc_main.c
--- openafs-1.5.25~/src/rxgen/rpc_main.c	2006-08-24 17:55:20.000000000 +0200
+++ openafs-1.5.25/src/rxgen/rpc_main.c	2007-10-19 20:59:30.568117384 +0200
@@ -98,14 +98,8 @@
 char yflag = 0;			/* if set, only emit function name arrays to xdr file */
 int debug = 0;
 static char *cmdname;
-#ifdef	AFS_SUN5_ENV
-static char CPP[] = "/usr/ccs/lib/cpp";
-#elif defined(AFS_XBSD_ENV) || defined(AFS_DARWIN60_ENV)
-static char CPP[] = "/usr/bin/cpp";
-#elif defined(AFS_NT40_ENV)
-static char CPP[MAXCMDLINE];
-#elif defined(AFS_DARWIN_ENV)
-static char CPP[] = "cc -E";
+#ifdef	__PROG_CPP__
+static char CPP[] = __PROG_CPP__;
 #else
 static char CPP[] = "/lib/cpp";
 #endif
diff -aur openafs-1.5.25~/src/shlibafsrpc/Makefile.in openafs-1.5.25/src/shlibafsrpc/Makefile.in
--- openafs-1.5.25~/src/shlibafsrpc/Makefile.in	2006-08-21 00:23:06.000000000 +0200
+++ openafs-1.5.25/src/shlibafsrpc/Makefile.in	2007-10-19 20:55:35.545045532 +0200
@@ -366,7 +366,7 @@
 syscall.o: ${SYS}/syscall.s
 	case "$(SYS_NAME)" in \
 	     sun4x_5* | sunx86_5*) \
-		/usr/ccs/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
+		$(CPP)  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
 		as -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	 sgi_* | *_darwin_* ) \
@@ -378,7 +378,7 @@
 	 *fbsd* ) \
 		touch syscall.o ;; \
 	 *) \
-		/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
+		$(CPP)  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
 		as -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	esac
diff -aur openafs-1.5.25~/src/sys/Makefile.in openafs-1.5.25/src/sys/Makefile.in
--- openafs-1.5.25~/src/sys/Makefile.in	2006-07-31 23:27:41.000000000 +0200
+++ openafs-1.5.25/src/sys/Makefile.in	2007-10-19 20:55:45.546027342 +0200
@@ -80,7 +80,7 @@
 syscall.o: syscall.s
 	@set -x; case "$(SYS_NAME)" in \
 	 sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \
-		/usr/ccs/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
+		$(CPP) -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
 		as -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	 sgi_* |*_darwin* ) \
@@ -96,7 +96,7 @@
 		${AS} syscall.S -o syscall.o ;  \
 		$(RM) -f syscall.S ;;\
 	 *) \
-		/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
+		$(CPP) -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
 		as -o syscall.o syscall.ss;		\
 		$(RM) syscall.ss;;				\
 	esac

--------------050202070401060107010704--