The pkg_post* functions have bare calls to gnome2_giomodule_cache_update in glib-networking, which only works when compiling natively. In glib, there is a cross-compiling conditional block that allows the build to succeed. Compare:
Can that condition be copied to the calls in glib-networking? Maybe just move it to the eclass so it's fixed everywhere?
Steps to Reproduce:
1. cross-emerge -v net-libs/glib-networking
* .ppc: running multilib_pkg_postinst
* Updating GIO modules cache ...
/var/tmp/portage/net-libs/glib-networking-2.64.3/temp/environment: line 1630: /usr/powerpc-gentoo-linux-gnu/usr/bin/powerpc-gentoo-linux-gnu-gio-querymodules: cannot execute binary file: Exec format error [ !! ]
* ERROR: net-libs/glib-networking-2.64.3::gentoo failed (postinst phase):
* Update GIO modules cache failed (for ppc)
It should build and install.
The bug has been closed via the following commit(s):
Author: David Michael <email@example.com>
AuthorDate: 2020-12-03 04:04:39 +0000
Commit: Matt Turner <firstname.lastname@example.org>
CommitDate: 2020-12-07 22:06:34 +0000
gnome2-utils.eclass: skip executing cross-compiled tools
Executing tools installed in ROOT will fail when cross-compiling,
so this prints a warning about manually running the command instead
in that case. The warning is copied from dev-libs/glib.
This also reorders the exception handling by increasing severity so
that the "nothing to do" non-error returns first, otherwise the
expected problem of unexecutable cross-compiled commands returns,
otherwise the unexpected problem of missing commands returns.
The immodule cache functions were updated to handle a different
problem. They run native tools from BROOT, but they are not
guaranteed to exist while cross-compiling (e.g. gtk+ can't BDEPEND
on itself, so the cross-compiled gtk+ can be installed before the
native gtk+, which fails from gtk-query-immodules not existing).
Signed-off-by: David Michael <email@example.com>
Signed-off-by: Matt Turner <firstname.lastname@example.org>
eclass/gnome2-utils.eclass | 98 +++++++++++++++++++++++++++++++++++-----------
1 file changed, 75 insertions(+), 23 deletions(-)