Subject: Re: kernel compile error in -current
To: None <netbsd-help@netbsd.org>
From: Shigeki Uno <shigeki@mediawars.ne.jp>
List: netbsd-help
Date: 04/18/2001 23:45:39
shigeki@mediawars.ne.jp (Shigeki Uno) writes:

Thanks to Steve Allen, I've succeeded in compiling kernel.
I commented out the entire toupper() routine in machdep.c 
in question.

/usr/src/sys/arch/mac68k/mac68k/machdep.c L1158

/*
static char     toupper __P((char));
 
static char
toupper(c)
        char c;
{
        if (c >= 'a' && c <= 'z') {
                return c - 'a' + 'A';
        } else {
                return c;
        }
}
*/


> I grabbed tarball of sys.tar.gz as of April 15 and compiled it yesterday.
> Almost went well but the following errors have just come up and compiling
> was stopped. (damn it!) 
> 
> <snip>
> cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DM68030 -DLKM -DDIAGNOSTIC -DGRF_COMPAT -DMAXUSERS=16 -D_KERNEL -Dmac68k  -c ../../../../arch/mac68k/mac68k/intr.c
> cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DM68030 -DLKM -DDIAGNOSTIC -DGRF_COMPAT -DMAXUSERS=16 -D_KERNEL -Dmac68k  -c ../../../../arch/mac68k/mac68k/iop.c
> cc  -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DM68030 -DLKM -DDIAGNOSTIC -DGRF_COMPAT -DMAXUSERS=16 -D_KERNEL -Dmac68k  -c ../../../../arch/mac68k/mac68k/machdep.c
> ../../../../arch/mac68k/mac68k/machdep.c:1158: conflicting types for `toupper'
> ../../../../lib/libkern/libkern.h:185: previous declaration of `toupper'
> ../../../../arch/mac68k/mac68k/machdep.c:1162: redefinition of `toupper'
> ../../../../arch/mac68k/mac68k/machdep.c:1158: `toupper' previously defined here
> *** Error code 1
> 
> Stop.
> 
> I've never encountered such errors and also have never failed to compile
> kernel. that's too bad. :( 
> 
> Am i only the one?
> 
> BTW, i'm running mac68k 1.5U both kernel(GENERICSBC) and userland.

- Shigeki Uno
mailto:shigeki@mediawars.ne.jp