Package builds in computer, but fails to build in Launchpad, with the error "msgfmt: cannot locate ITS rules"

Asked by Archisman Panigrahi

I am trying to build blanket with this packaging recipe

The same source builds successfully in my computer (Xubuntu 20.04), but it always fails in Launchpad.
Here is the full buildlog

The relevant part of the buildlog is
Found ninja-1.10.0 at /usr/bin/ninja
 cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v
[1/3] glib-compile-resources ../data/resources/blanket.gresource.xml --sourcedir ../data/resources --internal --generate --target data/resources/blanket.gresource --dependency-file data/resources/blanket.gresource.d
xml-stripblanks preprocessing requested, but XMLLINT is not set, and xmllint is not in PATH
[2/3] /usr/bin/meson --internal msgfmthelper ../data/ data/com.rafaelmardojai.Blanket.desktop desktop ../data/../po
[3/3] /usr/bin/meson --internal msgfmthelper ../data/ data/com.rafaelmardojai.Blanket.metainfo.xml xml ../data/../po
FAILED: data/com.rafaelmardojai.Blanket.metainfo.xml
/usr/bin/meson --internal msgfmthelper ../data/ data/com.rafaelmardojai.Blanket.metainfo.xml xml ../data/../po
msgfmt: cannot locate ITS rules for ../data/
ninja: build stopped: subcommand failed.

Similar packages like foliate and lollypop (both using meson build system, and have similar debian directory structure) build successfully in Launchpad. I am unsure why the build failed for blanket. I have added libappstream-glib-dev to the "build-depends" in the control file, but that did not help.

How to fix this?

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Solved by:
Colin Watson
Last query:
Last reply:
Revision history for this message
Ioana Lasc (ilasc) said :


The relevant line in the build log ("msgfmt: cannot locate ITS rules") indicates a dependency issue, please have a look at and similar search results.

To reliably replicate the exact environment locally you should be building locally on Ubuntu Focal - same as the Launchpad builder.

Revision history for this message
Colin Watson (cjwatson) said :

I'd also recommend specifically testing locally using sbuild ( This is particularly important for problems that might be related to missing build-dependencies, because it gives you a clean environment that has only build-essential packages plus your declared build-dependencies installed.

Revision history for this message
Archisman Panigrahi (apandada1) said :

I tried to build it in a clean chroot environment using pbuilder (I have not tried Sbuild), and the build fails with the same error.

I have added the package libappstream-glib-dev to build depends (as suggested in, installing the package libappstream-glib-devel works in OpenSuse) but that did not work in the proot environment (and also in Launchpad).

In my computer, the debian package builds successfully even without libappstream-glib-dev.

I have opened an issue in the upstream repository (, but the developer could not say how to fix it (because the package builds locally for the developer and also for me).

I have built packages similar to Blanket (e.g. Foliate, in Launchpad, and Foliate builds successfully (the build-dependencies are almost the same).

For Foliate, the build dependencies are "debhelper-compat (= 10), gettext, meson (>= 0.40), pkg-config, libglib2.0-dev (>= 2.54), gjs", while for Blanket they are "debhelper-compat(=10), gettext, meson (>= 0.50), pkg-config, libglib2.0-dev" (as previously mentioned, I added libappstream-glib-dev to build depends, but that did not help).

So I cannot say that this is really due to missing build-depends.

Revision history for this message
Best Colin Watson (cjwatson) said :

I tried building your package locally in sbuild and reproduced the exact same error as on Launchpad. I strongly suggest that you use sbuild rather than pbuilder to reproduce build failures on Launchpad; there can occasionally be slight differences between them which can be relevant.

You're missing a Build-Depends on appstream (not libappstream-glib-dev), which provides the appropriate ITS locator rule for translations of *.metainfo.xml. After that I ran into a test failure when validating the appstream file, but perhaps you can work that out for yourself once you've reproduced it locally.

Revision history for this message
Archisman Panigrahi (apandada1) said :

Yes, it builds in pbuilder after adding appstream. I guess it would build in Launchpad as well.

I had been trying random dependencies to fix it for the last three days. Thank you very much.

I will fix the validation issue of the appstream file.

Revision history for this message
Archisman Panigrahi (apandada1) said :

Thanks Colin Watson, that solved my question.

Revision history for this message
Archisman Panigrahi (apandada1) said :

It got built in Launchpad as well.