Re: Does gobject-introspection support the cross-compile?
- From: Rongqing Li <rongqing li windriver com>
- To: Christian Hergert <christian hergert me>
- Cc: gtk-devel-list gnome org
- Subject: Re: Does gobject-introspection support the cross-compile?
- Date: Wed, 13 Aug 2014 14:07:58 +0800
On 08/13/2014 02:04 PM, Christian Hergert wrote:
There were some prototypes for Yocto that did this by running the
introspection programs inside of Qemu.
Not sure on the status though.
-- Christian
I am working under Yocto, and using the host g-ir-compiler to compiler
target file, and the error is below:
g-ir-compiler --includedir=. gir/cairo-1.0.gir -o gir/cairo-1.0.typelib
g-ir-scanner --namespace=GLib --nsversion=2.0
--libtool="./x86_64-wrs-linux-libtool" --pkg=glib-2.0
--library=glib-2.0 --library=gobject-2.0 --external-library
--reparse-validate --identifier-prefix=G --symbol-prefix=g
--symbol-prefix=glib --c-include="glib.h" --cflags-begin
-I/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0
-I/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/glib-2.0/include
-DGETTEXT_PACKAGE=Dummy -DGLIB_COMPILATION -D__G_I18N_LIB_H__
--cflags-end
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/glib-2.0/include/glibconfig.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/galloca.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/garray.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gasyncqueue.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gatomic.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gbacktrace.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gbase64.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gbitlock.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gbookmarkfile.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gbytes.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gcharset.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gchecksum.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gconvert.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gdataset.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gdate.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gdatetime.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gdir.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/genviron.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gerror.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gfileutils.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/ggettext.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/ghash.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/ghmac.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/ghook.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/ghostutils.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gi18n-lib.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gi18n.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/giochannel.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gkeyfile.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/glist.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gmacros.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gmain.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gmappedfile.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gmarkup.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gmem.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gmessages.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gnode.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/goption.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gpattern.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gpoll.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gprimes.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gprintf.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gqsort.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gquark.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gqueue.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/grand.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gregex.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gscanner.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gsequence.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gshell.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gslice.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gslist.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gspawn.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gstdio.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gstrfuncs.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gstring.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gstringchunk.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gtestutils.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gthread.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gthreadpool.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gtimer.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gtimezone.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gtrashstack.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gtree.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gtypes.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gunicode.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gurifuncs.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gutils.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gvariant.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gvarianttype.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gversion.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gversionmacros.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib/gwin32.h
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/gobject/glib-types.h
/buildarea/build/firewalld/bitbake_build/tmp/work/core2-64-wrs-linux/gobject-introspection/1.40.0-r0/gobject-introspection-1.40.0/gir/glib-2.0.c
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0/glib-unix.h
g-ir-scanner g-ir-compiler --output GLib-2.0.gir
g-ir-scanner: compile: x86_64-wrs-linux-gcc -m64 -march=core2
-mtune=core2 -msse3 -mfpmath=sse
--sysroot=/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64
-Wno-deprecated-declarations -pthread
-I/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0
-I/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/glib-2.0/include
-fno-strict-aliasing -Wsign-compare -Wcast-align -Wpointer-arith
-Wnested-externs -Wmissing-prototypes -Wmissing-declarations
-Wchar-subscripts -Wall -O2 -pipe -g -feliminate-unused-debug-types
-I/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/include/glib-2.0
-I/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/glib-2.0/include
-c -o
/buildarea/build/firewalld/bitbake_build/tmp/work/core2-64-wrs-linux/gobject-introspection/1.40.0-r0/build/tmp-introspectbjLsDu/GLib-2.0.o
/buildarea/build/firewalld/bitbake_build/tmp/work/core2-64-wrs-linux/gobject-introspection/1.40.0-r0/build/tmp-introspectbjLsDu/GLib-2.0.c
g-ir-scanner: link: ./x86_64-wrs-linux-libtool --mode=link --tag=CC
x86_64-wrs-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse
--sysroot=/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64
-o
/buildarea/build/firewalld/bitbake_build/tmp/work/core2-64-wrs-linux/gobject-introspection/1.40.0-r0/build/tmp-introspectbjLsDu/GLib-2.0
-export-dynamic -fno-strict-aliasing -Wsign-compare -Wcast-align
-Wpointer-arith -Wnested-externs -Wmissing-prototypes
-Wmissing-declarations -Wchar-subscripts -Wall -O2 -pipe -g
-feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu
-Wl,--as-needed
/buildarea/build/firewalld/bitbake_build/tmp/work/core2-64-wrs-linux/gobject-introspection/1.40.0-r0/build/tmp-introspectbjLsDu/GLib-2.0.o
-L/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64
-lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread
-lglib-2.0 -lglib-2.0 -lgobject-2.0
x86_64-wrs-linux-libtool: link: x86_64-wrs-linux-gcc -m64 -march=core2
-mtune=core2 -msse3 -mfpmath=sse
--sysroot=/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64
-o
/buildarea/build/firewalld/bitbake_build/tmp/work/core2-64-wrs-linux/gobject-introspection/1.40.0-r0/build/tmp-introspectbjLsDu/GLib-2.0
-fno-strict-aliasing -Wsign-compare -Wcast-align -Wpointer-arith
-Wnested-externs -Wmissing-prototypes -Wmissing-declarations
-Wchar-subscripts -Wall -O2 -pipe -g -feliminate-unused-debug-types
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
/buildarea/build/firewalld/bitbake_build/tmp/work/core2-64-wrs-linux/gobject-introspection/1.40.0-r0/build/tmp-introspectbjLsDu/GLib-2.0.o
-Wl,--export-dynamic -pthread -Wl,--export-dynamic
-L/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/libgio-2.0.so
-L=/usr/lib64/../lib64 -L=/lib64 -lz -lresolv
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/libgmodule-2.0.so
-ldl
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/libgobject-2.0.so
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/libglib-2.0.so
-lpthread
/buildarea/build/firewalld/bitbake_build/tmp/sysroots/qemux86-64/usr/lib64/libffi.so
-pthread
(process:31044): GLib-GObject-CRITICAL **:
/build/buildd/glib2.0-2.34.1/./gobject/gtype.c:2720: You forgot to call
g_type_init()
(process:31044): GLib-GObject-CRITICAL **:
g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE
(interface_type)' failed
(process:31044): GLib-CRITICAL **: g_once_init_leave: assertion `result
!= 0' failed
(process:31044): GLib-GObject-CRITICAL **:
/build/buildd/glib2.0-2.34.1/./gobject/gtype.c:2720: You forgot to call
g_type_init()
(process:31044): GLib-CRITICAL **: g_once_init_leave: assertion `result
!= 0' failed
(process:31044): GLib-GObject-CRITICAL **:
/build/buildd/glib2.0-2.34.1/./gobject/gtype.c:2720: You forgot to call
g_type_init()
(process:31044): GLib-CRITICAL **: g_once_init_leave: assertion `result
!= 0' failed
-Roy
On 08/12/2014 10:31 PM, Tristan Van Berkom wrote:
On Wed, 2014-08-13 at 09:09 +0800, Rongqing Li wrote:
Hi:
I want to compile gobject-introspection for arm cpu in x86 host,
both are linux OS. The compilation failed since g-ir-compiler
(compiled for arm) can not run on x86.
Could you tell me if it supports the cross-compile, if not, what
should I do to enable it? is it possible that I use the host's
g-ir-compiler/g-ir-scanner to compiler the target(arm cpu) file.
This sounds like a typical problem you will run into when cross
compiling your stack, pkg-config is another example.
There are probably a number of techniques you can use, and one
option to consider is to just actually build on the target
arch. If you must cross-compile, one project which I've
used with success is buildroot[0], this solves the said problem
by building two stacks, one 'staging' stack which contains
tools compiled for the build host arch, and then the target
stack which is cross compiled, executing binaries from the
'staging' build directory.
Cheers,
-Tristan
PS: fwiw there is also a new gobject-introspection mailing list:
https://mail.gnome.org/mailman/listinfo/gir-devel-list
[0]:http://buildroot.uclibc.org/
-Roy
| ./g-ir-compiler: line 117:
/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/build/.libs/lt-g-ir-compiler:
cannot execute binary file: Exec format error
| ./g-ir-compiler: line 117:
/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/build/.libs/lt-g-ir-compiler:
Success
| make[2]: *** [gir/xfixes-4.0.typelib] Error 126
| ./g-ir-compiler: line 117:
/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/build/.libs/lt-g-ir-compiler:
cannot execute binary file: Exec format error
| ./g-ir-compiler: line 117:
/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/build/.libs/lt-g-ir-compiler:
Success
| make[2]: *** [gir/xlib-2.0.typelib] Error 126
| Traceback (most recent call last):
| File "./g-ir-scanner", line 44, in <module>
| from giscanner.scannermain import scanner_main
| File
"/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/gobject-introspection-1.40.0/giscanner/scannermain.py",
line 35, in <module>
| from giscanner.dumper import compile_introspection_binary
| File
"/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/gobject-introspection-1.40.0/giscanner/dumper.py",
line 28, in <module>
| from .gdumpparser import IntrospectionBinary
| File
"/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/gobject-introspection-1.40.0/giscanner/gdumpparser.py",
line 31, in <module>
| from .transformer import TransformerException
| File
"/buildarea1/lirq/mips/bitbake_build/tmp/work/mips64-wrs-linux/gobject-introspection/1.40.0-r0/gobject-introspection-1.40.0/giscanner/transformer.py",
line 27, in <module>
| from .girparser import GIRParser
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
--
Best Reagrds,
Roy | RongQing Li
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]