Subject: libkern Makefile.inc
To: None <port-pmax@NetBSD.ORG>
From: James MacKinnon <jmack@Phys.UAlberta.Ca>
List: port-pmax
Date: 04/05/1995 09:45:06
Does anyone have a solution in Ultrix for the following failure
during 'bmake depend' in the compile/KERNEL build:

# bmake depend
sh: printf: not found
No suffix list.
Make:  Don't know how to make xxx.  Stop.
"../../../../lib/libkern/Makefile.inc", line 8: warning: Couldn't read 
shell's output
"../../../../lib/libkern/Makefile.inc", line 8: warning: "cd $(KERNDIR);  
printf "xxx:\n\techo \$${.OBJDIR}\n" | $(MAKE) -r -s -f - xxx" returned 
non-zero

Makefile.inc in src/sys/lib/libkern  has this odd section which is at
issue (what is  xxx ???):

KERNLIBDIR!=cd $(KERNDIR); \
        printf "xxx:\n\techo \$${.OBJDIR}\n" | $(MAKE) -r -s -f - xxx


Since libkern's Makefile.inc fails, LIBKERN gets defined as '/libkern.a'
but there is also perhaps something else critcally missing when this 
fails.

The source files will all compile to object form with little complaint, but 
the link loader then fails (after modifiying to a suitable good path to 
libkern.a) with several dozen undefined symbols: 

...

ld -x -N -o netbsd -e start -Ttext 80030000 ${SYSTEM_OBJ} vers.o ../libkern.a
/bin/ld:
Undefined:
_mach_init _cpu _fpu _main _panic _whichqs _qs _nullproc _curproc 
_cnt_want_resched _pmap_alloc_tlbpid _machExceptionTable _trap _interrupt
_astpending _softintr _Sysmapsize _Sysmap _printf _machFPCurProcPtr
_MachEmulateBranch _trapsignal _machDataCacheSize _machInstCacheSize
copyinstr bcopy splx memcpy copyout suword splsoftclock setsoftclock 
splhigh copyin sigcode esigcode copyoutstr setrunqueue spl0 subyte remrq
cpu_switch fuswintr suswintr ovbcopy copystr setsoftnet _insque _remque
MachEmptyWriteBuffer nclist MachTLBWriteIndexed MachSetPID MachUTLBMissEnd
MachUTLBMiss MachExceptionEnd MachException MachConfigCache MachFlushCache
Mach_spl1 Mach_spl0 Mach_spl2 Mach_spl3 badaddr MachSaveCurFPState savectx
blkclr MachTLBFlushAddr MachTLBUpdate MachFlushICache MachTLBFlush 
MachKernIntr MachKernGenException MachTLBMissException MachUserIntr
MachUserGenException onfault_table fuiword suiword MachSwitchFPState
MachFPInterrupt clearsoftclock clearsoftnet cpu_getregs copykstack

...

What am I missing or doing wrong?

Source tree is netbsd-current, sup'ed yesterday. There was no sys/arch 
???? via sup, so I got the arch subtree out of the tar-files/sys.tar.gz
via ftp.

Build is on a DS5000 running Ultrix 4.3a, with a GENERIC.pmax copy
with only 1 minor addition '-D_KERNEL' added, since sys/proc.h has
'_KERNEL' instead of 'KERNEL'

vnode_if.sh is using /bin/sh5, and awk is /bin/nawk

--
James S. MacKinnon           Office: P-139 Avahd-Bhatia Physics Lab
Department of Physics        Voice : (403) 492-8226
University of Alberta        email : Jim.MacKinnon@Phys.UAlberta.CA
Edmonton, Canada T6G 2N5
        WWW:   http://www.phys.ualberta.ca/~jmack/jmack.html