Subject: port-sparc64/17196: 1.6 branch sparc64 port fails to cleanly build release with OBJMACHINE set
To: None <gnats-bugs@gnats.netbsd.org>
From: Todd Kover <kovert@omniscient.com>
List: netbsd-bugs
Date: 06/08/2002 15:31:13
>Number:         17196
>Category:       port-sparc64
>Synopsis:       1.6 branch sparc64 port fails to cleanly build release with OBJMACHINE set
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 08 12:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Todd Kover
>Release:        NetBSD 1.6_BETA1
>Organization:
Omniscient Technologies
>Environment:
System: NetBSD waygate.omniscient.com 1.6_BETA1 NetBSD 1.6_BETA1 (GENERIC) #0: Tue Jun  4 15:12:08 UTC 2002     autobuild@tgm.daemon.org:/autobuild/sparc64/OBJ/autobuild/src/sys/arch/sparc64/compile/GENERIC sparc64

(friday cvs co of 1.6 branch)


>Description:
	With the following in /etc/mk.conf:

	MKTOOLS=yes
	USE_NEW_TOOLCHAIN=yes
	OBJMACHINE=yes

	a:
		DESTDIR=something RELEASEDIR=somethingelse \
		./build.sh -t /build/NetBSD-1.6/src sparc64

	fails towards th end with:

	---<snip>---
	NETBSDSRCDIR=/build/NetBSD-1.6/src  CRUNCHBIN=  CURDIR=/build/NetBSD-1.6/src/distrib/sparc64/bootfs  DESTDIR=/tmp/NetBSD-sparc64-dest-2002-06-07  DISTRIBDIR=/build/NetBSD-1.6/src/distrib  MACHINE=sparc64  MACHINE_ARCH=sparc64  OBJDIR=/build/NetBSD-1.6/src/distrib/sparc64/bootfs/obj.sparc64 TARGETDIR=/build/NetBSD-1.6/src/distrib/sparc64/bootfs/obj.sparc64/work awk -f /build/NetBSD-1.6/src/distrib/common/parselist.awk -v mode=populate /build/NetBSD-1.6/src/distrib/sparc64/bootfs/list | sh -e   && touch work.built
	cp: /build/NetBSD-1.6/src/distrib/sparc64/bootfs/obj.sparc64/../instfs/netbsd.INSTALL.gz: No such file or directory
	*** Error code 1

	Stop.
	nbmake: stopped in /build/NetBSD-1.6/src/distrib/sparc64/bootfs
	*** Error code 1
	---<snip>---


>How-To-Repeat:
	follow the problem description
>Fix:
        The problem is with distrib/sparc64/bootfs/list -- it contains a
        path that doesn't understand object directories.  The following
        patch switches it to use RAMDISKDIR, and define that in the
        correct makefile which will pass RAMDISKDIR down and fix it.
        I'm not sure if this is consistant with how the, install system
        is supposed to work, but it should work in both the OBJMACHINE
        and non-OBJMACHINE case.  (I've only tested it in the former).

---<snip>---
Index: common/Makefile.parselist
===================================================================
RCS file: /cvsroot/basesrc/distrib/common/Makefile.parselist,v
retrieving revision 1.2
diff -u -r1.2 Makefile.parselist
--- Makefile.parselist	2002/04/26 15:50:27	1.2
+++ Makefile.parselist	2002/06/08 18:12:58
@@ -18,7 +18,8 @@
 		DISTRIBDIR=${DISTRIBDIR:Q} \
 		MACHINE=${MACHINE:Q} \
 		MACHINE_ARCH=${MACHINE_ARCH:Q} \
-		OBJDIR=${.OBJDIR:Q}
+		OBJDIR=${.OBJDIR:Q} \
+		RAMDISKDIR=${RAMDISKDIR:Q}
 
 PARSELISTDEP=	${DISTRIBDIR}/common/parselist.awk
 PARSELIST=	${PARSELISTENV} awk -f ${PARSELISTDEP}
Index: sparc64/bootfs/list
===================================================================
RCS file: /cvsroot/basesrc/distrib/sparc64/bootfs/list,v
retrieving revision 1.1
diff -u -r1.1 list
--- list	2002/05/20 21:50:11	1.1
+++ list	2002/06/08 18:12:58
@@ -1,4 +1,4 @@
 #	$NetBSD: list,v 1.1 2002/05/20 21:50:11 eeh Exp $
 
 COPY	${DESTDIR}/usr/mdec/ofwboot		ofwboot
-COPY	${OBJDIR}/../instfs/netbsd.INSTALL.gz	netbsd
+COPY	${RAMDISKDIR}/netbsd.INSTALL.gz		netbsd
---<snip>---
>Release-Note:
>Audit-Trail:
>Unformatted: