Subject: misc/16227: read only src tree build failure
To: None <>
From: Stoned Elipot <>
List: netbsd-bugs
Date: 04/07/2002 16:33:59
>Number:         16227
>Category:       misc
>Synopsis: failure with readonly src tree
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 07 07:36:01 PDT 2002
>Originator:     Stoned Elipot
>Release:        -current as of Apr 7 13:10 CET
Pandora's Box <>
System: NetBSD nakano 1.5.1 NetBSD 1.5.1 (NAKANO) #0: Mon Aug 6 18:26:03 CEST 2001 seb@nakano:/site/a/src/kernels/compile/NAKANO i386

With a src tree updated a couple of hours ago I was unable to do a build
because my src tree is readonly.
I did 
./ -m sparc -O /path/obj -R /path/release -D /path/dest \
  -T /path/tools -U
from the top of my ro src tree.

It failed in cleandir stage at two points:
- first because of '/bin/rm -rf results' in usr.sbin/ipf/ipftest/test/Makefile
  (quick and dirty fix proposed below)
- second because of the machine symlink in sys/lkm/compat/sunos
cleandir ===> sys/lkm/compat
cleandir ===> sys/lkm/compat/sunos
ln: machine: Read-only file system
*** Error code 1

Set up a read only src tree
and try ./ -O /foo -D /bar -T /baz
I don't think cross-building or even asking to make a release
is an issue here..

For the first problem, dirty solution could be:

Index: usr.sbin/ipf/ipftest/test/Makefile
RCS file: /cvsroot/basesrc/usr.sbin/ipf/ipftest/test/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- usr.sbin/ipf/ipftest/test/Makefile	2000/08/30 23:51:55	1.7
+++ usr.sbin/ipf/ipftest/test/Makefile	2002/04/07 14:21:47
@@ -40,4 +40,4 @@
 	/bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f14
 	/bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11
 	/bin/rm -f n1 n2 n3 n4 n5 n6 n7
-	/bin/rm -rf results
+	-/bin/rm -rf results

For the second one I don't really know the recent addition of
.BEGIN to make the machine link in seems to be 
the troublemaker but I don't really know what should be fixed...