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 735112 - FTBFS with --with-cheese
FTBFS with --with-cheese
Status: RESOLVED FIXED
Product: gnome-contacts
Classification: Core
Component: general
3.13.x
Other All
: Normal critical
: ---
Assigned To: GNOME Contacts maintainer(s)
GNOME Contacts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-08-20 16:31 UTC by Philip Withnall
Modified: 2015-04-22 03:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
AvatarDialog: Fix syntax error, Gtk.Stack has no set_current_page() (836 bytes, patch)
2014-08-21 14:32 UTC, Rico Tzschichholz
committed Details | Review

Description Philip Withnall 2014-08-20 16:31:16 UTC
As reported on IRC, the
	views_stack.set_current_page (2);
line in contacts-avatar-dialog.vala aborts the build when building with --with-cheese, because GtkStack doesn’t have a set_current_page() method. That means the 3.13.90 tarball is broken --with-cheese.

Even if this is fixed, it exposes a fundamental problem with the use of Vala #if conditionals in the code — they aren’t propagated to the generated C code, so if a tarball is generated with --with-cheese, someone can’t then configure it --without-cheese and compile the C code from the tarball without re-running valac, which somewhat undermines the point of shipping generated C code in the tarball.

One suggested solution is to have two separate .vala files for the --with-cheese code and the --without-cheese code (there’s probably a nice way of separating it out to eliminate duplication), and to always generate C code from both. The --with[out]-cheese configure option would then affect which C file is compiled and which object file is linked into the gnome-contacts binary — rather than which .vala file is compiled in the first place.

That’s what libfolks does for its Zeitgeist support: https://git.gnome.org/browse/folks/tree/backends/telepathy/lib/Makefile.am#n80
Comment 1 Rico Tzschichholz 2014-08-21 14:32:45 UTC
Created attachment 284094 [details] [review]
AvatarDialog: Fix syntax error, Gtk.Stack has no set_current_page()
Comment 2 Philip Withnall 2014-08-21 14:40:44 UTC
Review of attachment 284094 [details] [review]:

Looks good to me, thanks. Please push to master.
Comment 3 Philip Withnall 2014-08-21 14:41:21 UTC
Note that even after this patch is pushed, the problems of #if conditionals in Vala code still need to be addressed before this bug can be closed.
Comment 4 Rico Tzschichholz 2014-08-21 15:17:13 UTC
Review of attachment 284094 [details] [review]:

Pushed