NetBSD Problem Report #33506
From collver@peak.org Thu May 18 04:47:06 2006
Return-Path: <collver@peak.org>
Received: from mail01.peak.org (a.mail.peak.org [69.59.192.41])
by narn.NetBSD.org (Postfix) with ESMTP id B80BF63B872
for <gnats-bugs@gnats.NetBSD.org>; Thu, 18 May 2006 04:47:06 +0000 (UTC)
Message-Id: <20060518044656.734A62B5F18@sanctum.terrorpin.net>
Date: Wed, 17 May 2006 21:46:56 -0700 (PDT)
From: collver@peak.org
Reply-To: collver@peak.org
To: gnats-bugs@NetBSD.org
Subject: libgnome build broke on msgfmt
X-Send-Pr-Version: 3.95
>Number: 33506
>Category: pkg
>Synopsis: libgnome build broke on msgfmt
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 18 04:50:00 +0000 2006
>Closed-Date: Sat May 20 23:32:59 +0000 2006
>Last-Modified: Sat May 20 23:32:59 +0000 2006
>Originator: collver@peak.org
>Release: NetBSD 3.0
>Organization:
>Environment:
System: NetBSD sanctum 3.0 NetBSD 3.0 (SANCTUM) #1: Sat May 13 08:53:42 PDT 2006 ben@sanctum:/home/ben/src/netbsd/3.0/src/sys/arch/i386/compile/SANCTUM i386
Architecture: i386
Machine: i386
>Description:
Building devel/libgnome from pkgsrc-current on NetBSD/i386 3.0 in
pkg_comp, I get this failure:
file=`echo fa | sed 's,.*/,,'`.gmo \
&& rm -f $file && /pkg_comp/obj/pkgsrc/devel/libgnome/default/.tools/bin/msgfmt -o $file fa.po
<stdin>:832: parse error
<stdin>:894: parse error
found 2 fatal errors
gmake[2]: *** [fa.gmo] Error 1
gmake[2]: Leaving directory `/pkg_comp/obj/pkgsrc/devel/libgnome/default/libgnome-2.14.1/po'
>How-To-Repeat:
>Fix:
This patch fixes the problem for me, although I am not certain it is correct.
It may be more correct to fix gettext.
http://terrorpin.net/~ben/docs/comp/os/netbsd/pkgsrc/libgnome.diff
>Release-Note:
>Audit-Trail:
From: Johnny Lam <jlam@pkgsrc.org>
To: collver@peak.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/33506: libgnome build broke on msgfmt
Date: Thu, 18 May 2006 10:04:22 -0400
collver@peak.org wrote:
>> Description:
> Building devel/libgnome from pkgsrc-current on NetBSD/i386 3.0 in
> pkg_comp, I get this failure:
>
> file=`echo fa | sed 's,.*/,,'`.gmo \
> && rm -f $file && /pkg_comp/obj/pkgsrc/devel/libgnome/default/.tools/bin/msgfmt -o $file fa.po
> <stdin>:832: parse error
> <stdin>:894: parse error
> found 2 fatal errors
> gmake[2]: *** [fa.gmo] Error 1
> gmake[2]: Leaving directory `/pkg_comp/obj/pkgsrc/devel/libgnome/default/libgnome-2.14.1/po'
>> How-To-Repeat:
>> Fix:
> This patch fixes the problem for me, although I am not certain it is correct.
> It may be more correct to fix gettext.
>
> http://terrorpin.net/~ben/docs/comp/os/netbsd/pkgsrc/libgnome.diff
The format for .po files is that "msgid" and "msgstr" must be followed
by a character string on the same line. This rule is enforced by the
Solaris msgfmt, but not by the GNU one. Your patch would appear to be
correct, and I think you should feed it back upstream to the libgnome folks.
Cheers,
-- Johnny Lam <jlam@pkgsrc.org>
From: Ben Collver <collver@peak.org>
To: Johnny Lam <jlam@pkgsrc.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/33506: libgnome build broke on msgfmt
Date: Thu, 18 May 2006 07:37:07 -0700
On Thu, May 18, 2006 at 10:04:22AM -0400, Johnny Lam wrote:
> The format for .po files is that "msgid" and "msgstr" must be followed
> by a character string on the same line. This rule is enforced by the
> Solaris msgfmt, but not by the GNU one. Your patch would appear to be
> correct, and I think you should feed it back upstream to the libgnome folks.
I submitted a problem report upstream.
http://bugzilla.gnome.org/show_bug.cgi?id=342256
Ben
From: Ben Collver <collver@peak.org>
To: Johnny Lam <jlam@pkgsrc.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/33506: libgnome build broke on msgfmt
Date: Fri, 19 May 2006 14:00:17 -0700
The response from the Gnome folks is that the msgstr does not
necessarily need to be followed by a character string on the same line.
Here is the response:
"The PO format specification, in the GNU gettext manual, does not say
that the msgstr keyword and the string that follows it must be on the
same line. Your
/pkg_comp/obj/pkgsrc/devel/libgnome/default/.tools/bin/msgfmt program
rejects a valid PO file. What version of msgfmt is it? What does
"/pkg_comp/obj/pkgsrc/devel/libgnome/default/.tools/bin/msgfmt --version"
yield?
The GNU AM_PO_SUBDIRS macro (in po.m4) makes sure to not use the Solaris
and FreeBSD 'msgfmt' programs. Are you using this macro?"
By the way, for my system it says:
$ ./.tools/bin/msgfmt --version
msgfmt (GNU gettext) 0.10.35
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
So this appears to be behaviour introduced by the wrapper scripts.
Cheers,
Ben
From: Johnny Lam <jlam@pkgsrc.org>
To: collver@peak.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/33506: libgnome build broke on msgfmt
Date: Fri, 19 May 2006 17:37:50 -0400
Ben Collver wrote:
>
> The response from the Gnome folks is that the msgstr does not
> necessarily need to be followed by a character string on the same line.
> Here is the response:
>
> "The PO format specification, in the GNU gettext manual, does not say
> that the msgstr keyword and the string that follows it must be on the
> same line. Your
> /pkg_comp/obj/pkgsrc/devel/libgnome/default/.tools/bin/msgfmt program
> rejects a valid PO file. What version of msgfmt is it? What does
> "/pkg_comp/obj/pkgsrc/devel/libgnome/default/.tools/bin/msgfmt --version"
> yield?
I believe they are misreading the GNU gettext manual. I will quote
directly from section 2.2 of the gettext info file, titled "The Format
of PO Files":
msgid ""
"Here is an example of how one might continue a very long string\n"
"for the common case the string represents multi-line output.\n"
In this example, the empty string is used on the first line, to allow
better alignment of the `H' from the word `Here' over the `f' from the
word `for'. In this example, the `msgid' keyword is followed by three
strings, which are meant to be concatenated. Concatenating the empty
string does not change the resulting overall string, but it is a way
for us to comply with the necessity of `msgid' to be followed by a
string on the same line, while keeping the multi-line presentation
left-justified, as we find this to be a cleaner disposition. The
empty string could have been omitted, but only if the string starting
with `Here' was promoted on the first line, right after `msgid'.(1)
And footnote (1) states:
(1) This limitation is not imposed by GNU `gettext', but is for
compatibility with the `msgfmt' implementation on Solaris.
My belief is that they are not adhering to the correct syntax for PO
files by relying on a GNU relaxation of the rules.
> The GNU AM_PO_SUBDIRS macro (in po.m4) makes sure to not use the Solaris
> and FreeBSD 'msgfmt' programs. Are you using this macro?"
>
>
> By the way, for my system it says:
>
> $ ./.tools/bin/msgfmt --version
> msgfmt (GNU gettext) 0.10.35
> Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Ulrich Drepper.
>
> So this appears to be behaviour introduced by the wrapper scripts.
Yes, I don't disagree that this is behavior is introduced by the wrapper
scripts. However, the wrapper scripts were written to follow the format
specified in the gettext info file and clarified in the examples within
that file. I am considering changing it to allow the GNU syntax, but I
still think that libgnome should allow for alternative gettext
implementations to be used.
Cheers,
-- Johnny Lam <jlam@pkgsrc.org>
From: Ben Collver <collver@peak.org>
To: Johnny Lam <jlam@pkgsrc.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/33506: libgnome build broke on msgfmt
Date: Sat, 20 May 2006 09:16:30 -0700
More feedback from the Gnome side:
Solaris 10 msgfmt actually gives only a warning when the "" on the line
after msgid is omitted. Any tool that gives an error on it is therefore
more picky than necessary.
You better remove that version of msgfmt from your disk immediately.
Version 0.10.35 of msgfmt does not support CJK encoded PO files;
actually for Big5 or Shift_JIS encoded PO files it produces wrong .mo
files. This is why this version is no longer available from ftp.gnu.org.
You better use gettext 0.10.40 or newer!!!
From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/33506 CVS commit: pkgsrc/mk/tools
Date: Sat, 20 May 2006 23:29:42 +0000 (UTC)
Module Name: pkgsrc
Committed By: jlam
Date: Sat May 20 23:29:42 UTC 2006
Modified Files:
pkgsrc/mk/tools: msgfmt.sh
Log Message:
Modify msgfmt.sh to make the following changes when filtering *.po files:
msgid -> msgid ""
msgid"..." -> msgid "..."
msgstr -> msgstr ""
msgstr"..." -> msgstr "..."
The filtered *.po files can then be processed by msgfmt<=0.10.35.
These changes workaround bugs in *.po files in software of the "all
the world runs Linux" variety where the software author either willfully
or stupidly can't follow the format for *.po files described in section
2.2 of the gettext info manual and, in addition, makes lame excuses
when confronted with the evidence.
This closes PR pkg/33506 by Ben Collver.
To generate a diff of this commit:
cvs rdiff -r1.18 -r1.19 pkgsrc/mk/tools/msgfmt.sh
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: jlam@netbsd.org
State-Changed-When: Sat, 20 May 2006 23:32:59 +0000
State-Changed-Why:
msgfmt.sh has been modified to handle these problematic *.po files.
Thanks for the PR and the patch, which pointed the way to the
implemented solution.
>Unformatted:
(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.