NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-powerpc/43028: CTASSERT() failure compiling kern/uipc_mbuf.c for powerpc64 - MSIZE too small

>Number:         43028
>Category:       port-powerpc
>Synopsis:       CTASSERT() failure compiling kern/uipc_mbuf.c for powerpc64 - 
>MSIZE too small
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-powerpc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 21 05:25:00 +0000 2010
>Originator:     Dennis Ferguson
>Release:        very recent 5.99.24
NetBSD 5.99.24 NetBSD 5.99.24 (GENERIC) #0: Sun Mar 
14 17:25:30 HKT 2010
When building for macppc64 the build fails with the following:

#   compile  librumpnet/uipc_mbuf.o
/usr/src/obj/tooldir.NetBSD-5.99.24-amd64/bin/powerpc64--netbsd-gcc -O 
-ffreestanding -fno-strict-aliasing -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional 
-Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual 
-Wwrite-strings -Wextra -Wno-unused-parameter -Wno-format-zero-length 
-Wno-pointer-sign -Werror   -I/usr/src/lib/librumpnet/../../sys/rump/include  
-DDIAGNOSTIC -DCOMPAT_50 -DDEBUGPRINT -I/usr/src/lib/librumpnet -I. 
-I/usr/src/lib/librumpnet/../../sys/rump/librump/rumpkern/opt -nostdinc 
-I/usr/src/lib/librumpnet/../../sys/rump/.. -D__NetBSD__ 
-I/usr/src/lib/librumpnet/../../sys/rump/librump/rumpnet/opt  -c    
 ibrumpnet/../../sys/rump/../kern/uipc_mbuf.c -o uipc_mbuf.o
/usr/src/lib/librumpnet/../../sys/rump/../kern/uipc_mbuf.c: In function 
/usr/src/lib/librumpnet/../../sys/rump/../kern/uipc_mbuf.c:190: error: size of 
array '__ctassert190' is negative
/usr/src/lib/librumpnet/../../sys/rump/../kern/uipc_mbuf.c:191: error: size of 
array '__ctassert191' is negative

*** Failed target:  uipc_mbuf.o

The assert indicates that the size of a struct mbuf is larger
than the size of an mbuf (i.e. MSIZE).
Do a:

    MACHINE=macppc64 ./ distribution
MSIZE needs to get bigger (the machine's page size could get
bigger instead, but that isn't anything worth thinking about
when there isn't even a powerpc64 kernel).

The following patch to arch/powerpc/include/param.h does this.

Index: param.h
RCS file: /cvsroot/src/sys/arch/powerpc/include/param.h,v
retrieving revision 1.21
diff -u -r1.21 param.h
--- param.h     8 Feb 2010 19:02:31 -0000       1.21
+++ param.h     21 Mar 2010 05:08:12 -0000
@@ -91,7 +91,11 @@
  * of the hardware page size.
 #ifndef MSIZE
+#ifdef _LP64
+#define        MSIZE           512             /* size of an mbuf */
+#else  /* _LP64 */
 #define        MSIZE           256             /* size of an mbuf */
+#endif /* _LP64 */
 #ifndef MCLSHIFT
 #define        MCLSHIFT        11              /* convert bytes to m_buf 
clusters */

Home | Main Index | Thread Index | Old Index