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 694373 - Compile error: GISCAN GIMarshallingTests-1.0.gir issues warnings & stops the build
Compile error: GISCAN GIMarshallingTests-1.0.gir issues warnings & stops the ...
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-21 16:44 UTC by Hashem Nasarat
Modified: 2013-02-28 08:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Error output (26.96 KB, text/plain)
2013-02-21 16:44 UTC, Hashem Nasarat
  Details
improve cairo-gobject check and add _GI_DISABLE_CAIRO to scanner CPPFLAGS (2.19 KB, patch)
2013-02-26 00:16 UTC, David King
reviewed Details | Review
drop cairo versus cairo-gobject check and always depend on cairo-gobject (2.97 KB, patch)
2013-02-26 09:04 UTC, David King
committed Details | Review

Description Hashem Nasarat 2013-02-21 16:44:06 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.
Comment 1 Hashem Nasarat 2013-02-24 06:43:04 UTC
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.
Comment 2 Colin Walters 2013-02-24 07:21:45 UTC
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?
Comment 3 Michael Hill 2013-02-25 08:49:45 UTC
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)
Comment 4 Colin Walters 2013-02-25 22:29:26 UTC
(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
Comment 5 Michael Hill 2013-02-25 22:45:40 UTC
(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
Comment 6 David King 2013-02-26 00:16:58 UTC
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.
Comment 7 Colin Walters 2013-02-26 00:34:29 UTC
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.
Comment 8 David King 2013-02-26 09:04:38 UTC
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.
Comment 9 Colin Walters 2013-02-26 13:15:03 UTC
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 10 David King 2013-02-26 13:32:36 UTC
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.
Comment 11 Colin Walters 2013-02-26 20:44:47 UTC
Hashem, Michael - can you confirm this patch fixes the bug, by the way?
Comment 12 Michael Hill 2013-02-26 23:06:18 UTC
Works for me. Terrific.
Comment 13 Hashem Nasarat 2013-02-28 08:11:49 UTC
Compiles for me too :)
Nice job, all.