Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2002 18:14:22 +0200 (CEST)
From:      Pierre-Francois LAURAND <pushf@free.fr>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        pushf@free.fr
Subject:   kern/38864: -CURRENT: buildkernel stop in vnode_if.h due to gawk error in /sys/tools/vnode_if.awk
Message-ID:  <200206031614.g53GEMkM072877@astra.laurand.net>

next in thread | raw e-mail | index | archive | help

>Number:         38864
>Category:       kern
>Synopsis:       -CURRENT: buildkernel stop in vnode_if.h due to gawk error in /sys/tools/vnode_if.awk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 03 09:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Pierre-Francois LAURAND
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD curly 5.0-CURRENT FreeBSD 5.0-CURRENT #10: Fri May 17 12:58:55 CEST 2002 root@curly:/usr/obj/usr/src/sys/CURLY i386


>Description:

When trying to build a new -CURRENT kernel with "make KERNCONF=CURLY buildkernel" in /usr/src, the build stops at:

...snip...
cc -c -x assembler-with-cpp -DLOCORE -O2 -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wno-format -ansi  -nostdinc -I-  -I. -I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/../include  -D_KERNEL -ffreestanding -include opt_global.h -fno-common   -mpreferred-stack-boundary=2 -ffreestanding  /usr/src/sys/i386/i386/locore.s
cc -c -O2 -march=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wno-format -ansi  -nostdinc -I-  -I. -I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/../include  -D_KERNEL -ffreestanding -include opt_global.h -fno-common   -mpreferred-stack-boundary=2 -ffreestanding   vnode_if.c
In file included from /usr/src/sys/sys/vnode.h:549,
                 from vnode_if.c:10:
vnode_if.h:17: syntax error before ')' token
vnode_if.h:18: warning: function declaration isn't a prototype
vnode_if.h: In function `VOP_ISLOCKED':
vnode_if.h:22: `vp' undeclared (first use in this function)
vnode_if.h:22: (Each undeclared identifier is reported only once
vnode_if.h:22: for each function it appears in.)
vnode_if.h:23: `td' undeclared (first use in this function)
...snip...

vnode_if.h is automatically produced by /sys/tools/vnode_if.awk in a command line like :
awk -f /usr/src/sys/tools/vnode_if.awk /usr/src/sys/kern/vnode_if.src -h

The output of my -CURRENT awk --version is : GNU Awk 3.1.0.
In the awk script vnode_if.awk, at line 222 in the "print out function" for loop, when i should be 1, it reaches 0.12477970123291015625 (!).
In the others cases, i takes its right value, eg:
i should be 0: i == 0
i should be 1: i == 0.12477970123291015625
i should be 2: i == 2

The output of the script, vnode_if.h, which is rejected by cc, look like:

...snip...
extern struct vnodeop_desc vop_default_desc;
struct vop_islocked_args {
  struct vnodeop_desc *a_desc;
  struct vnode *a_vp;
  struct thread *a_td;
};
extern struct vnodeop_desc vop_islocked_desc;
static __inline int VOP_ISLOCKED(
  struct vnode *vp,
^^^^^^^^^^^^^^^^^^^^^^
  )
{
  struct vop_islocked_args a;
  int rc;
  a.a_desc = VDESC(vop_islocked);
  a.a_vp = vp;
  a.a_td = td;
  rc = VCALL(vp, VOFFSET(vop_islocked), &a);
  return (rc);
}
...snip...

For more detail, you should find my full vnode_if.h and build logs at:
http://laurand.ath.cx/freebsd/

I have tested vnode_if.awk on a 4.5-STABLE with gawk 3.0.6 and it seems to work well.
So, I think that it could be a -CURRENT gawk 3.1.0  bug (?).


>How-To-Repeat:

make buildkernel on -CURRENT with a fresh src three, and gawk 3.1.0

>Fix:

coming back to gawk 3.0.6 :-((



>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206031614.g53GEMkM072877>