Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 757483 - net-libs/glib-networking: cross-compiling fails from giomodule cache
Summary: net-libs/glib-networking: cross-compiling fails from giomodule cache
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Cross compilation support
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-28 19:20 UTC by David Michael
Modified: 2020-12-07 22:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2020-11-28 19:20:32 UTC
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:

https://github.com/gentoo/gentoo/blob/master/dev-libs/glib/glib-2.66.2.ebuild#L259-L270
https://github.com/gentoo/gentoo/blob/master/net-libs/glib-networking/glib-networking-2.66.0.ebuild#L55-L73

Can that condition be copied to the calls in glib-networking?  Maybe just move it to the eclass so it's fixed everywhere?

Reproducible: Always

Steps to Reproduce:
1. cross-emerge -v net-libs/glib-networking

Actual Results:  
 * .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)

Expected Results:  
It should build and install.
Comment 1 Larry the Git Cow gentoo-dev 2020-12-07 22:06:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f6f9ad2c9c3dd85ae5f538a0a50cb1cd3a84ada

commit 9f6f9ad2c9c3dd85ae5f538a0a50cb1cd3a84ada
Author:     David Michael <fedora.dm0@gmail.com>
AuthorDate: 2020-12-03 04:04:39 +0000
Commit:     Matt Turner <mattst88@gentoo.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).
    
    Closes: https://bugs.gentoo.org/611030
    Closes: https://bugs.gentoo.org/757483
    Signed-off-by: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 eclass/gnome2-utils.eclass | 98 +++++++++++++++++++++++++++++++++++-----------
 1 file changed, 75 insertions(+), 23 deletions(-)