Subject: -current kernel compile error and fix
To: Port-Mac68K Mailing List <port-mac68k@NetBSD.ORG>
From: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
List: port-mac68k
Date: 01/22/1998 00:16:53
Hi, all.

I tried to compile a kernel today, and I had some problems. I'm using sources
supped this morning, FWIW.

Following is the error report I got. Following *that* is the config file
I'm using.

I'm not sure why the compiler is complaining about 'gp' being used without
being uninitialized... It appears to be used on the left side of an assign-
ment pretty consistently as its first use.

In a frenzy of cargo-cult thinking, I deleted ioconf.o and ran make
again. This didn't solve anything. So, I actually stopped being *totally*
lazy and dug into the code a bit.

The following change to /usr/src/sys/arch/mac68k/dev/grf.c seems to make
things work:

79a80
> #include "ioconf.h"

I'm assuming this is the correct fix. Of course, I'm still compiling, so
there's always the possibility that there are other problems. I'm going to
fire this off now, though. If anything else goes wrong, I'll report it
tomorrow. (Unless, of course, the compile finishes fairly soon, or gets
another error pretty soon, in which case I'll write more tonight.)

Here are the error messages:

../../../../arch/mac68k/dev/grf.c: In function `grfopen':
../../../../arch/mac68k/dev/grf.c:157: `grf_cd' undeclared (first use this function)
../../../../arch/mac68k/dev/grf.c:157: (Each undeclared identifier is reported only once
../../../../arch/mac68k/dev/grf.c:157: for each function it appears in.)
../../../../arch/mac68k/dev/grf.c: In function `grfclose':
../../../../arch/mac68k/dev/grf.c:187: `grf_cd' undeclared (first use this function)
cc1: warnings being treated as errors
../../../../arch/mac68k/dev/grf.c:185: warning: `gp' might be used uninitialized in this function
../../../../arch/mac68k/dev/grf.c: In function `grfioctl':
../../../../arch/mac68k/dev/grf.c:209: `grf_cd' undeclared (first use this function)
../../../../arch/mac68k/dev/grf.c:204: warning: `gp' might be used uninitialized in this function
../../../../arch/mac68k/dev/grf.c: In function `grfmmap':
../../../../arch/mac68k/dev/grf.c:280: `grf_cd' undeclared (first use this function)
../../../../arch/mac68k/dev/grf.c: In function `grfon':
../../../../arch/mac68k/dev/grf.c:308: `grf_cd' undeclared (first use this function)
../../../../arch/mac68k/dev/grf.c:306: warning: `gp' might be used uninitialized in this function
../../../../arch/mac68k/dev/grf.c: In function `grfoff':
../../../../arch/mac68k/dev/grf.c:328: `grf_cd' undeclared (first use this function)
../../../../arch/mac68k/dev/grf.c:325: warning: `gp' might be used uninitialized in this function
../../../../arch/mac68k/dev/grf.c: In function `grfmap':
../../../../arch/mac68k/dev/grf.c:353: `grf_cd' undeclared (first use this function)
../../../../arch/mac68k/dev/grf.c:346: warning: `gp' might be used uninitialized in this function
../../../../arch/mac68k/dev/grf.c: In function `grfunmap':
../../../../arch/mac68k/dev/grf.c:394: `grf_cd' undeclared (first use this function)
../../../../arch/mac68k/dev/grf.c:390: warning: `gp' might be used uninitialized in this function
*** Error code 1

Stop.

begin 600 MLB.gz
M'XL("#.#QC0"`TU,0@"-6-MRHSH6?39?H4D>)NF)8SM)I](SU=7E"TE3,89C
M<)_T>7')(#N4N1T$N<S7S]H";'#2/7FQ$=I[:]^TM,0Q,Z<CMA59+$)-"V(O
M+'S1.>*9]]B+N'=]L^UY2;SNR=P_+\='FA;QET**3'8&UYW.,1,R#R*>"Y_%
M1;02&4O63,UKVC$S7YG,B_7Z7$O2/$ABV>DX4]-=?!U\[O>A[$P-FV%,LF-[
MP621IDF6GS,VS%DHN,Q9$@L62#;7_U@8<WURKAU7IEC'O+[I7_6UUOBR?R!P
MT2<O9TDN_LU85,#B(W\2[/KFYO.`V:99K]W-1*C"J+2;"]W:CMT:+I:ZN9@.
M79V4G9S'/L]\)E]E+J+:@+9W;#&V9HXUU>&(2@WS>$Q/S#6L,<VQDW62L1<D
M6R:A.&VL9<P<?;R8DZH?2+X*154O)H579$'^BCP]B9#2O5.:N^.E=7OKZ.Y7
MRO(CG'OFF6!>F'A;RF;^B)^(QZ\L"A`J>Q:4Z36[,]V&F9EKJ]RY-DL?N12]
M=2;^+D3L84T80J[")$D;<=Z[\^%8)YTJ%1X/0Y9GW`OB#7L*.-O20)P,3AM:
MSD_GA^G<D9I3JOWHAL%6L$A(R3>"8<U"R+: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sy dark cave of the mind dreams build their nest with fragments
 dropped from day's caravan."--Rabindranath Tagore...awake ? sleep : dream;