Bug#1061250: gjs FTCBFS: cxx.run always fails cross compilation

Simon McVittie smcv at debian.org
Sun Jan 21 15:50:17 GMT 2024


On Sun, 21 Jan 2024 at 12:56:49 +0100, Helmut Grohne wrote:
> +if meson.is_cross_build()

In my experience, this function call is usually the wrong tool:
I think it would likely be more in line with what upstream wants if
it was based on "if not meson.can_run_host_binaries()", so that if we
happen to be able to run host binaries (via i386-on-amd64, binfmt_misc
or an explicitly configured EXE wrapper), the check will still be done.

Does cxx.run() work as though we were doing a native build if Meson is
run with a cross-file that configures an EXE wrapper, similar to
<https://salsa.debian.org/gnome-team/glib/-/commit/df446722f51b9c35b6278a38b10784ba9dd3c919>?
I hope that it will.

gjs is neither installable nor useful without GObject-Introspection, so
on any architecture where we would consider cross-compiling gjs, we almost
certainly already have qemu-user available.

> +    warning('''This is a cross build. A check that a minimal
> +SpiderMonkey program executes will not be performed. Before shipping GJS, you
> +should check that it does not crash on startup, since building SpiderMonkey with
> +the wrong configuration may cause that.''' + recommended_configuration)

This might still be a good idea even if an EXE wrapper is enough to
resolve the build failure, but I'd prefer to take this sort of thing
upstream rather than applying it unilaterally.

Thanks,
    smcv



More information about the pkg-gnome-maintainers mailing list