Subject: Re: Failure to compile GENERIC
To: ober <ober@linbsd.org>
From: Arnaud Lacombe <al@sigfpe.info>
List: current-users
Date: 07/25/2006 19:50:52
--cNdxnHkX5QqsyA0e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Jul 25, 2006 at 12:35:45PM -0500, ober wrote:
> I get the following failure on the latest current
> when cross compiling GENERIC
>
> --- mem.o ---
> # compile isac/mem.o
> /stuff/src/tooldir.NetBSD-3.99.17-x86_64/bin/powerpc--netbsd-gcc -mno-strict-align -msoft-float -Wa,-maltivec -ffreestanding -fno-zero-initialized-in-bss -g -O2
> -Wreturn-type -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings
> -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -fno-strict-aliasing -Dmacppc=macppc -I. -I/stuff/src/sys/../common/include -I/stuff/src/sys/arch -I/stuff/src/sys
> -nostdinc -DLKM -DZS_CONSOLE_ABORT -DOFB_ENABLE_CACHE -DVERIFIED_EXEC -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/stuff/src/sys/lib/libkern/../../../common/lib/libc/quad
> -I/stuff/src/sys/lib/libkern/../../../common/lib/libc/string -I/stuff/src/sys/lib/libkern/../../../common/lib/libc/arch/powerpc/string -I/stuff/src/sys/dist/pf
> -I/stuff/src/sys/dist/ipf -c /stuff/src/sys/arch/powerpc/powerpc/mem.c
> /stuff/src/sys/arch/powerpc/powerpc/mem.c: In function 'mmmmap':
> /stuff/src/sys/arch/powerpc/powerpc/mem.c:170: error: 'l_cred' undeclared (first use in this function)
> /stuff/src/sys/arch/powerpc/powerpc/mem.c:170: error: (Each undeclared identifier is reported only once
> /stuff/src/sys/arch/powerpc/powerpc/mem.c:170: error: for each function it appears in.)
> *** [mem.o] Error code 1
> 1 error
>
> nbmake: stopped in /stuff/src/sys/arch/macppc/compile/obj/isac
>
> ERROR: Failed to make all in /stuff/src/sys/arch/macppc/compile/obj/isac
> *** BUILD ABORTED ***
>
> Build machine is amd64, and I was able to build .22 fine.
>
> -Ober
could you try the following patch, it should work better after
regards,
Arnaud
--cNdxnHkX5QqsyA0e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="powerpc_mem.c.diff"
Index: sys/arch/powerpc/powerpc/mem.c
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/powerpc/mem.c,v
retrieving revision 1.23
diff -u -r1.23 mem.c
--- sys/arch/powerpc/powerpc/mem.c 23 Jul 2006 22:06:06 -0000 1.23
+++ sys/arch/powerpc/powerpc/mem.c 25 Jul 2006 17:48:40 -0000
@@ -167,7 +167,7 @@
if (minor(dev) != DEV_MEM)
return (-1);
- if (atop(off) >= physmem && kauth_authorize_generic(l-l_cred,
+ if (atop(off) >= physmem && kauth_authorize_generic(l->l_cred,
KAUTH_GENERIC_ISSUSER, &l->l_acflag) != 0)
return (-1);
return (trunc_page((paddr_t)off));
--cNdxnHkX5QqsyA0e--