Awk issues: system awk vs [ng]awk in ports

Paul Beard paulbeard at
Thu Mar 22 19:22:17 PDT 2007

Hash: SHA1

On Mar 22, 2007, at 6:38 PM, Randall Wood wrote:

> The problem with gnome-doc-utils is that the upstream maintainers  
> accidently left some code in to force gawk to behave like awk when  
> they shipped it, knowing that on linux, awk = gawk[1]. This port's  
> configure system correctly detects for the presence of gawk, mawk,  
> nawk, and awk (in that order).
> In any event, the next version of gnome-doc-utils will have this  
> fixed, and, in the meantime, the Portfile has this fixed as of  
> changeset 23035[2]. Port sync, port clean gnome-doc-utils, and  
> build again. I did not bump the revision as users with gawk  
> installed would not have noticed this problem.

Not sure if I have the fix yet ( I did the sync/clean/build sequence)  
but this is the result. I removed gawk, since there seem to be no  
dependencies on it. So where does this "awk -W" come from? That is  
not supported in awk, and if configure does its job, it shouldn't  

Making all in xslt
xsltproc -o gnome-doc-xslt-C.omf --stringparam db2omf.basename gnome- 
doc-xslt --stringparam db2omf.format 'docbook' --stringparam  
db2omf.dtd "-//OASIS//DTD DocBook XML V4.4//EN" --stringparam  
db2omf.lang C --stringparam db2omf.omf_dir "/opt/local/share/omf" -- 
stringparam db2omf.help_dir "/opt/local/share/gnome/help" -- 
stringparam db2omf.omf_in "/opt/local/var/db/dports/build/ 
orts_gnome_gnome-doc-utils/work/gnome-doc-utils-0.10.1/doc/xslt/gnome-" --stringparam db2omf.scrollkeeper_cl "`scrollkeeper- 
config --pkgdatadir`/Templates/C/scrollkeeper_cl.xml" ../../xslt/ 
docbook/omf/db2omf.xsl C/gnome-doc-xslt.xml || { rm -f "gnome-doc- 
xslt-C.omf"; exit 1; }
awk: unknown option -W ignored

awk: can't open file  /<\!--BEGIN-->/ { inc=1; } /<\!--END-->/  
{ inc=0; } inc { if (match($0, /<include href="[^"]*\.xml"/)) { base  
= $0; sub(/.*<include href="/, "", base); sub(/\.xml".*/, "", base);  
print base; } }
source line number 1
gnome-doc-xslt.xml does not include all reference pages
make[2]: *** [gnome-doc-xslt-check] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Warning: the following items did not execute (for gnome-doc-utils):
Error: Status 1 encountered during processing.

This is what configure finds:

configure:1552: checking for gawk
configure:1581: result: no
configure:1552: checking for mawk
configure:1581: result: no
configure:1552: checking for nawk
configure:1581: result: noconfigure:1552: checking for awk
configure:1568: found /usr/bin/awk
configure:1578: result: awk

After installing gawk, I get this:
configure:1552: checking for gawk
configure:1568: found /opt/local/bin/gawk
configure:1578: result: gawk

And everything goes just fine from there.

So it's plainly looking for gawk, with it's additional options (POSIX  
or no) and not really handling failure well.

This may not be a big deal in the grand scheme of things, but it's  
really quite frustrating for people like me who don't know why  
something is failing.

- --
Paul Beard
contact info:
Are you trying to win an argument or solve a problem?

Version: GnuPG v1.4.7 (Darwin)


More information about the macports-users mailing list