meson: msgfmt is not overridable in cross [binaries]

Describe the bug

Setting msgfmt = '/usr/x86_64-w64-mingw32/sys-root/mingw/bin/msgfmt.exe' in the [binaries] section seems to have no effect. Overriding other binaries like glib-mkenums seems to work fine.

To Reproduce

i18n.gettext(meson.project_name(),
  preset : 'glib',
  args: [
  '--default-domain=' + meson.project_name(),
  ]
)

Expected behavior

wine /usr/x86_64-w64-mingw32/sys-root/mingw/bin/msgfmt.exe ../po/pl.po -o po/pl/LC_MESSAGES/fwupd.mo

Actual behavior

msgfmt ../po/pl.po -o po/pl/LC_MESSAGES/fwupd.mo

system parameters

  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)

Fedora 36.

  • what Python version are you using e.g. 3.8.0

3.10.4

  • what meson --version

0.60.3

  • what ninja --version if it’s a Ninja build

1.10.2

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 26 (26 by maintainers)

Most upvoted comments

It seems like there’s a genuine use case for native: 'either', so it was a useful discussion…

Manually hardcoding the exe_wrapper as the first component of a cross binary in the native file is genuinely awkward.