Subject: Re: obj dir not created (subdir sendmail/cf/cf)
To: None <tech-toolchain@NetBSD.org>
From: None <tlaronde@polynum.com>
List: tech-toolchain
Date: 06/20/2005 14:00:11
On Mon, Jun 20, 2005 at 03:13:48PM +0400, Valeriy E. Ushakov wrote:
> On Mon, Jun 20, 2005 at 12:38:31 +0200, tlaronde@polynum.com wrote:
> 
> > On Mon, Jun 20, 2005 at 11:13:54AM +1000, Luke Mewburn wrote:
> > 
> > typescript attached.
> 
> This looks like a typical problem after etcupdate from a writable
> /usr/src.
> 
> Go to gnu/usr.sbin/sendmail/cf/cf and check with cvs what's modified
> or not present in the repository.  I don't remember if cf/cf is the
> only affected subdirectory in gnu/usr.sbin/sendmail - so check it all
> just in case.

No. Here is the transcript:

------- typescript
Script started on Mon Jun 20 13:32:47 2005
jordan% cd /usr/src
jordan% mount
/dev/wd0a on / type ffs (local)
/dev/wd0e on /usr type ffs (local)
/dev/wd0h on /usr/src type ffs (read-only, local)
/dev/wd0j on /data/pgsql type ffs (nodev, local)
/dev/wd0k on /data/kergis type ffs (noexec, nodev, soft dependencies, local)
/dev/wd1e on /usr/pkgsrc type ffs (read-only, nodev, soft dependencies, local)
/dev/wd1f on /usr/xsrc type ffs (read-only, noexec, nodev, soft dependencies, local)
/dev/wd1g on /obj type ffs (nodev, soft dependencies, local)
jordan% cd /usr/src
jordan% more CVS/Tag
Tnetbsd-2-0
jordan% cvs -n update -dP 2>&1 | grep "^[M?]"
jordan% exit

Script done on Mon Jun 20 13:45:28 2005
------- end typescript

> Also, iirc, if that's inedeed etcupdate aftermath - there should be
> more fallout waiting for you further in the build, but my memory is
> hazy.  Probably MAKEDEV.

Since I'm in a special case of cross-compilation (identity: compiling
for NetBSD-2.0.2 i386 on a NetBSD-2.0.2 i386), the toolchain is
generated and, AFAIU, my host /etc should not be considered at all,
whatever might be in it (Am I wrong?).

And yes, MAKEDEV will probably fail, since as reported by me
previously, etc/Makefile tries to create MAKEDEV in _srcdir_ and not
in obj dir (if I read correctly the Makefile):

#	$NetBSD: Makefile,v 1.284.2.1 2004/07/28 21:35:29 jmc Exp $
MAKEDEV: .EXEC
	${_MKTARGET_CREATE}
	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
	    NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}

where, IMHO, it should be:

--- /usr/src/etc/Makefile	2005-06-19 18:16:11.000000000 +0200
+++ /var/tmp/Makefile.mod	2005-04-15 16:53:36.000000000 +0200
@@ -155,7 +155,8 @@
 	${_MKTARGET_CREATE}
 	MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	    NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
-	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
+	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
+		> ${MAKEOBJDIRPREFIX}/${.TARGET}
 
 
 RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID \

> 
> It might be a good idea to make cvs update and really pay attention to
> the '?'s and 'M's.  May be even do cvs update -I \!  
> 
> PS: This question is asked repeatedly.  We should fix whatever causes
> this lossage and add a FAQ entry for this lossage mode.
> 

Regards,
-- 
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.org/  |  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C