Date: Sat, 3 Nov 2001 18:08:29 -0800 (PST) From: David Wolfskill <david@catwhisker.org> To: sgk@troutmask.apl.washington.edu, vanilla@play.maudelegb.org Cc: freebsd-current@FreeBSD.ORG Subject: Re: awk has gone nuts! Message-ID: <200111040208.fA428T359144@bunrab.catwhisker.org> In-Reply-To: <20011104014332.GA6062@play.cirx.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>Date: Sun, 4 Nov 2001 09:43:32 +0800 >From: "Vanilla I. Shu" <vanilla@play.maudelegb.org> >On Sat, Nov 03, 2001 at 10:07:21AM -0800, Steve Kargl wrote: >> strip -R .comment -R .note loader.bin >> cat /usr/src/sys/boot/i386/loader/../../common/help.common /usr/src/sys/boot/i386/loader/help.i386 | awk -f /usr/src/sys/boot/i386/loader/../../common/merge_help.awk > loader.help >> /usr: write failed, file system is full >^^^^^^^^^^ >> awk: write error on stdout >> input record number 383, file >> source line number 92 >> *** Error code 2 >your /usr is full, not CURRENT's problem. Actually, it is, but there is a circumvention. The scenario goes like this: * Build -CURRENT with sources from between 30 October - 02 November -- that is, get the-one-true-awk installed as /usr/bin/awk. * Some of the buildworld process uses awk. It is, however (to the best of my knowledge) not built as part of the "build tools" process; thus, buildworld uses /usr/bin/awk for this. Perhaps changing this is worth consideration, given the events of the past week. * Some of those awk scripts use constructs that gawk accepts and uses. (The POSIX "bracket expressions" are a notable example, but there appear to be others, such as empty regexes and newline characters as part of a variable's value.) The modes of failure are often such that it is not immediately apparent when a failure has occurred. (I.e., some of the failures are "silent".) * The mode of failure for src/sys/boot/common/merge_help.awk, in particular, was that it would sit in a rather tight loop, repetitively outputting the same 2 (or 3, I forget now) lines because of a combination of a silent failure when using the-one-true-awk and a programming error in the script itself (such that in the case that no input records were recognized, it proceeded to enter this tight output loop). A circumvention is to make & install awk (assuming the sources you are using are those for gawk) before doing the buildworld. Another is to copy over a version of gawk as /usr/bin/awk before doing the buildworld. Either of these will prevent the problems. If the goal is merely to avoid the out-of-space condition because of the programming error, it suffices to change the initialization of "first" at src/sys/boot/common/merge_help.awk:11 from first = 0; to first = -1; though that will not solve the other problems. (It would probably be good for that script to terminate with an error condition if, at termination, it discovers that it recognized no input lines.) Cheers, david -- David H. Wolfskill david@catwhisker.org As a computing professional, I believe it would be unethical for me to advise, recommend, or support the use (save possibly for personal amusement) of any product that is or depends on any Microsoft product. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111040208.fA428T359144>