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 590913 - gir-repository fails to build due gtk_widget_get_allocation
gir-repository fails to build due gtk_widget_get_allocation
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal blocker
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-08-06 08:09 UTC by Luca Ferretti
Modified: 2015-02-07 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove gtk_widget_get_allocation() (1.21 KB, patch)
2009-08-13 14:53 UTC, Vincent Untz
none Details | Review
Fix for addition of gtk_widget_get_allocation() to GTK+ (2.05 KB, patch)
2009-08-14 22:21 UTC, Owen Taylor
none Details | Review

Description Luca Ferretti 2009-08-06 08:09:28 UTC
This is the error reported in my jhbuild sandbox:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/opt/gnome2/include/gtk-2.0 -I/opt/gnome2/lib64/gtk-2.0/include -I/opt/gnome2/include/atk-1.0 -I/opt/gnome2/include/cairo -I/opt/gnome2/include/pango-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib64/glib-2.0/include -I/opt/gnome2/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -MT libgirepo_Gtk_custom_la-Gtk-custom.lo -MD -MP -MF .deps/libgirepo_Gtk_custom_la-Gtk-custom.Tpo -c ./Gtk-custom.c  -fPIC -DPIC -o .libs/libgirepo_Gtk_custom_la-Gtk-custom.o
In file included from ./Gtk-custom.c:10:
./Gtk-custom.h:18: error: conflicting types for ‘gtk_widget_get_allocation’
/opt/gnome2/include/gtk-2.0/gtk/gtkwidget.h:602: error: previous declaration of ‘gtk_widget_get_allocation’ was here
./Gtk-custom.c:60: error: conflicting types for ‘gtk_widget_get_allocation’
/opt/gnome2/include/gtk-2.0/gtk/gtkwidget.h:602: error: previous declaration of ‘gtk_widget_get_allocation’ was here
Comment 1 Cody Russell 2009-08-13 14:38:21 UTC
gtk_widget_get_allocation() was added here:

http://bugzilla.gnome.org/show_bug.cgi?id=585211
Comment 2 Vincent Untz 2009-08-13 14:53:33 UTC
Created attachment 140667 [details] [review]
Remove gtk_widget_get_allocation()

So the stupid approach is to just remove stuff from Gtk-custom.*. Not sure it's enough, but it should build, at least ;-)
Comment 3 Owen Taylor 2009-08-13 18:11:23 UTC
The gtk-custom removal is right. Providing stuff in the GTK+ namespace was always questionable.

I think you want to add however:

 /**
  * gtk_widget_get_allocation:
  * @widget: the widget
  * @allocation: (out): location to store the allocation
  */

To get the function properly annotated. (There are some problems with gobject-introspection not having a proper idea of out-structs-by-value, but I don't think the above will make thigns worse.)

Comment 4 Owen Taylor 2009-08-14 22:21:00 UTC
Created attachment 140809 [details] [review]
Fix for addition of gtk_widget_get_allocation() to GTK+

gtk_widget_get_allocation() was recently added to GTK+, so having
a custom function barging into the GTK+ namespace just doesn't work
any more.

Remove the custom gtk_widget_get_allocation(), add annotations
for the new gtk_widget_get_annotation().

Based on patch from Vincent Untz
Comment 5 Owen Taylor 2009-08-14 22:23:25 UTC
Pushed your patch with the addition of the annotation. Even with the annotation it will likely break current users of the gtk_widget_get_allocation() custom function, because of the gobject-introspection/gjs problems mentioned above, but that's not gir-repository's fault.

We really need to remove all the -custom functions - they were a bad idea from the start and only can lead to further breakage like this.
Comment 6 André Klapper 2015-02-07 16:48:30 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]