From dave@dogwood.com  Thu Nov 14 23:16:31 1996
Received: from white.dogwood.com (dave@white.dogwood.com [140.174.96.1])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA21458
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Nov 1996 23:16:26 -0800 (PST)
Received: (from dave@localhost)
          by white.dogwood.com (8.8.2/8.8.2) id XAA24270
         ; Thu, 14 Nov 1996 23:16:14 -0800 (PST)
Message-Id: <199611150716.XAA24270@white.dogwood.com>
Date: Thu, 14 Nov 1996 23:16:14 -0800 (PST)
From: Dave Cornejo <dave@dogwood.com>
Reply-To: dave@dogwood.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: 'make world' fails on read-only /usr/src
X-Send-Pr-Version: 3.2

>Number:         2013
>Category:       misc
>Synopsis:       'make world' fails on read-only /usr/src
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 14 23:20:04 PST 1996
>Closed-Date:    Sat May 23 02:12:57 PDT 1998
>Last-Modified:  Sat May 23 02:14:32 PDT 1998
>Originator:     Dave Cornejo
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Dogwood Media
>Environment:

FreeBSD-current 14 Nov 1996

>Description:

In the 'make world' process, 'bootstrap' removes .../usr.bin/lex/lib,
which 'libraries' is expecting to be there.  If /usr/src is mounted
r/w the make succeeds by using the source directory to build in.  If
/usr/src is read-only, then it fails since it can't save the .depend
file.

>How-To-Repeat:

Do 'make world' on a source tree mounted read-only via NFS.

>Fix:
	
My proposed fix is below - you could also solve this by not doing an
'rm -rf' in /usr/obj/.../usr.bin/lex, but this has more far reaching
effects.  Apply the following patch to /usr/src/Makefile:

===== cut here =====
*** Makefile.orig	Thu Nov 14 22:34:28 1996
--- Makefile	Thu Nov 14 22:35:16 1996
***************
*** 364,370 ****
  	cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \
  		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
  	cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \
! 		${MAKE} ${MK_FLAGS} -DNOLIB all install ${CLEANDIR} ${OBJDIR}
  
  #
  # include-tools - generally the same as 'bootstrap', except that it's for
--- 364,371 ----
  	cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \
  		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
  	cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \
! 		${MAKE} ${MK_FLAGS} -DNOLIB all install ${CLEANDIR} && \
! 		${MAKE} ${OBJDIR}
  
  #
  # include-tools - generally the same as 'bootstrap', except that it's for
===== cut here =====

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Sat May 23 02:12:57 PDT 1998 
State-Changed-Why:  

As part of our PR auditing campaign, this PR has been closed due to it's 
age and lack of activity on the PR.   

There is a good chance that the problem reported have been solved  
as part of other activities. 

If this is not the case, please reopen this PR with fresh information 
on the manifestation of the bug. 

Sorry about the late reaction to this PR. 
>Unformatted:
