GNOME Bugzilla – Bug 786845
Vala 0.37.2 breaks build of diorite
Last modified: 2017-08-26 20:05:23 UTC
Diorite is failing to build in Fedora Rawhide [1] since Vala was update to version 0.37.2: ~~~ [ 64/127] Compiling build/KeyValueStorageClient.c KeyValueTree.c:151:13: error: static declaration of ‘_g_node_destroy__drt_key_value_tree_item_free0_’ follows non-static declaration static void _g_node_destroy__drt_key_value_tree_item_free0_ (GNode* self); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KeyValueTree.c:150:6: note: previous declaration of ‘_g_node_destroy__drt_key_value_tree_item_free0_’ was here void _g_node_destroy__drt_key_value_tree_item_free0_ (GNode* self); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BluetoothService.c: In function ‘_dbus_drt_bluetooth_profile1_release’: BluetoothService.c:1384:2: warning: implicit declaration of function ‘drt_bluez_profile1_release’; did you mean ‘drt_bluez_profile1_get_type’? [-Wimplicit-function-declaration] drt_bluez_profile1_release (self, &error); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drt_bluez_profile1_get_type BluetoothService.c: In function ‘_dbus_drt_bluetooth_profile1_new_connection’: BluetoothService.c:1443:2: warning: implicit declaration of function ‘drt_bluez_profile1_new_connection’; did you mean ‘drt_bluez_profile1_request_disconnection’? [-Wimplicit-function-declaration] drt_bluez_profile1_new_connection (self, device, fd, fd_properties, &error); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drt_bluez_profile1_request_disconnection BluetoothService.c: In function ‘_dbus_drt_bluetooth_profile1_request_disconnection’: BluetoothService.c:1477:44: warning: passing argument 1 of ‘drt_bluez_profile1_request_disconnection’ from incompatible pointer type [-Wincompatible-pointer-types] drt_bluez_profile1_request_disconnection (self, device, &error); ^~~~ BluetoothService.c:239:6: note: expected ‘DrtBluezProfile1 * {aka struct _DrtBluezProfile1 *}’ but argument is of type ‘DrtBluetoothProfile1 * {aka struct _DrtBluetoothProfile1 *}’ void drt_bluez_profile1_request_disconnection (DrtBluezProfile1* self, const char* device, GError** error); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Forms.c: In function ‘drt_form_add_entry’: Forms.c:2802:3: warning: ‘gtk_widget_set_margin_left’ is deprecated: Use 'gtk_widget_set_margin_start' instead [-Wdeprecated-declarations] gtk_widget_set_margin_left ((GtkWidget*) _tmp268_, 8); ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/gtk-3.0/gtk/gtkapplication.h:27:0, from /usr/include/gtk-3.0/gtk/gtkwindow.h:33, from /usr/include/gtk-3.0/gtk/gtkdialog.h:32, from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30, from /usr/include/gtk-3.0/gtk/gtk.h:31, from Forms.c:30: /usr/include/gtk-3.0/gtk/gtkwidget.h:1086:10: note: declared here void gtk_widget_set_margin_left (GtkWidget *widget, ^~~~~~~~~~~~~~~~~~~~~~~~~~ Forms.c:2818:2: warning: ‘gtk_widget_set_margin_left’ is deprecated: Use 'gtk_widget_set_margin_start' instead [-Wdeprecated-declarations] gtk_widget_set_margin_left (_tmp275_, 8); ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/gtk-3.0/gtk/gtkapplication.h:27:0, from /usr/include/gtk-3.0/gtk/gtkwindow.h:33, from /usr/include/gtk-3.0/gtk/gtkdialog.h:32, from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30, from /usr/include/gtk-3.0/gtk/gtk.h:31, from Forms.c:30: /usr/include/gtk-3.0/gtk/gtkwidget.h:1086:10: note: declared here void gtk_widget_set_margin_left (GtkWidget *widget, ^~~~~~~~~~~~~~~~~~~~~~~~~~ Forms.c:2820:2: warning: ‘gtk_widget_set_margin_right’ is deprecated: Use 'gtk_widget_set_margin_end' instead [-Wdeprecated-declarations] gtk_widget_set_margin_right (_tmp276_, 8); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/gtk-3.0/gtk/gtkapplication.h:27:0, from /usr/include/gtk-3.0/gtk/gtkwindow.h:33, from /usr/include/gtk-3.0/gtk/gtkdialog.h:32, from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30, from /usr/include/gtk-3.0/gtk/gtk.h:31, from Forms.c:30: /usr/include/gtk-3.0/gtk/gtkwidget.h:1091:10: note: declared here void gtk_widget_set_margin_right (GtkWidget *widget, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Waf: Leaving directory `/builddir/build/BUILD/diorite-4.6.0/build' Build failed -> task in 'dioriteglib4' failed with exit status 1 (run with -v to display more information) ~~~ This appears to be Vala issue according to Diorite upstream [2]: ~~~ So, two signatures are declared: void _g_node_destroy__drt_key_value_tree_item_free0_ (GNode* self); static void _g_node_destroy__drt_key_value_tree_item_free0_ (GNode* self); But only one implementation. static void _g_node_destroy__drt_key_value_tree_item_free0_ (GNode* self) { g_node_traverse (self, G_POST_ORDER, G_TRAVERSE_ALL, -1, _g_node_destroy__drt_key_value_tree_item_free0__node, NULL); g_node_destroy (self); } ~~~ [1]: https://apps.fedoraproject.org/koschei/package/diorite [2]: https://github.com/tiliado/diorite/issues/17
Created attachment 358492 [details] [review] codegen: Actually write declaration for GNodeTraverseFunc wrapper This fixes a very old typo which causes the wrong declaration to be written and results in a double definition.
Attachment 358492 [details] pushed as 4056b1c - codegen: Actually write declaration for GNodeTraverseFunc wrapper