GNOME Bugzilla – Bug 366203
error building using mawk
Last modified: 2008-10-12 16:45:59 UTC
jhbuild spotted an error in building gnome-doc-utils: http://jhbuild.bxlug.be/builds/2006-10-28-0001/logs/gnome-doc-utils/#build mawk: ./xsldoc.awk: line 57: syntax error at or near , mawk: ./xsldoc.awk: line 76: syntax error at or near else mawk: ./xsldoc.awk: line 77: return outside function body mawk: ./xsldoc.awk: line 79: syntax error at or near } I am no awk expert and fixed this by switching from mawk to gawk (looks like match() has no third argument in mawk). This is on Debian unstable, with mawk 1.3.3 and gawk 3.1.5.
Damn, I knew I'd end up using a GNUism. It looks like I'll just have to rewrite things not to use the three-argument form. That's a hassle, but it's not hard.
Could we have a revert please? This is a build blocker. I tried to fix it myself, but I don't understand what xsldoc.awk is doing. match is documented here: http://www.gnu.org/software/gawk/manual/gawk.html#String-Functions
Disregard comment 2, I got it to build by installing gawk, and using that instead of mawk. Ubuntu (edgy) uses mawk by default, FYI.
I've removed the use of the three-argument form of match and used only what I believe to be portable awk routines: http://cvs.gnome.org/viewcvs/gnome-doc-utils/doc/xslt/xsldoc.awk?r1=1.1&r2=1.2 I don't have any other versions of awk, but I did check this with 'gawk --compat', so it should be OK. Please test with mawk and respond.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!