After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 621172 - Cross compiling fails
Cross compiling fails
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.25.x
Other All
: Normal major
: ---
Assigned To: gtkdev
gtkdev
: 620174 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-06-10 07:53 UTC by Hib Eris
Modified: 2010-06-19 14:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use-native-glib-compile-schemas-when-cross-compiling.patch (1.99 KB, patch)
2010-06-10 07:53 UTC, Hib Eris
none Details | Review
Let-GLIB_SETTINGS-macro-use-glib-compile-schemas-fro.patch (1.08 KB, patch)
2010-06-10 08:00 UTC, Hib Eris
none Details | Review

Description Hib Eris 2010-06-10 07:53:20 UTC
Created attachment 163260 [details] [review]
Use-native-glib-compile-schemas-when-cross-compiling.patch

I have two patches for cross compiling.

The first patch fixes cross compiling glib itself, the second fixes cross compiling applications with glib.
Comment 1 Hib Eris 2010-06-10 08:00:52 UTC
Created attachment 163261 [details] [review]
Let-GLIB_SETTINGS-macro-use-glib-compile-schemas-fro.patch

This second patch, when cross compiling an application, uses AC_PATH_TOOL to find glib-compile-schemas instead of using PKG_CONFIG.

Actually, I am not sure why glib uses PKG_CONFIG in the first place to find glib-compile-schemas. To me, it makes more sense to just use the standard autoconf macros for this. Nonetheless, for the non cross compiling case, I left this behaviour unchanged.
Comment 2 Matthias Clasen 2010-06-15 04:41:41 UTC
Thanks, those look good. Committed.
Comment 3 Allison Karlitskaya (desrt) 2010-06-17 18:28:52 UTC
*** Bug 620174 has been marked as a duplicate of this bug. ***
Comment 4 Allison Karlitskaya (desrt) 2010-06-17 18:30:51 UTC
Hib: is there a reason you used AC_PATH_TOOL instead of PROG?  Apparently this is the wrong choice since it prefixes the compiler prefix (so we end up with something like 'arm-unknown-linux-gnueabi-glib-compile-schemas').
Comment 5 Hib Eris 2010-06-19 05:12:29 UTC
(In reply to comment #4)
> Hib: is there a reason you used AC_PATH_TOOL instead of PROG?  Apparently this
> is the wrong choice since it prefixes the compiler prefix (so we end up with
> something like 'arm-unknown-linux-gnueabi-glib-compile-schemas').

I used AC_PATH_TOOL to allow for the possibility that glib-compile-schemas does something different depending on the platform it is supposed to compile schemas for. It allows you to have your normal glib-compile-schemas installed alongside with a compiler prefixed glib-compile-schemas (e.g. arm-unknown-linux-gnueabi-glib-compile-schemas). AC_PATH_TOOL will first search for the prefixed  glib-compile-schemas and when it does not find it, it will automatically fall back to it's none cross compile variant.
Comment 6 Allison Karlitskaya (desrt) 2010-06-19 14:24:01 UTC
hi Hib,

That's what I guessed.  That's not the case -- the compiled schema file is the same format for every system.

I've updated TOOL to PROG in the two places.

Cheers