Bug 31803

Summary: Handbook make world addition
Product: Documentation Reporter: Michael W Lucas <mwlucas>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
build-errors none

Description Michael W Lucas 2001-11-06 18:10:01 UTC
Explanation of common steps to take when make world fails.  This crops
up every so often.

taken from email by:  cjc@freebsd.org
Comment 1 ceri 2001-11-06 18:15:04 UTC
On Tue, Nov 06, 2001 at 01:08:33PM -0500, mwlucas@blackhelicopters.org said:

> + &prompt.root; <userinput>make cleandir</userinput>
> + &prompt.root; <userinput>make cleandir</userinput></screen>

I think it would be worth an additional note stating that this step
is intended to be repeated.

Ceri

-- 
I probably wouldn't like you. Really.
I really probably wouldn't like you.
Comment 2 Michael W Lucas 2001-11-06 18:30:43 UTC
On Tue, Nov 06, 2001 at 06:15:04PM +0000, Ceri wrote:
> I think it would be worth an additional note stating that this step
> is intended to be repeated.

But our users really do type everything in exactly as they're told,
don't they?  ;-)

Good idea, how's this?


*** en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml-dist	Tue Nov  6 12:36:21 2001
--- en_US.ISO8859-1/books/handbook/cutting-edge/chapter.sgml	Tue Nov  6 13:29:19 2001
***************
*** 1580,1585 ****
--- 1580,1615 ----
  	    </itemizedlist>
  	  </answer>
  	</qandaentry>
+ 
+         <qandaentry>
+           <question>
+             <para>What do I do if something goes wrong?</para>
+           </question>
+ 
+           <answer>
+             <para>Make absolutely sure your environment has no
+               extraneous cruft from earlier builds.  This is simple
+               enough.</para>
+ 
+             <screen>&prompt.root; <userinput>cd /usr/obj</userinput>
+ &prompt.root; <userinput>chflags -R noschg *</userinput>
+ &prompt.root; <userinput>rm -rf *</userinput>
+ &prompt.root; <userinput>cd /usr/src</userinput>
+ &prompt.root; <userinput>make cleandir</userinput>
+ &prompt.root; <userinput>make cleandir</userinput></screen>
+ 
+             <para>Yes, <command>make cleandir</command> really should
+               be run twice.</para>
+ 
+             <para>Then restart the whole process, starting
+               with<command> <command>make buildworld</command>.</para>
+ 
+             <para>If you still have problems, send the error and the
+               output of <command>uname -a</command>to &a.questions;.
+               Be prepared to answer other questions about your
+               setup!</para>
+           </answer>
+         </qandaentry>
        </qandaset>
      </sect2>
    </sect1>


-- 
Michael Lucas
mwlucas@blackhelicopters.org
http://www.blackhelicopters.org/~mwlucas/
Big Scary Daemons: http://www.oreillynet.com/pub/q/Big_Scary_Daemons
Comment 3 ceri 2001-11-06 19:00:10 UTC
On Tue, Nov 06, 2001 at 10:40:02AM -0800, Michael Lucas said:
>  
>  Good idea, how's this?

Looks good to me.

Ceri
Comment 4 Michael W Lucas 2001-11-07 00:06:26 UTC
> Play safe here.  Don't suggest commands that contain wildcard
> characters, since Bad Things(TM) can happen if someone runs the
> commands and somehow ``fails'' to change to the proper directory.

You know, I give you people something for free, and you just gripe.  :)
How's this?

==ml

-- 
Michael Lucas
mwlucas@blackhelicopters.org
http://www.blackhelicopters.org/~mwlucas/
Big Scary Daemons: http://www.oreillynet.com/pub/q/Big_Scary_Daemons
Comment 5 haro 2001-11-07 03:51:24 UTC
> +             <screen>&prompt.root; <userinput>cd /usr/obj</userinput>
> + &prompt.root; <userinput>chflags -R noschg *</userinput>
> + &prompt.root; <userinput>rm -rf *</userinput>

I've heard that doing following command is much more faster, than the above.
   cd /usr/obj
   rm -rf *
   chflags -R noschg *
   rm -rf *

Just my $0.02,
  Haro
=-----------------------------------------------------------------------
           _ _    Munehiro (haro) Matsuda
 -|- /_\  |_|_|   e-Collaboration Group, Kubota Graphics Technology Inc.
 /|\ |_|  |_|_|   2-8-8 Shinjuku, Shinjuku-ku Tokyo 160-0022, Japan
                  Tel: +81-3-3225-0936  Fax: +81-3-3225-0740
                  Email: haro@kubota.co.jp
Comment 6 Michael W Lucas 2001-11-07 12:44:09 UTC
On Wed, Nov 07, 2001 at 12:51:24PM +0900, Munehiro Matsuda wrote:
> > +             <screen>&prompt.root; <userinput>cd /usr/obj</userinput>
> > + &prompt.root; <userinput>chflags -R noschg *</userinput>
> > + &prompt.root; <userinput>rm -rf *</userinput>
> 
> I've heard that doing following command is much more faster, than the above.
>    cd /usr/obj
>    rm -rf *
>    chflags -R noschg *
>    rm -rf *

It is faster, but it's (IMHO) not always as correct.

First, I've redone the patch at multiple requests to eliminate the
wildcards.  It's been pointed out that "rm -rf *" isn't a good thing
to recommend.

Under earlier versions of FreeBSD, some files in /usr/obj were marked
noschg.  A user could use your example to delete the tree if he didn't
care about the errors.

Under newer versions of FreeBSD, /usr/obj has no schg files.  The
first rm -rf will delete the whole tree, and the other commands will
either generate errors or have no effect.

I'm trying to write a single entry that covers all versions of
FreeBSD.  More experienced readers will easily understand that we're
telling them to remove /usr/obj/usr by any means necessary, and will
use their preferred method to do so.

==ml

-- 
Michael Lucas
mwlucas@blackhelicopters.org
http://www.blackhelicopters.org/~mwlucas/
Big Scary Daemons: http://www.oreillynet.com/pub/q/Big_Scary_Daemons
Comment 7 Bruce A. Mah freebsd_committer freebsd_triage 2001-11-14 00:10:16 UTC
State Changed
From-To: open->closed

Committed, per version of patch posted to -doc.  Gracias!