Re: awk(1) is locale unaware (was: Re: buildworld breakage during "make depend" at usr.bin/kdump)

2002-12-03 Thread Ruslan Ermilov
On Tue, Dec 03, 2002 at 11:09:20AM +0300, Andrey A. Chernov wrote:
> On Wed, Nov 20, 2002 at 14:54:12 +0200, Ruslan Ermilov wrote:
> 
> > Index: b.c
> > ===
> > RCS file: /home/ncvs/src/contrib/one-true-awk/b.c,v
> > retrieving revision 1.1.1.2
> > diff -u -p -r1.1.1.2 b.c
> 
> David, this variant is nice enough. Please, commit.
> 
One needs to catch up to his email.  :-)

A new version of one-true-awk was released which includes
these fixes.


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age



msg48021/pgp0.pgp
Description: PGP signature


Re: awk(1) is locale unaware (was: Re: buildworld breakage during "make depend" at usr.bin/kdump)

2002-12-03 Thread Andrey A. Chernov
On Wed, Nov 20, 2002 at 14:54:12 +0200, Ruslan Ermilov wrote:

> Index: b.c
> ===
> RCS file: /home/ncvs/src/contrib/one-true-awk/b.c,v
> retrieving revision 1.1.1.2
> diff -u -p -r1.1.1.2 b.c

David, this variant is nice enough. Please, commit.

-- 
Andrey A. Chernov
http://ache.pp.ru/



msg48017/pgp0.pgp
Description: PGP signature


Re: awk(1) is locale unaware (was: Re: buildworld breakage during "make depend" at usr.bin/kdump)

2002-11-20 Thread Ruslan Ermilov
On Wed, Nov 20, 2002 at 02:27:53PM +1100, Tim Robbins wrote:
> On Wed, Nov 20, 2002 at 04:38:38AM +0300, Andrey A. Chernov wrote:
> 
> > On Tue, Nov 19, 2002 at 14:52:02 +0200, Ruslan Ermilov wrote:
> > > It seems that this patch has never been committed.  This is a critical
> > > bug that should be fixed before 5.0-RELEASE is out.
> > 
> > I agree. There is no locale yet and I never see that patch.
> 
> This patch seems to work, I used the logic from regcomp.c in libc.
> Long lines make it ugly, but it was like that when I got here ;)

> Index: src/usr.bin/awk/Makefile
> ===
> RCS file: /x/freebsd/src/usr.bin/awk/Makefile,v
> retrieving revision 1.9
> diff -u -r1.9 Makefile
> --- src/usr.bin/awk/Makefile  10 May 2002 20:36:21 -  1.9
> +++ src/usr.bin/awk/Makefile  20 Nov 2002 03:13:50 -
> @@ -6,7 +6,7 @@
>  PROG=nawk
>  SRCS=awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.h
>  
> -CFLAGS+= -I. -I${AWKSRC}
> +CFLAGS+= -I. -I${AWKSRC} -I${.CURDIR}/../../lib/libc/locale
>  
Ouch.

>  DPADD=   ${LIBM}
>  LDADD=   -lm
> Index: src/contrib/one-true-awk/b.c
> ===
> RCS file: /x/freebsd/src/contrib/one-true-awk/b.c,v
> retrieving revision 1.1.1.2
> diff -u -r1.1.1.2 b.c
> --- src/contrib/one-true-awk/b.c  19 Feb 2002 09:35:24 -  1.1.1.2
> +++ src/contrib/one-true-awk/b.c  20 Nov 2002 03:16:10 -
> @@ -32,6 +32,7 @@
>  #include 
>  #include "awk.h"
>  #include "ytab.h"
> +#include "collate.h"
>  
>  #define  HAT (NCHARS-2)  /* matches ^ in regular expr */
>   /* NCHARS is 2**n */
> @@ -284,7 +285,7 @@
>  
>  char *cclenter(char *argp)   /* add a character class */
>  {
> - int i, c, c2;
> + int i, j, c, c2;
>   uschar *p = (uschar *) argp;
>   uschar *op, *bp;
>   static uschar *buf = 0;
> @@ -308,12 +309,24 @@
>   i--;
>   continue;
>   }
> - while (c < c2) {
> - if (!adjbuf((char **) &buf, &bufsz, bp-buf+2, 
>100, (char **) &bp, 0))
> - FATAL("out of space for character 
>class [%.10s...] 2", p);
> - *bp++ = ++c;
> - i++;
> - }
> + if (__collate_load_error) {
> + while (c < c2) {
> + if (!adjbuf((char **) &buf, &bufsz, 
>bp-buf+2, 100, (char **) &bp, 0))
> + FATAL("out of space for 
>character class [%.10s...] 2", p);
> + *bp++ = ++c;
> + i++;
> + }
> + } else {
> + for (j = CHAR_MIN; j <= CHAR_MAX; j++) {
> + if (!adjbuf((char **) &buf, &bufsz, 
>bp-buf+2, 100, (char **) &bp, 0))
> + FATAL("out of space for 
>character class [%.10s...] 2", p);
> + if (__collate_range_cmp(c, j) <= 0
> + && __collate_range_cmp(j, c2) <= 
>0) {
> + *bp++ = j;
> + i++;
> + }
> + }
> +}
>   continue;
>   }
>   }

There are a number of problems here:

1.  The "empty range" check preceding this block should be made
locale-aware too.

2.  CHAR_MAX evaluates to 127 here.

Here's my version of the above fix plus [[:class:]] fixes Andrey mentioned.
I gave it only light testing.

The collate_range_cmp() was stolen from the old awk(1).


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

Index: b.c
===
RCS file: /home/ncvs/src/contrib/one-true-awk/b.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 b.c
--- b.c 19 Feb 2002 09:35:24 -  1.1.1.2
+++ b.c 20 Nov 2002 12:51:10 -
@@ -282,9 +282,25 @@ int quoted(char **pp)  /* pick up next th
return c;
 }
 
+static int collate_range_cmp (a, b)
+   int a, b;
+{
+   int r;
+   static char s[2][2];
+
+

Re: awk(1) is locale unaware (was: Re: buildworld breakage during "make depend" at usr.bin/kdump)

2002-11-19 Thread Andrey A. Chernov
On Wed, Nov 20, 2002 at 14:27:53 +1100, Tim Robbins wrote:
> On Wed, Nov 20, 2002 at 04:38:38AM +0300, Andrey A. Chernov wrote:
> 
> > On Tue, Nov 19, 2002 at 14:52:02 +0200, Ruslan Ermilov wrote:
> > > It seems that this patch has never been committed.  This is a critical
> > > bug that should be fixed before 5.0-RELEASE is out.
> > 
> > I agree. There is no locale yet and I never see that patch.
> 
> This patch seems to work, I used the logic from regcomp.c in libc.
> Long lines make it ugly, but it was like that when I got here ;)

Looks good, but it is not enough. Please look in b.c to see how weird 
character classes, i.e. [:alpha:] are implemented there, this stuff must 
be rewritted too.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: awk(1) is locale unaware (was: Re: buildworld breakage during "make depend" at usr.bin/kdump)

2002-11-19 Thread Tim Robbins
On Wed, Nov 20, 2002 at 04:38:38AM +0300, Andrey A. Chernov wrote:

> On Tue, Nov 19, 2002 at 14:52:02 +0200, Ruslan Ermilov wrote:
> > It seems that this patch has never been committed.  This is a critical
> > bug that should be fixed before 5.0-RELEASE is out.
> 
> I agree. There is no locale yet and I never see that patch.

This patch seems to work, I used the logic from regcomp.c in libc.
Long lines make it ugly, but it was like that when I got here ;)


Tim


Index: src/usr.bin/awk/Makefile
===
RCS file: /x/freebsd/src/usr.bin/awk/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- src/usr.bin/awk/Makefile10 May 2002 20:36:21 -  1.9
+++ src/usr.bin/awk/Makefile20 Nov 2002 03:13:50 -
@@ -6,7 +6,7 @@
 PROG=  nawk
 SRCS=  awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.h
 
-CFLAGS+= -I. -I${AWKSRC}
+CFLAGS+= -I. -I${AWKSRC} -I${.CURDIR}/../../lib/libc/locale
 
 DPADD= ${LIBM}
 LDADD= -lm
Index: src/contrib/one-true-awk/b.c
===
RCS file: /x/freebsd/src/contrib/one-true-awk/b.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 b.c
--- src/contrib/one-true-awk/b.c19 Feb 2002 09:35:24 -  1.1.1.2
+++ src/contrib/one-true-awk/b.c20 Nov 2002 03:16:10 -
@@ -32,6 +32,7 @@
 #include 
 #include "awk.h"
 #include "ytab.h"
+#include "collate.h"
 
 #defineHAT (NCHARS-2)  /* matches ^ in regular expr */
/* NCHARS is 2**n */
@@ -284,7 +285,7 @@
 
 char *cclenter(char *argp) /* add a character class */
 {
-   int i, c, c2;
+   int i, j, c, c2;
uschar *p = (uschar *) argp;
uschar *op, *bp;
static uschar *buf = 0;
@@ -308,12 +309,24 @@
i--;
continue;
}
-   while (c < c2) {
-   if (!adjbuf((char **) &buf, &bufsz, bp-buf+2, 
100, (char **) &bp, 0))
-   FATAL("out of space for character 
class [%.10s...] 2", p);
-   *bp++ = ++c;
-   i++;
-   }
+   if (__collate_load_error) {
+   while (c < c2) {
+   if (!adjbuf((char **) &buf, &bufsz, 
+bp-buf+2, 100, (char **) &bp, 0))
+   FATAL("out of space for 
+character class [%.10s...] 2", p);
+   *bp++ = ++c;
+   i++;
+   }
+   } else {
+   for (j = CHAR_MIN; j <= CHAR_MAX; j++) {
+   if (!adjbuf((char **) &buf, &bufsz, 
+bp-buf+2, 100, (char **) &bp, 0))
+   FATAL("out of space for 
+character class [%.10s...] 2", p);
+   if (__collate_range_cmp(c, j) <= 0
+   && __collate_range_cmp(j, c2) <= 
+0) {
+   *bp++ = j;
+   i++;
+   }
+   }
+}
continue;
}
}
Index: src/contrib/one-true-awk/main.c
===
RCS file: /x/freebsd/src/contrib/one-true-awk/main.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 main.c
--- src/contrib/one-true-awk/main.c 16 Mar 2002 16:50:56 -  1.1.1.3
+++ src/contrib/one-true-awk/main.c 20 Nov 2002 03:03:38 -
@@ -27,6 +27,7 @@
 #define DEBUG
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -55,6 +56,7 @@
char *fs = NULL;
 
cmdname = argv[0];
+   setlocale(LC_ALL, "");
if (argc == 1) {
fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] 
[-v var=value] [files]\n", cmdname);
exit(1);
Index: src/contrib/one-true-awk/run.c
===
RCS file: /x/freebsd/src/contrib/one-true-awk/run.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 run.c
--- src/contrib/one-true-awk/run.c  19 Feb 2002 09:35:25 -  1.1.1.2
+++ src/contrib/one-true-awk/run.c  20 Nov 2002 03:02:29 -
@@ -1504,11 +1504,11 @@
if (t == FTOUPPER) {
for (p = buf; *p; p++)
if (islower((us

Re: awk(1) is locale unaware (was: Re: buildworld breakage during "make depend" at usr.bin/kdump)

2002-11-19 Thread Andrey A. Chernov
On Tue, Nov 19, 2002 at 14:52:02 +0200, Ruslan Ermilov wrote:
> It seems that this patch has never been committed.  This is a critical
> bug that should be fixed before 5.0-RELEASE is out.

I agree. There is no locale yet and I never see that patch.

-- 
Andrey A. Chernov
http://ache.pp.ru/



msg46960/pgp0.pgp
Description: PGP signature


awk(1) is locale unaware (was: Re: buildworld breakage during "make depend" at usr.bin/kdump)

2002-11-19 Thread Ruslan Ermilov
On Thu, Nov 01, 2001 at 05:58:08PM -0800, David O'Brien wrote:
> On Fri, Nov 02, 2001 at 04:44:12AM +0300, Andrey A. Chernov wrote:
> > Next bad thing discovered about new awk just looking at sourse code: it
> > not support locale (collating in regexp ranges too, of course). We just
> > make great backward step switching to it.
> 
> I have a patch for that.
> 
It seems that this patch has never been committed.  This is a critical
bug that should be fixed before 5.0-RELEASE is out.

/usr/bin/env LC_ALL=cs_CZ.ISO8859-2 sh -c "echo a | grep '[A-Z]'"
/usr/bin/env LC_ALL=cs_CZ.ISO8859-2 sh -c "echo a | awk '/[A-Z]/ {print}'"

On a related note, fixing this bug would extrapolate PR misc/45460 to
5.0-CURRENT as well.


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age



msg46927/pgp0.pgp
Description: PGP signature


Re: buildworld breakage

2002-08-16 Thread Robert Watson

I ran into this also, and a bit of fiddling with a debugger was
un-enlightening -- it was segfaulting on a write to
__collate_substitute_table in parse.y.  The pointer to the table didn't
appear to be corrupted, and it should have been in writable memory.  It
also appeared to be properly aligned.  I moved on to other stuff but was
planning to submit a bug report if it persisted (and therefore wasn't a
local nit of mine due to heavy local kernel mods).

Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
[EMAIL PROTECTED]  Network Associates Laboratories

On Thu, 15 Aug 2002, Mike Makonnen wrote:

> I don't know if I'm the only one having this problem, but I haven't
> been able to make a complete buildworld for a couple of
> days now. The last time I upgraded  was arround August 5.
> I have been getting a signal 11 consistently in the same spot.
> 
> ===> secure/usr.sbin/sshd
> ===> share
> ===> share/colldef
> colldef -I /daemon/build/current/src/share/colldef -o bg_BG.CP1251.out
> /daemon/build/current/src/share/colldef/bg_BG.CP1251.src
> *** Signal 11
> 
> Stop in /daemon/build/current/src/share/colldef.
> *** Error code 1
> 
> Stop in /daemon/build/current/src/share.
> *** Error code 1
> 
> Stop in /daemon/build/current/src.
> *** Error code 1
> 
> Stop in /daemon/build/current/src.
> *** Error code 1
> 
> Stop in /daemon/build/current/src.
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage

2002-08-15 Thread Maxim Konovalov

On 12:10-0700, Aug 15, 2002, Mike Makonnen wrote:

> I don't know if I'm the only one having this problem, but I haven't
> been able to make a complete buildworld for a couple of
> days now. The last time I upgraded  was arround August 5.
> I have been getting a signal 11 consistently in the same spot.
>
> ===> secure/usr.sbin/sshd
> ===> share
> ===> share/colldef
> colldef -I /daemon/build/current/src/share/colldef -o bg_BG.CP1251.out
> /daemon/build/current/src/share/colldef/bg_BG.CP1251.src
> *** Signal 11

ache has fixed that.

-- 
Maxim Konovalov, [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage

2002-08-15 Thread Nate Lawson

I got that but a recent cvsup fixed it.  Not sure what the problem was but
there were a few patches to colldef on Wednesday.

-Nate

On Thu, 15 Aug 2002, Mike Makonnen wrote:
> I don't know if I'm the only one having this problem, but I haven't
> been able to make a complete buildworld for a couple of
> days now. The last time I upgraded  was arround August 5.
> I have been getting a signal 11 consistently in the same spot.
> 
> ===> secure/usr.sbin/sshd
> ===> share
> ===> share/colldef
> colldef -I /daemon/build/current/src/share/colldef -o bg_BG.CP1251.out
> /daemon/build/current/src/share/colldef/bg_BG.CP1251.src
> *** Signal 11
> 
> Stop in /daemon/build/current/src/share/colldef.
> *** Error code 1
> 
> Stop in /daemon/build/current/src/share.
> *** Error code 1
> 
> Stop in /daemon/build/current/src.
> *** Error code 1
> 
> Stop in /daemon/build/current/src.
> *** Error code 1
> 
> Stop in /daemon/build/current/src.
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-06 Thread Doug Barton

On Thu, 1 Nov 2001, Alfred Perlstein wrote:

> Although I admit the fallout has been somewhat painful, let's
> try to make do with it, if we disconnect the new awk I feel
> that we will keep repeating this cycle, basically each activation
> will see new problems requiring another disconnect.  Let's just
> get it fixed. :)

For what it's worth, I agree with Alb^Hfred about this. This is
-current after all. :)

-- 
"We will not tire, we will not falter, and we will not fail."
- George W. Bush, President of the United States
  September 20, 2001

 Do YOU Yahoo!?



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-02 Thread Riccardo Torrini

On 02-Nov-2001 (12:58:55/GMT) Cyrille Lefevre wrote:

>>> because `echo' nicely removes \n's from env vars when it prints them.

>> des@des ~% foo='bar
>> quote> baz'
>> des@des ~% echo $foo
>> bar
>> baz
>> des@des ~% /bin/echo $foo
>> bar
>> baz

> humm! what shell ($SHELL) are you using ?

Here (5.0-CURRENT 31-Oct and 4.4-STABLE 12-Oct), with /bin/sh works fine:
% /bin/sh

# foobar="foo
> bar"
# echo $foobar
foo bar

# echo $SHELL
/bin/sh


Riccardo.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-02 Thread Cyrille Lefevre

Dag-Erling Smorgrav wrote:
> "David O'Brien" <[EMAIL PROTECTED]> writes:
> > because `echo' nicely removes \n's from env vars when it prints them.
> 
> des@des ~% foo='bar
> quote> baz'
> des@des ~% echo $foo
> bar
> baz
> des@des ~% /bin/echo $foo
> bar
> baz
> 
> DES
> -- 
> Dag-Erling Smorgrav - [EMAIL PROTECTED]

humm! what shell ($SHELL) are you using ?

Cyrille.
-- 
Cyrille Lefevre mailto:[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread David O'Brien

On Fri, Nov 02, 2001 at 04:44:12AM +0300, Andrey A. Chernov wrote:
> Next bad thing discovered about new awk just looking at sourse code: it
> not support locale (collating in regexp ranges too, of course). We just
> make great backward step switching to it.

I have a patch for that.

-- 
-- David  ([EMAIL PROTECTED])

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread Andrey A. Chernov

On Thu, Nov 01, 2001 at 11:42:13 -0800, David O'Brien wrote:

> Mostly agreed.  This has not been at all as smooth as I thought it would
> be.  Before going down this path, I would like to see if the current
> state of the world isn't usable.  I think (hope) all the nits are out
> now.   #6 is definately needed if Bell-Labs awk stays.

Next bad thing discovered about new awk just looking at sourse code: it
not support locale (collating in regexp ranges too, of course). We just
make great backward step switching to it.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread David O'Brien

On Thu, Nov 01, 2001 at 09:42:18PM +0200, Sheldon Hearn wrote:
> > Although I admit the fallout has been somewhat painful, let's
> > try to make do with it, if we disconnect the new awk I feel
> > that we will keep repeating this cycle, basically each activation
> > will see new problems requiring another disconnect.  Let's just
> > get it fixed. :)
> 
> But David's not getting it fixed.  He's adjusting our awk source to work
> with the non-conformant bwk-awk, which doesn't solve the problem.

It gets us back to a usable system, in which we have time to look into
the issues.  Getting the system usable is 1st priorty over cleaniness.
 
-- 
-- David  ([EMAIL PROTECTED])

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread Sheldon Hearn



On Thu, 01 Nov 2001 13:31:04 CST, Alfred Perlstein wrote:

> Although I admit the fallout has been somewhat painful, let's
> try to make do with it, if we disconnect the new awk I feel
> that we will keep repeating this cycle, basically each activation
> will see new problems requiring another disconnect.  Let's just
> get it fixed. :)

But David's not getting it fixed.  He's adjusting our awk source to work
with the non-conformant bwk-awk, which doesn't solve the problem.

Ciao,
Sheldon.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread David O'Brien

On Thu, Nov 01, 2001 at 09:23:12PM +0200, Sheldon Hearn wrote:
> > No, awk should be fixed instead to conform POSIX specs, or switched back
> > to gawk.
> 
> It's not a binary decision.  What we should probably do is:
> 
> 1) Disconnect bwk-awk from the build.
> 2) Connect gawk to the build.
> 3) Fix bwk-awk and / or in-tree scripts that rely on gawkisms.
> 4) Disconnect gawk from the build.
> 5) Connect bwk-awk to the build.
> 6) Issue a fat HEADS UP to -current (and probably -ports).

Mostly agreed.  This has not been at all as smooth as I thought it would
be.  Before going down this path, I would like to see if the current
state of the world isn't usable.  I think (hope) all the nits are out
now.   #6 is definately needed if Bell-Labs awk stays.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread Alfred Perlstein

* Sheldon Hearn <[EMAIL PROTECTED]> [011101 13:27] wrote:
> 
> 
> On Thu, 01 Nov 2001 22:08:36 +0300, "Andrey A. Chernov" wrote:
> 
> > No, awk should be fixed instead to conform POSIX specs, or switched back
> > to gawk.
> 
> It's not a binary decision.  What we should probably do is:
> 
> 1) Disconnect bwk-awk from the build.
> 
> 2) Connect gawk to the build.
> 
> 3) Fix bwk-awk and / or in-tree scripts that rely on gawkisms.
> 
> 4) Disconnect gawk from the build.
> 
> 5) Connect bwk-awk to the build.
> 
> 6) Issue a fat HEADS UP to -current (and probably -ports).

Although I admit the fallout has been somewhat painful, let's
try to make do with it, if we disconnect the new awk I feel
that we will keep repeating this cycle, basically each activation
will see new problems requiring another disconnect.  Let's just
get it fixed. :)

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
   http://www.morons.org/rants/gpl-harmful.php3

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread Andrey A. Chernov

On Thu, Nov 01, 2001 at 11:04:13 -0800, David Wolfskill wrote:
> 
> Circumvention is to use /boot/loader.old, if it was built with gawk, or
> somehow build a new "loader" after applying a patch that accomplishes
> what this one does:
>  #
> -# Note! This script uses strftime() which is a gawk-ism, and the
> -# POSIX [[:space:]] character class.

No, awk should be fixed instead to conform POSIX specs, or switched back
to gawk.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread David Wolfskill

This is a quick heads-up.

If you have built -CURRENT within the last couple of days, and if you try
to use that (recently-built -CURRENT) as the host system for building
-CURRENT, the 3 patches I posted last night do appear to get through
the build process, but the result is a system that does not boot.

I was just recently able to hit "Pause" on the keyboard at just the
right moment to see that a message is issued very early in the boot
process:

name not found
Assertion failed: (FALSE), funtion ficlCompileSoftCore, file softcor

[and that appears to be where I hit Pause].

My *very* strong suspicion is that there are portions of the ficl build
that use awk constructs that recent -CURRENT awk now treats differently,
and usually silently.

I will investigate and see what I can turn up for causes & fixes.

More later,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-11-01 Thread Dag-Erling Smorgrav

"David O'Brien" <[EMAIL PROTECTED]> writes:
> because `echo' nicely removes \n's from env vars when it prints them.

des@des ~% foo='bar
quote> baz'
des@des ~% echo $foo
bar
baz
des@des ~% /bin/echo $foo
bar
baz

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage during "make depend" at usr.bin/kdump

2001-10-31 Thread David Wolfskill

>Date: Wed, 31 Oct 2001 08:34:16 -0800 (PST)
>From: David Wolfskill <[EMAIL PROTECTED]>

>mkdep -f .depend -a-I/usr/obj/usr/src/i386/usr/include  /usr/src/usr.bin/jot/jot.c
>cd /usr/src/usr.bin/jot; make _EXTRADEPEND
>echo jot: /usr/obj/usr/src/i386/usr/lib/libc.a  >> .depend
>===> usr.bin/kdump
>sh /usr/src/usr.bin/kdump/mkioctls /usr/obj/usr/src/i386/usr/include > ioctl.c
>awk: newline in string #include ...

>Stop in /usr/src/usr.bin/kdump.
>*** Error code 1

> However, in reviewing that
>log, I didn't see the awk complaints ("awk: newline in string #include
>At this stage, I'll welcome pointers/suggestions while I do some
>research on my own.

By breaking down the parts of the pipeline in src/usr.bin/kdump/mkioctls,
it looks as if the problem is that the (shell) variable ioctl_includes
is being set to a list of #include directives, one per line, such as:

#include 
#include 
#include 
#include 
#include 
...

That shell variable is being used to set the value of a similarly-named
awk variable:

awk -v ioctl_includes="$ioctl_includes" -v use_switch="$use_switch" '

And awk does *not* seem to like having embedded newline characters in 
there.


By generating the output to a separate file, the replacing each "real
newline" with a C/awk/Perl representation thereof (i.e., "\n"), I was
able to get the awk part of the pipeline to terminate with a status of
0, while generating what looks like reasonable output (though I'm hardly
an expert on that).

If there is a way to tell awk to "quit whining and *like* the newlines",
that would seem to be ideal.  Failing that, I can work up some way to
transmogrify the #include list so awk will like it better

Am I really the only one who has seen this?

Cheers,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage in pim6sd

2000-07-06 Thread Hajimu UMEMOTO

> On Thu, 6 Jul 2000 15:49:27 +0200
> Ollivier Robert <[EMAIL PROTECTED]> said:

roberto> /src/src/usr.sbin/pim6sd/cftoken.l:47: y.tab.h: No such file or directory
roberto> mkdep: compile failed
roberto> *** Error code 1

Thank you for reporting.
I just fixed.

Index: Makefile
===
RCS file: /home/ncvs/src/usr.sbin/pim6sd/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile2000/07/06 01:48:00 1.4
+++ Makefile2000/07/06 18:13:29
@@ -84,6 +84,7 @@
 y.tab.h: cfparse.y
 CLEANFILES+= lex.yy.c y.tab.h y.tab.c
 CFLAGS+=-Wall
+CFLAGS+=-I. -I${.CURDIR}
 CFLAGS+=-DINET6 -DPIM -DIOCTL_OK_ON_RAW_SOCKET -DHAVE_GETIFADDRS
 CFLAGS+=-DHAVE_STDARG_H
 DPADD= ${LIBY} ${LIBL}

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
http://www.imasy.org/~ume/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage in getconf

2000-04-27 Thread Garrett Wollman

< said:

> Was this not ``make buildworld'' tested, or is there a change to
> gnu/usr.bin/gperf/Makefile you forgot to commit?
 
I am obviously *way* out of date with the state of the build
system I was trying to quickly get things back working again for
upgrade builds, and ended up breaking everything sigh

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
[EMAIL PROTECTED]  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage in getconf

2000-04-27 Thread David O'Brien

On Thu, Apr 27, 2000 at 12:46:43PM -0400, Garrett Wollman wrote:
> I got caught out by gperf version skew.  gperf is now a build-tool (as
> it should always have been) so this problem should be fixed in your
> next update.

cc  -pipe -O -DSHELL -I. -I/FBSD/src/bin/sh -Wall -Wformat-static
mksyntax.o  -o mksyntax
cd /FBSD/src/gnu/usr.bin/gperf; make build-tools
make: don't know how to make build-tools. Stop
*** Error code 2

Stop in /FBSD/src.
*** Error code 1

Stop in /FBSD/src.
*** Error code 1


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage in getconf

2000-04-27 Thread David O'Brien

On Thu, Apr 27, 2000 at 12:46:43PM -0400, Garrett Wollman wrote:
> I got caught out by gperf version skew.  gperf is now a build-tool (as
> it should always have been) so this problem should be fixed in your
> next update.

Was this not ``make buildworld'' tested, or is there a change to
gnu/usr.bin/gperf/Makefile you forgot to commit?
 
- 
-- David([EMAIL PROTECTED])


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: buildworld breakage (netstat/route.c rev 1.43)

2000-04-23 Thread Will Andrews

On Sun, Apr 23, 2000 at 06:44:51PM -0400, Will Andrews wrote:
> If Mark or Garrett could fix this ASAP that would be nice. :)

Never mind, this was an oversight on my part.

-- 
Will Andrews <[EMAIL PROTECTED]>
GCS/E/S @d- s+:+>+:- a--->+++ C++ UB P+ L- E--- W+++ !N !o ?K w---
?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++> DI+++ D+ 
G++>+++ e-> h! r-->+++ y?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Buildworld Breakage

2000-01-12 Thread Jason Evans

On Wed, Jan 12, 2000 at 11:16:38AM -0800, Jason Evans wrote:
> On Wed, Jan 12, 2000 at 02:57:41PM +0100, Pascal Hofstee wrote:
> > With my CURRENT-tre updated within an hour ago ... Buildworld is broken.
> > 
> > cc -O -pipe -DFREEBSD_NATIVE -DIN_GCC -DHAVE_CONFIG_H
> > -DDEFAULT_TARGET_VERSION=\ "2.95.2\"
> > -DDEFAULT_TARGET_MACHINE=\"i386-unknown-freebsd\"
> > -DPREFIX=\"/usr/obj/usr/src/i386/usr\"
> > -I/usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_tools
> > -I/usr/src/gnu/usr.bin/cc/cpp/../cc_tools
> > -I/usr/src/gnu/usr.bin/cc/cpp/../../ ../../contrib/gcc
> > -I/usr/src/gnu/usr.bin/cc/cpp/../../../../contrib/gcc/config
> > -I/usr/obj/usr/src/i386/usr/include  -o cpp gcc.o cppspec.o
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_drv/libcc_drv.a
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_fbsd/libcc_fbsd.a
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_drv/libcc_drv.a(choose-te
> > mp.o): In function `choose_temp_base':
> > choose-temp.o(.text+0x13e): warning: mktemp() possibly used unsafely;
> > consider using mkstemp()
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_fbsd/libcc_fbsd.a(mktemp.
> > o): In function `mktemp':
> > mktemp.o(.text+0x1e1): undefined reference to `_libc_open'
> > *** Error code 1
> > Stop in /usr/src/gnu/usr.bin/cc/cpp.
> > *** Error code 1
> > Stop in /usr/src/gnu/usr.bin/cc.
> > *** Error code 1
> 
> This looks like possible breakage related to the changes to libc that I
> committed early this morning.  The thing is, I successfully built the world
> with those changes in place.  It may be that you got a partial update of
> the ~150 files that the changes touched in libc and libc_r.

Okay, this is a bootstrapping issue.  I didn't run into it because I
manually installed libc during testing, before doing a buildworld.

Doing the following before a buildworld should allow the buildworld to
complete:

cd /usr/src/lib/libc
make
make install

Then buildworld.

I'm not very well versed in the buildworld bootstrapping, so any help in
fixing this the right way would be appreciated.

Jason


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Buildworld Breakage

2000-01-12 Thread Pascal Hofstee

On Wed, Jan 12, 2000 at 11:16:38AM -0800, Jason Evans wrote:
> On Wed, Jan 12, 2000 at 02:57:41PM +0100, Pascal Hofstee wrote:
> > With my CURRENT-tre updated within an hour ago ... Buildworld is broken.
> > 
> > cc -O -pipe -DFREEBSD_NATIVE -DIN_GCC -DHAVE_CONFIG_H
> > -DDEFAULT_TARGET_VERSION=\ "2.95.2\"
> > -DDEFAULT_TARGET_MACHINE=\"i386-unknown-freebsd\"
> > -DPREFIX=\"/usr/obj/usr/src/i386/usr\"
> > -I/usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_tools
> > -I/usr/src/gnu/usr.bin/cc/cpp/../cc_tools
> > -I/usr/src/gnu/usr.bin/cc/cpp/../../ ../../contrib/gcc
> > -I/usr/src/gnu/usr.bin/cc/cpp/../../../../contrib/gcc/config
> > -I/usr/obj/usr/src/i386/usr/include  -o cpp gcc.o cppspec.o
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_drv/libcc_drv.a
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_fbsd/libcc_fbsd.a
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_drv/libcc_drv.a(choose-te
> > mp.o): In function `choose_temp_base':
> > choose-temp.o(.text+0x13e): warning: mktemp() possibly used unsafely;
> > consider using mkstemp()
> > /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_fbsd/libcc_fbsd.a(mktemp.
> > o): In function `mktemp':
> > mktemp.o(.text+0x1e1): undefined reference to `_libc_open'
> > *** Error code 1
> > Stop in /usr/src/gnu/usr.bin/cc/cpp.
> > *** Error code 1
> > Stop in /usr/src/gnu/usr.bin/cc.
> > *** Error code 1
> 
> This looks like possible breakage related to the changes to libc that I
> committed early this morning.  The thing is, I successfully built the world
> with those changes in place.  It may be that you got a partial update of
> the ~150 files that the changes touched in libc and libc_r.

This breakage has occurred for 3 consecutive buildworlds now with several
Hours between each build. I doubt this is  a "halfway through a commit"
bustage.

-- 

  Pascal Hofstee - [EMAIL PROTECTED]

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCS d- s+: a-- C++ UB P+ L- E--- W- N+ o? K- w--- O? M V? PS+ PE Y-- PGP--
t+ 5 X-- R tv+ b+ DI D- G e* h+ r- y+
--END GEEK CODE BLOCK--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Buildworld Breakage

2000-01-12 Thread Jason Evans

On Wed, Jan 12, 2000 at 02:57:41PM +0100, Pascal Hofstee wrote:
> With my CURRENT-tre updated within an hour ago ... Buildworld is broken.
> 
> cc -O -pipe -DFREEBSD_NATIVE -DIN_GCC -DHAVE_CONFIG_H
> -DDEFAULT_TARGET_VERSION=\ "2.95.2\"
> -DDEFAULT_TARGET_MACHINE=\"i386-unknown-freebsd\"
> -DPREFIX=\"/usr/obj/usr/src/i386/usr\"
> -I/usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_tools
> -I/usr/src/gnu/usr.bin/cc/cpp/../cc_tools
> -I/usr/src/gnu/usr.bin/cc/cpp/../../ ../../contrib/gcc
> -I/usr/src/gnu/usr.bin/cc/cpp/../../../../contrib/gcc/config
> -I/usr/obj/usr/src/i386/usr/include  -o cpp gcc.o cppspec.o
> /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_drv/libcc_drv.a
> /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_fbsd/libcc_fbsd.a
> /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_drv/libcc_drv.a(choose-te
> mp.o): In function `choose_temp_base':
> choose-temp.o(.text+0x13e): warning: mktemp() possibly used unsafely;
> consider using mkstemp()
> /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_fbsd/libcc_fbsd.a(mktemp.
> o): In function `mktemp':
> mktemp.o(.text+0x1e1): undefined reference to `_libc_open'
> *** Error code 1
> Stop in /usr/src/gnu/usr.bin/cc/cpp.
> *** Error code 1
> Stop in /usr/src/gnu/usr.bin/cc.
> *** Error code 1

This looks like possible breakage related to the changes to libc that I
committed early this morning.  The thing is, I successfully built the world
with those changes in place.  It may be that you got a partial update of
the ~150 files that the changes touched in libc and libc_r.

Jason


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Buildworld Breakage

2000-01-12 Thread Donn Miller

On Wed, 12 Jan 2000, Pascal Hofstee wrote:

> With my CURRENT-tre updated within an hour ago ... Buildworld is broken.

[snip]

> /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/cc/cpp/../cc_fbsd/libcc_fbsd.a(mktemp.
> o): In function `mktemp':
> mktemp.o(.text+0x1e1): undefined reference to `_libc_open'
> *** Error code 1
> Stop in /usr/src/gnu/usr.bin/cc/cpp.
> *** Error code 1
> Stop in /usr/src/gnu/usr.bin/cc.
> *** Error code 1

Yep, I get the same exact thing.

- Donn



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message