NetBSD-Bugs archive

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

kern/38766: breaks build if mawk is used

>Number:         38766
>Category:       kern
>Synopsis: 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)
Teleca Finland Oy
Linux <smth> 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007 x86_64 

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 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/$ echo | awk '{ print "\$NetBSD\$\n" }'

andy@~/prj/netbsd/$ 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/$ echo | awk '{ print "\$NetBSD\$\n" }'
awk: warning: escape sequence `\$' treated as plain `$'

andy@~/prj/netbsd/$ 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.
Just use non-gawk distribution of awk in the host system.

There is a quick fix:

Home | Main Index | Thread Index | Old Index