GNOME Bugzilla – Bug 605108
GLib-2.0.gir parse error with sun cc
Last modified: 2015-02-07 16:47:46 UTC
$make ../tools/g-ir-compiler --includedir=. --includedir=../gir --includedir=../gir --includedir=. GObject-2.0.gir -o GObject-2.0.typelib ** WARNING **: Entry 'GSList' not found aborting... make: *** [GObject-2.0.typelib] Abort (core dumped) $pstack core core 'core' of 28080: /export/home/halton/work/projects/gnome/gobject-introspection/gobject- fec54667 _lwp_kill (1, 6, 80470b8, febfbb4e) + 7 febfbb5a raise (6, 0, 8047108, febd254a) + 22 febd256a abort (0, 10, fee07938, fee0793c, fee1d4d4, fee1d500) + f2 fed7ccb8 g_logv (0, 10, 8065f9c, 80475bc) + 4a8 fed7cd61 g_log (0, 10, 8065f9c, 80c67f0, 0, 0) + 25 08058b9c find_entry_node (81663d0, 82046c0, 80c67f0, 0, 0, 0) + 26c 080590fd serialize_type (81663d0, 82046c0, 80cc000, 808ff30, 0, 0) + 1ad 080597a0 g_ir_node_build_typelib (80cc000, 80cbb60, 804789c, 80478d8, 80478d4, 0) + 290 08059f3a g_ir_node_build_typelib (80cbb60, 80c1e98, 804789c, 80478d8, 80478d4, 0) + a2a 08059489 g_ir_node_build_members (8047830, 12, 80819e0, 80c1e98, 804789c, 80478d8) + 79 0805afc3 g_ir_node_build_typelib (80c1e98, 0, 804789c, 80478d8, 80478d4, 0) + 1ab3 08055fa7 g_ir_module_build_typelib (81663d0, 82046c0) + 797 08054f86 main (1, 8047974, 8047998, 805449f) + 316 080544fd _start (8, 8047a84, 0, 0, 0, 0) + 7d
Created attachment 150270 [details] diff file of gir/GObject-2.0.gir compared on Linux and OpenSolaris. There is no this error when building on Linux. I found the gir/GObject-2.0.gir are different, attach here for reference.
I found the root cause is SourceScanner:_parse /usr/include/glib-2.0/glib/ghostutils.h, cc generate a error and stop parsing rest headers. $env LPATH=.libs env PYTHONPATH=..:..:PYTHONPATH UNINSTALLED_INTROSPECTION_SRCDIR=.. UNINSTALLED_INTROSPECTION_BUILDDIR=.. ../tools/g-ir-scanner -v --add-include-path=../gir --add-include-path=. -v --add-include-path=../gir --add-include-path=. --namespace=GLib --nsversion=2.0 --libtool="/bin/bash ../libtool" --library=glib-2.0 --pkg=glib-2.0 --noclosure --strip-prefix=g --c-include="glib.h" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DGETTEXT_PACKAGE=Dummy -D__G_I18N_LIB_H__ /usr/lib/glib-2.0/include/glibconfig.h /usr/include/glib-2.0/glib/*.h ./glib-2.0.c --output GLib-2.0.gir "<stdin>", line 5: warning: #include of /usr/include/... may be non-portable "<stdin>", line 6: warning: #include of /usr/include/... may be non-portable "<stdin>", line 7: warning: #include of /usr/include/... may be non-portable "<stdin>", line 8: warning: #include of /usr/include/... may be non-portable "<stdin>", line 9: warning: #include of /usr/include/... may be non-portable "<stdin>", line 10: warning: #include of /usr/include/... may be non-portable "<stdin>", line 11: warning: #include of /usr/include/... may be non-portable "<stdin>", line 12: warning: #include of /usr/include/... may be non-portable "<stdin>", line 13: warning: #include of /usr/include/... may be non-portable "<stdin>", line 14: warning: #include of /usr/include/... may be non-portable "<stdin>", line 15: warning: #include of /usr/include/... may be non-portable "<stdin>", line 16: warning: #include of /usr/include/... may be non-portable "<stdin>", line 17: warning: #include of /usr/include/... may be non-portable "<stdin>", line 18: warning: #include of /usr/include/... may be non-portable "<stdin>", line 19: warning: #include of /usr/include/... may be non-portable "<stdin>", line 20: warning: #include of /usr/include/... may be non-portable "<stdin>", line 21: warning: #include of /usr/include/... may be non-portable "<stdin>", line 22: warning: #include of /usr/include/... may be non-portable "<stdin>", line 23: warning: #include of /usr/include/... may be non-portable "/usr/include/glib-2.0/glib/ghostutils.h", line 21: #error: "Only <glib.h> can be included directly." cc: acomp failed for -
Created attachment 150280 [details] [review] Add -DGLIB_COMPILATION Adding -DGLIB_COMPILATION for GLib-2.0.gir could fix this bug.
Review of attachment 150280 [details] [review]: Please commit this right away.
Review of attachment 150280 [details] [review]: Committed to master http://git.gnome.org/browse/gobject-introspection/commit/?id=2bab940ad9dd947379188cfa6f5990352660cd25
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]