Hi!

On Wed, 2024-06-12 at 10:36:52 +0200, Martin Quinson wrote:
> Le mercredi 12 juin 2024 à 04:47 +0200, Guillem Jover a écrit :
> > Package: po4a
> > Version: 0.70
> > Severity: serious

> > When building dpkg, it now fails with something like this:
> > 
> >   ,---
> >   Making check in man
> >   make[1]: Entering directory '<UPDIR>/dpkg/man'
> >   /usr/bin/po4a --previous --srcdir . --destdir . --no-backups --porefs file
> > --msgmerge-opt=--add-location=file --package-name dpkg-man --package-version
> > 1.22.6-80-gec07 --copyright-holder "Dpkg Developers" --msgid-bugs-address
> > debian-d...@lists.debian.org  ./po/po4a.cfg
> >   Undefined subroutine &Locale::Po4a::Pod::dgettext called at
> > /usr/share/perl5/Locale/Po4a/Pod.pm line 94, <$fh> line 21.
> >   make[1]: *** [Makefile:902: man.stamp] Error 255
> >   make[1]: Leaving directory '<UPDIR>/dpkg/man'
> >   `---
> > 
> > It seems the module is missing some import.

> the attached patch could help, but I fail to reproduce the failure in the 
> first
> place. I built dpkg v1.22.6 against po4a v0.72 and it builds with no failure.
> The "Making check in man" section LGTM but I'm not sure of what it should look
> like.

I guess that's because the tarballl has already been bootstrapped. Building
from git should reproduce it. But in any case if that's too cumbersome I'm
happy to keep testing stuff.

> I tried the git version of po4a with git-pbuilder, but it complains about not
> being able to determine whether it's a git or a release build. I must be
> missing some config on my side.

Perhaps you meant you tried to build the git version of dpkg here?
(If so you'd need to run ./autogen first.)

> Could you please do the following steps, please?

>  * Try whether the failure still happens with the latest po4a
>  * Try whether the attached patch applied to the latest po4a helps
>  * Tell me more details about how to reproduce the failure
> 
> Thanks in advance, and sorry for the inconvenience. To me, this part of po4a
> code was not changed in years, so I need help to understand the issue.

It looked like at least the initial regression was introduced in po4a
commit b2333d54845976f4804f024b5cea61db16fb4f36.

> diff --git a/lib/Locale/Po4a/Pod.pm b/lib/Locale/Po4a/Pod.pm
> index 4b3dc042..bd3d5c1a 100644
> --- a/lib/Locale/Po4a/Pod.pm
> +++ b/lib/Locale/Po4a/Pod.pm
> @@ -27,6 +27,8 @@ use vars qw(@ISA);
>  
>  use Carp qw(croak confess);
>  
> +use Locale::Po4a::Common qw(dgettext);
> +
>  sub initialize { }
>  
>  sub translate {

I hot-edited this in my installed system and then got:

  ,---
    PO4A   man.stamp
  Undefined subroutine &Locale::Po4a::Pod::wrap_mod called at 
/usr/share/perl5/Locale/Po4a/Pod.pm line 96, <$fh> line 21.
  make[2]: *** [Makefile:902: man.stamp] Error 255
  `---

I then instead removed the import restrictions and simply added:

  ,---
  use Locale::Po4a::Common;
  `---

That fixed that issue but then it fails with:

  ,---
    PO4A   man.stamp
  po4a::pod: The file deb-buildinfo.pod declares utf8 as encoding, but you 
             provided UTF-8 as master charset. Please change either setting.
   at /usr/bin/po4a line 1663.
  make[2]: *** [Makefile:902: man.stamp] Error 255
  `---

Thanks,
Guillem

Reply via email to