Not sure what changed but I now get: * FAILED postinst: 1 * ERROR: dev-libs/glib-2.50.3::gentoo failed (postinst phase): * Update GIO modules cache failed (for arm) * * Call stack: * ebuild.sh, line 115: Called pkg_postinst * environment, line 4946: Called multilib_foreach_abi 'multilib_pkg_postinst' * environment, line 4469: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib_pkg_postinst' * environment, line 4147: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib_pkg_postinst' * environment, line 4145: Called _multilib_multibuild_wrapper 'multilib_pkg_postinst' * environment, line 713: Called multilib_pkg_postinst * environment, line 4944: Called die * The specific snippet of code: * gnome2_giomodule_cache_update || die "Update GIO modules cache failed (for ${ABI})" * It's trying to run programs from $EROOT which will definitely not work when cross compiling. Maybe it's simpler & safer to replace that || die by || ewarn ?
This changed, 14 months ago: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cc8b1b22ee34d6b0c84ba5e822fb1a0def6fc01 https://bugs.gentoo.org/show_bug.cgi?id=518422 Can we call a host version of it maybe and does it result in a working cache for the target image?
Ok, so the host tools shouldn't understand the extension point target architecture ELF files as the tool (glib wrapped) dlopens the .so and calls g_io_module_query symbol from the module. So I think we should skip all this as a whole for cross-compilation. Then the problem is notification of having people run it manually on target system later, for the performance benefits.
Well, first of all, glib installs /usr/lib64/gio/giomodule.cache here, which is empty; manually running '/usr/bin/gio-querymodules /usr/lib64/gio/modules/' creates '/usr/lib64/gio/modules/giomodule.cache', so maybe there is a small bug here then, glib doesn't install any gio module in my cross compiled sysroot, so that: 'sudo /usr/bin/gio-querymodules /usr/armv7a-hardfloat-linux-gnueabi/usr/lib/gio/modules/' seems to work but doesn't regenerate any cache after installing e.g. glib-networking to populate it with some gio plugins, running the same command still does not generate any cache: I guess it tries to dlopen them and fails so that it thinks there is no plugin Note that running the host gio-querymodules on the target gio modules does *not* return an error nor print any warning
Note that for the same reason this doesn't work for multilib either: $ ls /usr/lib32/gio/ total 4.0K -rw-r--r-- 1 root root 0 Feb 21 09:13 giomodule.cache $ ls /usr/lib32/gio/modules/ total 148K -rwxr-xr-x 1 root root 18K Nov 13 20:26 libgiognomeproxy.so -rwxr-xr-x 1 root root 87K Nov 13 20:26 libgiognutls.so -rwxr-xr-x 1 root root 9.5K Nov 13 20:26 libgiolibproxy.so -rwxr-xr-x 1 root root 26K Aug 31 2016 libgsettingsgconfbackend.so $ sudo /usr/bin/gio-querymodules /usr/lib32/gio/modules/ $ ls /usr/lib32/gio/modules/ total 148K -rwxr-xr-x 1 root root 18K Nov 13 20:26 libgiognomeproxy.so -rwxr-xr-x 1 root root 87K Nov 13 20:26 libgiognutls.so -rwxr-xr-x 1 root root 9.5K Nov 13 20:26 libgiolibproxy.so -rwxr-xr-x 1 root root 26K Aug 31 2016 libgsettingsgconfbackend.so
commit 0bd3df485ff4afda075d8872614c0ab04e1dfd1c Author: Mart Raudsepp <leio@gentoo.org> Date: Tue Mar 28 16:32:33 2017 +0300 dev-libs/glib: fix GIO module cache file ownership and cross-compilation Bug 518422 tried to fix module cache file ownership to glib, but the ebuild changes missed /modules path and used $libdir/gio/ instead of $libdir/gio/modules While cross-compiling, we can't generate the cache file, so we shouldn't die out either. Instead of removing the die, rework it all to not do any of it while cross-compiling, because we'd end up with an empty glib owned cache file, which could result in no modules working at all as a cache file is present from the preinst touch. Gentoo-bug: 518422 Gentoo-bug: 613306 Thanks-to: Alexis Ballier <aballier@gentoo.org>