Subject: bin/17138: Cross-built amd(8) ${arch} substitution is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: maverick ROOT <root@maverick.clank.org>
List: netbsd-bugs
Date: 06/01/2002 18:22:59
>Number:         17138
>Category:       bin
>Synopsis:       Cross-built amd(8) ${arch} substitution is broken
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 01 23:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     scottr
>Release:        NetBSD 1.6_BETA1 2002-05-30
>Organization:
>Environment:
System: NetBSD maverick 1.6_BETA1 NetBSD 1.6_BETA1 (GENERIC) #0: Fri May 31 06:06:25 UTC 2002 autobuild@tgm.daemon.org:/autobuild/mac68k/OBJ/autobuild/src/sys/arch/mac68k/compile/GENERIC mac68k
Architecture: m68k
Machine: mac68k
>Description:
	When amd(8) is cross-built, the wrong architecture is substituted
	for ${arch} in mount maps. In my particular case, "i386" was
	substituted for "m68k" on a Macintosh Quadra 700 that, last I
	checked, had an 68040 installed.
>How-To-Repeat:
	Install beta build. Use amd(8) with a mount map that includes
	the ${arch} substitution on a non-i386 system, e.g.:

/defaults	opts:=rw,intr,noconn,resvport;type:=nfs
pkg		rhost:=nfs.server.org;rfs:=/;sublink:=private/pkg/${arch}/pkg
pkgdb		rhost:=nfs.server.org;rfs:=/;sublink:=private/pkg/${arch}/db

	Notice that you can't mount the file system, or that the binaries
	are for the wrong platform. Verify it with amq(8):

	/          root    "root"                   maverick:(pid257)
	/auto      toplvl  amd.home                 /auto
	/auto/pkg  nfs     nfs.server.org:/vol/vol0  /amd/nfs.server.org/private/pkg/i386/pkg

	
>Fix:
	Either teach the cross build to compile in the correct value,
	or determine it at runtime. Note - ${karch} may also be a problem!
>Release-Note:
>Audit-Trail:
>Unformatted: