Strange failure during de_CH.po generation with make -j

2024-01-14 Thread Xinhui Yang via Grub-devel
Hi,

Recently we observed a strange failure while packaging GRUB 2.12 for
our distro. The translation file generation process might fail if
parallelism was enabled (e.g. `make -j', or with `-j16' and larger
numbers).

We found that the build always failed whilst generating de_CH
translation data from de.po, complaining about syntax errors or a
premature EOF whilst processing the strings. The exact line numbers
msgfilter complained about were random. If we remove de_CH from
linguas.sh, the build passes every time, even with parallelism
enabled - of course, with parallelism disabled, we did not observe
this issue.

This issue has been reproduced on:

- AOSC OS, the aforementioned distro that I work on.
- Debian Bookworm.

I propose the following solutions:

- Tell the distro maintainers not to use -j.
- Patch po/gettext-patches to add a .NOTPARALLEL directive in Makefile.in.in.

We have opted to temporarily disable parallelism in po/Makefile, since we
could not find the culprit to this issue.

Regards,
Xinhui


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Strange failure during de_CH.po generation with make -j

2024-01-16 Thread Steve McIntyre
Hi!

On Sun, Jan 14, 2024 at 03:58:42PM +0800, Xinhui Yang via Grub-devel wrote:
>
>Recently we observed a strange failure while packaging GRUB 2.12 for
>our distro. The translation file generation process might fail if
>parallelism was enabled (e.g. `make -j', or with `-j16' and larger
>numbers).
>
>We found that the build always failed whilst generating de_CH
>translation data from de.po, complaining about syntax errors or a
>premature EOF whilst processing the strings. The exact line numbers
>msgfilter complained about were random. If we remove de_CH from
>linguas.sh, the build passes every time, even with parallelism
>enabled - of course, with parallelism disabled, we did not observe
>this issue.
>
>This issue has been reproduced on:
>
>- AOSC OS, the aforementioned distro that I work on.
>- Debian Bookworm.
>
>I propose the following solutions:
>
>- Tell the distro maintainers not to use -j.
>- Patch po/gettext-patches to add a .NOTPARALLEL directive in Makefile.in.in.
>
>We have opted to temporarily disable parallelism in po/Makefile, since we
>could not find the culprit to this issue.

I've seen this before when hacking on the Debian packaging too. IIRC
it's because the po build does not use separated-out build dirs like
the binary builds, and that would the right way to fix this.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"The problem with defending the purity of the English language is that
 English is about as pure as a cribhouse whore. We don't just borrow words; on
 occasion, English has pursued other languages down alleyways to beat them
 unconscious and rifle their pockets for new vocabulary."  -- James D. Nicoll


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel