GNOME Bugzilla – Bug 694373
Compile error: GISCAN GIMarshallingTests-1.0.gir issues warnings & stops the build
Last modified: 2013-02-28 08:11:49 UTC
Created attachment 237063 [details] Error output Debian 7, compiling from jhbuild with the 3.8 moduleset. When compiling gjs it issues warnings (and halts) when the GISCAN GIMarshallingTests step occurs. The output is attached. I tried removing and rebuilding gobject-introspection to no avail.
I had the following discussion with gcampax on IRC regarding this issue: http://pastebin.com/raw.php?i=wYKPedyp He could not figure out why I was having problems. This problem affects my building from git and the 3.7.90 modulesets. Removing the failing checks allows the build to succeed, and no apparent problems in running gnome-shell at a later point.
Hi Hashem, I honestly am baffled too... Hm. Could you have ever done a "sudo make install" type of thing? Then you might have ended up with root-owned files in your jhbuild root that are stale. Does: $ find /path/to/jhbuild/installroot -user 0 show anything?
Same result on openSUSE and Mageia. The above command shows this: /home/mike/build/lib64/gnome-ostree/libgsystem.la David King suggested this as a temporary fix: diff --git a/Makefile-test.am b/Makefile-test.am index 98b9fe3..03c4b69 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -45,7 +45,7 @@ nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests libregress_la_CPPFLAGS = libregress_la_CFLAGS = $(GJS_CFLAGS) libregress_la_LDFLAGS = -avoid-version $(GJS_LIBS) -libregress_scannerflags_includes = --include=Gio-2.0 +libregress_scannerflags_includes = --include=Gio-2.0 --include=cairo-1.0 if ENABLE_CAIRO libregress_la_CFLAGS += $(GJS_CAIRO_CFLAGS) libregress_la_LDFLAGS += $(GJS_CAIRO_LIBS)
(In reply to comment #3) > Same result on openSUSE and Mageia. The above command shows this: > > /home/mike/build/lib64/gnome-ostree/libgsystem.la Ok, that's unrelated to this bug, but you should fix that file to be owned by your user. > -libregress_scannerflags_includes = --include=Gio-2.0 > +libregress_scannerflags_includes = --include=Gio-2.0 --include=cairo-1.0 > if ENABLE_CAIRO > libregress_la_CFLAGS += $(GJS_CAIRO_CFLAGS) > libregress_la_LDFLAGS += $(GJS_CAIRO_LIBS) Hrm...do you guys have the cairo-gobject pkg-config file installed? $ pkg-config --modversion cairo-gobject
(In reply to comment #4) > Hrm...do you guys have the cairo-gobject pkg-config file installed? Yes. > $ pkg-config --modversion cairo-gobject 1.12.12 *** Building gjs *** [8/9] make -j 2 make all-am make[1]: Entering directory `/home/mike/src/gjs' GISCAN Regress-1.0.gir GISCAN GIMarshallingTests-1.0.gir In file included from <stdin>:4:0: /home/mike/build/share/gobject-introspection-1.0/tests/regress.h:5:27: fatal error: cairo-gobject.h: No such file or directory compilation terminated. Error while processing the source. make[1]: *** [Regress-1.0.gir] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/mike/src/gjs' make: *** [all] Error 2
Created attachment 237401 [details] [review] improve cairo-gobject check and add _GI_DISABLE_CAIRO to scanner CPPFLAGS (In reply to comment #5) > make[1]: Entering directory `/home/mike/src/gjs' > GISCAN Regress-1.0.gir > GISCAN GIMarshallingTests-1.0.gir > In file included from <stdin>:4:0: > /home/mike/build/share/gobject-introspection-1.0/tests/regress.h:5:27: fatal > error: cairo-gobject.h: No such file or directory > compilation terminated. > Error while processing the source. I investigated this a bit and realised that the _GI_DISABLE_CAIRO define was not added to the scanner flags for Regress-1.0.gir. I also noticed the the configure.ac checks for cairo-gobject could be improved a bit. Attached patch works for me with both --with-cairo and --without-cairo, but I only tested quickly.
Review of attachment 237401 [details] [review]: But nothing actually uses the ENABLE_CAIRO conditional anymore, no? I think we can just delete the "plain cairo" support case - cairo-gobject has been around for a long time now.
Created attachment 237412 [details] [review] drop cairo versus cairo-gobject check and always depend on cairo-gobject Makes sense to me, so the attached patch required cairo-gobject if cairo is enabled.
Review of attachment 237412 [details] [review]: ::: Makefile-test.am @@ +65,3 @@ Regress_1_0_gir_LIBS = libregress.la Regress_1_0_gir_FILES = $(nodist_libregress_la_SOURCES) +Regress_1_0_gir_SCANNERFLAGS = --warn-all --warn-error $(libregress_scannerflags_includes) $(libregress_scannerflags_defines) Minor, but you could probably reuse libregress_la_CPPFLAGS here rather than duplicating it. Either way, patch looks good to me.
Comment on attachment 237412 [details] [review] drop cairo versus cairo-gobject check and always depend on cairo-gobject Thanks for the review. I pushed to master with your suggested change as commit cfd2d56786600b9e419cf2c26e1bf305e7cacc32.
Hashem, Michael - can you confirm this patch fixes the bug, by the way?
Works for me. Terrific.
Compiles for me too :) Nice job, all.