NetBSD Problem Report #23514

Received: (qmail 12293 invoked by uid 605); 20 Nov 2003 20:50:56 -0000
Message-Id: <20031120205056.25EC711153@narn.netbsd.org>
Date: Thu, 20 Nov 2003 20:50:56 +0000 (UTC)
From: v.oostveen@hccnet.nl
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: v.oostveen@hccnet.nl
To: gnats-bugs@gnats.NetBSD.org
Subject: pkgsrc/irx: xmlcatmgr breaks due to using sgi version of awk
X-Send-Pr-Version: www-1.0

>Number:         23514
>Category:       pkg
>Synopsis:       pkgsrc/irx: xmlcatmgr breaks due to using sgi version of awk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jmmv
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 20 20:51:00 +0000 2003
>Closed-Date:    Thu Dec 04 04:36:55 +0000 2003
>Last-Modified:  Thu Dec 04 04:37:00 +0000 2003
>Originator:     Bas van Oostveen
>Release:        pkgsrc for irix
>Organization:
na
>Environment:
IRIX Washu 6.5 6.5.19m IP32
>Description:
when trying to compile scrollkeeper on pkgsrc for irix
i encounterd a docbook-xml error.

turns out that my catalog files where empty and xmlcatmgr
produced 2 warning when installing docbook-xml onto the system

xmlcatmgr uses a hardcoded path to awk (/usr/bin/awk) which
resolves to the SGI Irix version of awk. This version is incompatible
with the awk scripts used by xmlcatmgr.

the fix is to use another version of awk (gawk) on irix systems.
does changing the path in /usr/pkg/bin/xmlcatmgr

a better solution would be if xmlcatmgr would use the 'best' awk provided on the system and in anycase not versions which are the broken with xmlcatmgr.

that would also fix problems with other systems where
/usr/bin/awk is incompatible with xmlcatmgr.

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:

From: "Jeremy C. Reed" <reed@reedmedia.net>
To: v.oostveen@hccnet.nl
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: pkg/23514: pkgsrc/irx: xmlcatmgr breaks due to using sgi version
 of awk
Date: Thu, 20 Nov 2003 13:00:05 -0800 (PST)

 On Thu, 20 Nov 2003 v.oostveen@hccnet.nl wrote:

 > xmlcatmgr uses a hardcoded path to awk (/usr/bin/awk) which

 It is defined at package build time. It uses the ${AWK} as defined on your
 system.

 > resolves to the SGI Irix version of awk. This version is incompatible
 > with the awk scripts used by xmlcatmgr.

 I had problems too when using mawk. Recently the script was improved for
 working with gawk and mawk.

 Maybe it can be improved more to work with your AWK too.

 > the fix is to use another version of awk (gawk) on irix systems.
 > does changing the path in /usr/pkg/bin/xmlcatmgr

 Does your IRIX come with gawk by default?

 I wonder if mk/defs.IRIX.mk should point to that gawk (for AWK) instead.

    Jeremy C. Reed
    http://bsd.reedmedia.net/

Responsible-Changed-From-To: pkg-manager->jmmv 
Responsible-Changed-By: jmmv 
Responsible-Changed-When: Thu Nov 20 21:19:46 UTC 2003 
Responsible-Changed-Why:  
I'll handle this one, as xmlcatmgr is mine ;) 

From: "Julio M. Merino Vidal" <jmmv@menta.net>
To: v.oostveen@hccnet.nl, gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: Re: pkg/23514: pkgsrc/irx: xmlcatmgr breaks due to using sgi version of awk
Date: Thu, 20 Nov 2003 22:19:32 +0100

 On Thursday 20 November 2003 21:50, v.oostveen@hccnet.nl wrote:
 > >Number:         23514
 > >Category:       pkg
 > >Synopsis:       pkgsrc/irx: xmlcatmgr breaks due to using sgi version of
 > > awk Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Nov 20 20:51:00 UTC 2003
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Bas van Oostveen
 > >Release:        pkgsrc for irix
 > >Organization:
 >
 > na
 >
 > >Environment:
 >
 > IRIX Washu 6.5 6.5.19m IP32
 >
 > >Description:
 >
 > when trying to compile scrollkeeper on pkgsrc for irix
 > i encounterd a docbook-xml error.
 >
 > turns out that my catalog files where empty and xmlcatmgr
 > produced 2 warning when installing docbook-xml onto the system
 >
 > xmlcatmgr uses a hardcoded path to awk (/usr/bin/awk) which
 > resolves to the SGI Irix version of awk. This version is incompatible
 > with the awk scripts used by xmlcatmgr.

 Please provide a more detailed description of what you mean by
 "incompatible" (i.e., some test commands and the resulting messages,
 generated files, etc).  I would like to fix xmlcatmgr to use compatible
 constructions if possible (like was done with Solaris awk) across several
 awk flavours.

 > a better solution would be if xmlcatmgr would use the 'best' awk provided
 > on the system and in anycase not versions which are the broken with
 > xmlcatmgr.

 xmlcatmgr uses the awk that pkgsrc thinks is better, which for IRIX is
 /usr/bin/awk (see pkgsrc/mk/defs.IRIX.mk).  If it appears to be too much
 incompatible, we can tweak the package to use a different awk (gawk or
 nawk) directly.

 Thanks.

 -- 
 Julio M. Merino Vidal <jmmv@menta.net>
 The NetBSD Project - http://www.NetBSD.org/


From: "Julio M. Merino Vidal" <jmmv@menta.net>
To: Bas van Oostveen <v.oostveen@hccnet.nl>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/23514: pkgsrc/irx: xmlcatmgr breaks due to using sgi version of awk
Date: Fri, 21 Nov 2003 13:50:44 +0100

 --Boundary-00=_kogv/5Wlg4+3wsL
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

 On Thursday 20 November 2003 22:33, Bas van Oostveen wrote:
 > > Please provide a more detailed description of what you mean by
 > > "incompatible" (i.e., some test commands and the resulting messages,
 > > generated files, etc).  I would like to fix xmlcatmgr to use compatible
 > > constructions if possible (like was done with Solaris awk) across several
 > > awk flavours.
 >
 > as i explained to Jeremy, i do not know much about awk but here's the
 > error message:
 >
 > Cannot open -: No such file or directory
 > Source line number 1
 > Context is
 >
 >         >>>  <<<

 I've attached a patch that may fix this problem.  To test it, be sure to
 deinstall xmlcatmgr completely (including catalog files in /usr/pkg/etc).
 Then, 'make clean' in the xmlcatmgr directory, 'make extract', cd into
 work/xmlcatmgr-1.1/bin and 'patch < patch.diff'.  After this, build and
 install the package, and see if it's able to register docbook-xml, for
 example.

 If you want some manual testing:
 $ xmlcatmgr -c /tmp/catalog create
 $ xmlcatmgr -c /tmp/catalog add nextCatalog /a/b/c
 and /tmp/catalog should end up with something like:

 <?xml version="1.0"?>
 <!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog 
 V1.0//EN"
         "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">

 <!-- Created by xmlcatmgr-1.1 -->

 <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
   <nextCatalog catalog="/a/b/c" />
 </catalog>

 Thanks.

 PS: Keep gnats-bugs@gnats.netbsd.org as CC, so that we can keep all
 these messages attached to your original PR.

 -- 
 Julio M. Merino Vidal <jmmv@menta.net>
 The NetBSD Project - http://www.NetBSD.org/

 --Boundary-00=_kogv/5Wlg4+3wsL
 Content-Type: text/x-diff;
   charset="iso-8859-1";
   name="patch.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="patch.diff"

 Index: sgml.sh.in
 ===================================================================
 RCS file: /cvsroot/xmlcatmgr/src/bin/sgml.sh.in,v
 retrieving revision 1.8
 diff -u -r1.8 sgml.sh.in
 --- sgml.sh.in	10 Oct 2003 17:38:58 -0000	1.8
 +++ sgml.sh.in	21 Nov 2003 12:43:30 -0000
 @@ -89,7 +89,7 @@

      quotemeta_regex value

 -    @BT_PROG_AWK@ -f - $catalog > $catalog.tmp <<EOF
 +    @BT_PROG_AWK@ -f /dev/stdin $catalog > $catalog.tmp <<EOF
  BEGIN { skip = 0 }

  /--.*--/ {
 Index: xml.sh.in
 ===================================================================
 RCS file: /cvsroot/xmlcatmgr/src/bin/xml.sh.in,v
 retrieving revision 1.6
 diff -u -r1.6 xml.sh.in
 --- xml.sh.in	10 Oct 2003 17:38:58 -0000	1.6
 +++ xml.sh.in	21 Nov 2003 12:43:30 -0000
 @@ -85,7 +85,7 @@

      quotemeta_string entry

 -    @BT_PROG_AWK@ -f - $catalog > $catalog.tmp <<EOF
 +    @BT_PROG_AWK@ -f /dev/stdin $catalog > $catalog.tmp <<EOF
  /<\/catalog>/ {
      print "  $entry"
      print
 @@ -130,7 +130,7 @@

      quotemeta_regex value

 -    @BT_PROG_AWK@ -f - $catalog > $catalog.tmp <<EOF
 +    @BT_PROG_AWK@ -f /dev/stdin $catalog > $catalog.tmp <<EOF
  /\"$value\"/ {
      next
  }

 --Boundary-00=_kogv/5Wlg4+3wsL--


From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/23514 CVS commit: pkgsrc/mk
Date: Thu,  4 Dec 2003 04:33:20 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jschauma
 Date:		Thu Dec  4 04:33:20 UTC 2003

 Modified Files:
 	pkgsrc/mk: tools.mk

 Log Message:
 Congratulations, we've found our first incompatible awk:  Irix!
 Pointed out by Bas van Oostveen in PR pkg/23514.


 To generate a diff of this commit:
 cvs rdiff -r1.15 -r1.16 pkgsrc/mk/tools.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: jschauma 
State-Changed-When: Thu Dec 4 04:35:44 UTC 2003 
State-Changed-Why:  

Fixed by using GNU gawk.  Thanks for the PR. 


From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/23514 CVS commit: pkgsrc/textproc/xmlcatmgr
Date: Thu,  4 Dec 2003 04:35:25 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jschauma
 Date:		Thu Dec  4 04:35:25 UTC 2003

 Modified Files:
 	pkgsrc/textproc/xmlcatmgr: Makefile

 Log Message:
 Use a GNU awk, so that this creates the files correctly.
 Pointed out by Bas van Oostveen in PR pkg/23514.


 To generate a diff of this commit:
 cvs rdiff -r1.9 -r1.10 pkgsrc/textproc/xmlcatmgr/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.