Hi Simon,

On Mon, Nov 02, 2026 at 11:45:46PM +0000, Simon McVittie wrote:
> On Mon, 02 Nov 2026 at 16:38:31 +0100, Helmut Grohne wrote:
> > At this point, Build-Depends can be installed. Unfortunately, meson
> > refuses to configure. It objects to enabling the introspection and vala
> > features as we cannot run host binaries.
> 
> Actually we can, if `meson env2mfile` is used to generate a cross-file that
> sets exe_wrapper to the Debian-specific MULTIARCH-cross-exe-wrapper. This is
> a long-standing feature request for debhelper, which currently uses the
> deprecated debcrossgen tool, which the meson maintainer doesn't want to
> improve any further (see also #1111001,
> https://salsa.debian.org/debian/debhelper/-/merge_requests/127) but `export
> MESON_USE_NEW_CROSSGEN=1` in debian/rules should be enough to make this
> work.

I agree that improving meson would be preferable, but that does not seem
to be a practical option with an uncooperative meson maintainer and an
upstream that we angered in social interaction.

> I think using `meson env2mfile` would be preferable to patching the upstream
> build system to pretend that introspection can work without the ability to
> run host binaries.

I agree that the patch likely is not upstreamable. It was meant more as
a stop-gap solution demonstrating the cause and also highlighting
existsing meson bugs. At least in the vala case, I believe the upstream
way is technically wrong, but I'm not sure what a good solution is.

In any case, I won't object to using other solutions and shall continue
to work towards making env2mfile available.

> > Then, the build proceeds quite far until meson launches the wrong
> > vapigen. This is not a bug in librsvg but in meson itself and it is
> > reported as #1126007.
> 
> If the build uses `meson env2mfile`, then recent Meson should resolve this
> without necessarily needing to look up vapigen via pkg-config, because
> https://github.com/mesonbuild/meson/pull/15056 was merged.
> 
> (Or the cross-file
> /usr/share/meson/cross/${DEB_HOST_GNU_TYPE}-vala.ini is also available.)

Be that as it may be, but meson should default to a way that just works.
Requiring all packages to provide such aspects via a cross-file when
pkg-config can readily discover it is backwards. I therefore see this as
a meson problem, not as a librsvg problem. The sheer amount of packages
affected by this very bug (I count at least 53) makes it clear that it
should be fixed there.

Given that Jeremy uploaded my patch already, I would like to know
whether I should rework the patch to use MESON_USE_NEW_CROSSGEN or
whether we should keep the new status quo until meson gets fixed.

Helmut

Reply via email to