NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/38766: makesyscalls.sh breaks build if mawk is used



>Number:         38766
>Category:       kern
>Synopsis:       makesyscalls.sh breaks build if mawk is used
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 27 10:00:00 +0000 2008
>Originator:     Andy Shevchenko
>Release:        Current (20080527)
>Organization:
Teleca Finland Oy
>Environment:
Linux <smth> 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007 x86_64 
GNU/Linux

>Description:
I'm building NetBSD in cross-compiled mode under Ubuntu 7.04 Linux.
The build is broken after append of a new system call to kernel stuff.
I've investigated issue.
The embedded awk script in the makesyscalls.sh contains backslashed
(escaped) symbols under single quoted part in the script.
That aren't needed because the backslash symbols are put to output
files for __KERNEL_RCSID() also. In result I've got the strings like 
__KERNEL_RCSID(0, "\$NetBSD\$");

Further investigation shows there is mawk related issue:

andy@~/prj/netbsd/netbsd.se-local$ echo | awk '{ print "\$NetBSD\$\n" }'
\$NetBSD\$

andy@~/prj/netbsd/netbsd.se-local$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits:
max NF             32767
sprintf buffer      2040

After gawk has been installed the test line works like following:

andy@~/prj/netbsd/netbsd.se-local$ echo | awk '{ print "\$NetBSD\$\n" }'
awk: warning: escape sequence `\$' treated as plain `$'
$NetBSD$

andy@~/prj/netbsd/netbsd.se-local$ awk -W version
GNU Awk 3.1.5
Copyright (C) 1989, 1991-2005 Free Software Foundation.
...

So. the issue is depend to awk implementation. My opinion is to fix
NetBSD to be more interportability.
>How-To-Repeat:
Just use non-gawk distribution of awk in the host system.

>Fix:
There is a quick fix:
http://mail-index.netbsd.org/tech-kern/2008/05/27/msg001483.html



Home | Main Index | Thread Index | Old Index