Subject: Alpha 'make build' failure
To: None <current-users@NetBSD.ORG>
From: Chad Mynhier <>
List: current-users
Date: 03/13/1998 12:04:19
Let me preface this by saying that my Alpha wasn't picking up current
from February 18 until just yesterday.  If I'm not mistaken, the UVM
stuff was added to the Alpha port during this time.

I'm getting the following error:

morpheus# pwd
morpheus# make
cc -O  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith  -DLIBC_SCCS -c kvm_alpha.c
kvm_alpha.c: In function `_kvm_kvatop':
kvm_alpha.c:100: `page_shift' undeclared (first use this function)
kvm_alpha.c:100: (Each undeclared identifier is reported only once
kvm_alpha.c:100: for each function it appears in.)
cc1: warnings being treated as errors
kvm_alpha.c:76: warning: `pteoff' might be used uninitialized in this function
*** Error code 1


(The above make was done after the 'make build' failed.)

The line in question is:

99              pteoff = cpu_kh->lev1map_pa +
100                 l1pte_index(va) * sizeof(alpha_pt_entry_t);

where l1pte_index() is a macro referencing PAGE_SHIFT.  From 

#if defined(UVM)
#define PAGE_SIZE       uvmexp.pagesize         /* size of page */
#define PAGE_MASK       uvmexp.pagemask         /* size of page - 1 */
#define PAGE_SHIFT      uvmexp.pageshift        /* bits to shift for pages */
#define PAGE_SIZE       cnt.v_page_size         /* size of page */
#define PAGE_MASK       page_mask               /* size of page - 1 */
#define PAGE_SHIFT      page_shift              /* bits to shift for pages */
#if defined(_KERNEL) && !defined(UVM)
extern vm_size_t        page_mask;
extern int              page_shift;

UVM isn't defined, so I'd have to guess that _KERNEL needs to be defined
to pick up the 'extern int page_shift', but I'd also guess that it shouldn't
be defined because I'm building libkvm, not a kernel.

Could someone verify what I'm thinking here and/or point out what the problem
might be?

Chad Mynhier