New comment by oreo639 on void-packages repository https://github.com/void-linux/void-packages/pull/49446#issuecomment-2014537106 Comment: I ported over the gobject-introspection qemuwrapper and patches and tested it with: ``` diff --git a/common/build-helper/meson.sh b/common/build-helper/meson.sh index 6232f9260c2..e4e7171f031 100644 --- a/common/build-helper/meson.sh +++ b/common/build-helper/meson.sh @@ -67,8 +67,8 @@ cat > "${XBPS_WRAPPERDIR}/meson/xbps_meson.cross" <<-EOF pkgconfig = '${PKG_CONFIG}' rust = ['rustc', '--target', '${RUST_TARGET}' ,'--sysroot', '${XBPS_CROS S_BASE}/usr'] g-ir-scanner = '${XBPS_CROSS_BASE}/usr/bin/g-ir-scanner' - g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler' - g-ir-generate = '${XBPS_CROSS_BASE}/usr/bin/g-ir-generate' + g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/gi-compile-repository' + g-ir-generate = '${XBPS_CROSS_BASE}/usr/bin/gi-decompile-typelib' llvm-config = '/usr/bin/llvm-config' cups-config = '${XBPS_CROSS_BASE}/usr/bin/cups-config' ``` It seems to work, although looking through it, there are some things that can potentially be improved. Currently we use a fork of prelink-cross to get prelink-rtld to get the recursive dependencies from DT_NEEDED in an lld-like output. I'm not sure this is needed and it can probably be simplified by just using elfutils (which is already a dependency of glib) like what Debian does: https://salsa.debian.org/gnome-team/gobject-introspection/-/blob/debian/latest/debian/elf-get-needed.c (That needs testing though) That method was also brought up upstream by the Debian maintainer: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/482 Another thing I noticed is that Debian wraps all of the g-ir-*/gi-* tools with qemu: https://salsa.debian.org/gnome-team/glib/-/blob/debian/latest/debian/rules?ref_type=heads#L72-91 Not sure how necessary that is, but in meson we pass the raw unwrapped `g-ir-generate` (equivalent of `gi-decompile-typelib` in glib): https://github.com/void-linux/void-packages/blob/master/common/build-helper/meson.sh#L71 I don't think that works unless `build_helper=qemu` is specified, although there probably isn't much using it. I'll worry about this more later.