GNOME Bugzilla – Bug 597480
Fails to build with GTK+ 2.18
Last modified: 2010-08-31 06:10:17 UTC
In GTK+ 2.18, gtk_widget_get_allocation() was added to GTK+; since guile-gnome has a definition for that function in its gtk-support.c file, it fails to build: > /bin/bash ../../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../../.. -I../../../glib/gnome/gobject -I../../../glib/gnome/gobject -I. -I. -Wall -g -D_REENTRANT -I/usr/include/guile-cairo -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -std=gnu99 -g -O2 -g -Wall -O2 -c -o libgw_guile_gnome_gtk_la-guile-gtk-tree-model.lo `test -f 'guile-gtk-tree-model.c' || echo './'`guile-gtk-tree-model.c > libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../.. -I../../../glib/gnome/gobject -I../../../glib/gnome/gobject -I. -I. -Wall -g -D_REENTRANT -I/usr/include/guile-cairo -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -std=gnu99 -g -O2 -g -Wall -O2 -c guile-gtk-tree-model.c -fPIC -DPIC -o .libs/libgw_guile_gnome_gtk_la-guile-gtk-tree-model.o > In file included from guile-gtk-tree-model.c:33: > gtk-support.h:120: error: conflicting types for 'gtk_widget_get_allocation' > /usr/include/gtk-2.0/gtk/gtkwidget.h:621: error: previous declaration of 'gtk_widget_get_allocation' was here > make[6]: *** [libgw_guile_gnome_gtk_la-guile-gtk-tree-model.lo] Error 1 Reported originally on the Debian BTS: <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549752>.
Created attachment 148640 [details] [review] Fix compilation error on gtk_widget_get_allocation() with GTK 2.18
Also note that, since GTK 2.18, it is not anymore possible to compile with 'Werror' turned on: the third argument of gtk_recent_info_get_application_info() is no more a 'gchar**' but a 'const gchar**', the build fails with an 'incompatible pointer type'. Passing '--disable-Werror' to configure fixes the problem.
Applied, thanks :)