Subject: port-mac68k/2860: Undefined symbol _nfsbootdevname
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/18/1996 00:11:26
>Number:         2860
>Category:       port-mac68k
>Synopsis:       Undefined symbol _nfsbootdevname
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 18 00:20:06 1996
>Originator:     Paul Goyette
>Release:        1.2A
System: NetBSD 1.2 NetBSD 1.2 (PGOYETTE) #92: Sun Sep 22 17:26:40 PDT 1996 mac68k

Symbol _nfsbootdevname is defined in src/sys/nfs/nfs_boot.c only if NETHER
is non-zero.  But src/sys/arch/mac68k/mac68k/autoconf.c references the
symbol if NFSCLIENT is defined, regardless of NETHER.  This results in an
undefined symbol in the linker if the kernel was built with NFSCLIENT but
without any Ethernet interface.
See above.
The following patch modifies autoconf.c to not reference the symbol unless
an Ethernet interface was configured.  This is probably not the best 
solution, but at least it let's you build the kernel.  :)

A more correct solution would probably be to define the symbol whenever
NFSCLIENT is selected, regardless of whether an Ethernet interface is

*** /usr/src/sys/arch/mac68k/mac68k/autoconf.c	Mon Oct 14 09:11:21 1996
--- ./autoconf.c	Thu Oct 17 23:44:15 1996
*** 244,250 ****
--- 244,252 ----
  	struct device *bootdv, *rootdv, *swapdv;
  	int bootpartition;
  #if defined(NFSCLIENT)
+ #if NETHER
  	extern char *nfsbootdevname;
+ #endif
  	extern int nfs_mountroot __P((void *));
  #if defined(FFS)
*** 383,389 ****
--- 385,393 ----
  #if defined(NFSCLIENT)
  	case DV_IFNET:
  		mountroot = nfs_mountroot;
+ #if NETHER
  		nfsbootdevname = rootdv->dv_xname;
+ #endif
  #if defined(FFS)