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 786845 - Vala 0.37.2 breaks build of diorite
Vala 0.37.2 breaks build of diorite
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: general
0.37.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-26 17:26 UTC by Vít Ondruch
Modified: 2017-08-26 20:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
codegen: Actually write declaration for GNodeTraverseFunc wrapper (1.02 KB, patch)
2017-08-26 20:02 UTC, Rico Tzschichholz
committed Details | Review

Description Vít Ondruch 2017-08-26 17:26:28 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
Comment 1 Rico Tzschichholz 2017-08-26 20:02:19 UTC
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.
Comment 2 Rico Tzschichholz 2017-08-26 20:05:18 UTC
Attachment 358492 [details] pushed as 4056b1c - codegen: Actually write declaration for GNodeTraverseFunc wrapper