GNOME Bugzilla – Bug 575329
gtk/gtkscalebutton fails to build on OpenSolaris
Last modified: 2009-03-21 03:22:17 UTC
Please describe the problem: gtk+ revision 22538 from Subversion fails to build under GNOME jhbuild on OpenSolaris Nevada build 101. Steps to reproduce: gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/space/buildbot/prefix/lib\" -DGTK_DATADIR=\"/space/buildbot/prefix/share\" -DGTK_DATA_PREFIX=\"/space/buildbot/prefix\" -DGTK_SYSCONFDIR=\"/space/buildbot/prefix/etc\" -DGTK_VERSION=\"2.16.1\" -DGTK_BINARY_VERSION=\"2.10.0\" -DGTK_HOST=\"sparc-sun-solaris2.11\" -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file,cups\" "-DGTK_PRINT_PREVIEW_COMMAND=\"evince --unlink-tempfile --preview --print-settings %s %f\"" -I.. -I../gtk -I.. -I../gdk -I../gdk -I../gdk-pixbuf -I../gdk-pixbuf -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -D_PTHREADS -D_POSIX_PTHREAD_SEMANTICS -I/space/buildbot/prefix/include/glib-2.0 -I/space/buildbot/prefix/lib/glib-2.0/include -I/space/buildbot/prefix/include/pango-1.0 -I/space/buildbot/prefix/include/cairo -I/space/buildbot/prefix//include/pixman-1 -I/space/buildbot/prefix//include -I/space/buildbot/prefix/include/atk-1.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/X11/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -g -O2 -Wall -MT gtkscalebutton.lo -MD -MP -MF .deps/gtkscalebutton.Tpo -c gtkscalebutton.c -fPIC -DPIC -o .libs/gtkscalebutton.o gtkscalebutton.c: In function `gtk_scale_button_set_property': gtkscalebutton.c:437: warning: implicit declaration of function `gtk_scale_button_set_orientation' gtkscalebutton.c: At top level: gtkscalebutton.c:741: error: conflicting types for 'gtk_scale_button_set_orientation' gtkscalebutton.c:437: error: previous implicit declaration of 'gtk_scale_button_set_orientation' was here Actual results: Expected results: Does this happen every time? Other information: Full uname: SunOS manduba 5.11 snv_101 sun4u sparc SUNW,Ultra-Enterprise Full GCC version: Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.11/3.4.3/specs Configured with: /gates/sfwnv/builds/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-20050802)
For the record: Sun Studio Compiler complains like this gmake[4]: Entering directory `/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/gtk+-2.16.0/gtk' source='gtkscalebutton.c' object='gtkscalebutton.lo' libtool=yes \ depfile='.deps/gtkscalebutton.Plo' tmpdepfile='.deps/gtkscalebutton.TPlo' \ depmode=none /opt/pkg/ssc/bin/pdksh ../depcomp \ /opt/pkg/ssc/bin/pdksh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/opt/pkg/ssc/lib\" -DGTK_DATADIR=\"/opt/pkg/ssc/share\" -DGTK_DATA_PREFIX=\"/opt/pkg/ssc\" -DGTK_SYSCONFDIR=\"/opt/pkg/ssc/libdata\" -DGTK_VERSION=\"2.16.0\" -DGTK_BINARY_VERSION=\"2.10.0\" -DGTK_HOST=\"i386-sun-solaris2\" -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file,lpr\" -DGTK_PRINT_PREVIEW_COMMAND=\""evince --unlink-tempfile --preview --print-settings %s %f"\" -I.. -I../gtk -I.. -I../gdk -I../gdk -I../gdk-pixbuf -I../gdk-pixbuf -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -D_PTHREADS -D_POSIX_PTHREAD_SEMANTICS -I/opt/pkg/ssc/include/glib/glib-2.0 -I/opt/pkg/ssc/lib/glib-2.0/include -I/opt/pkg/ssc/include/pango-1.0 -I/opt/pkg/ssc/include/cairo -I/opt/pkg/ssc/include/pixman-1 -I/opt/pkg/ssc/include/freetype2 -I/opt/pkg/ssc/include -I/opt/pkg/ssc/include/libpng12 -I/opt/pkg/ssc/include/atk-1.0 -DPREFIX="\"/opt/pkg/ssc\"" -I/opt/pkg/ssc/include -I/opt/pkg/ssc/include/freetype2 -I/opt/pkg/ssc/include/python2.5 -I/opt/pkg/ssc/include/db4 -I/usr/include -D_REENTRANT -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -I/opt/pkg/ssc/include -DGDK_PIXBUF_DISABLE_DEPRECATED -O -I/opt/pkg/ssc/include -I/opt/pkg/ssc/include/freetype2 -I/opt/pkg/ssc/include/python2.5 -I/opt/pkg/ssc/include/db4 -I/usr/include -D_REENTRANT -c -o gtkscalebutton.lo `test -f 'gtkscalebutton.c' || echo './'`gtkscalebutton.c cc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/opt/pkg/ssc/lib\" -DGTK_DATADIR=\"/opt/pkg/ssc/share\" -DGTK_DATA_PREFIX=\"/opt/pkg/ssc\" -DGTK_SYSCONFDIR=\"/opt/pkg/ssc/libdata\" -DGTK_VERSION=\"2.16.0\" -DGTK_BINARY_VERSION=\"2.10.0\" -DGTK_HOST=\"i386-sun-solaris2\" -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file,lpr\" "-DGTK_PRINT_PREVIEW_COMMAND=\"evince --unlink-tempfile --preview --print-settings %s %f\"" -I../gtk -I../gdk -I../gdk-pixbuf -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -D_PTHREADS -D_POSIX_PTHREAD_SEMANTICS -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/glib/glib-2.0 -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/lib/glib-2.0/include -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/pango-1.0 -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/cairo -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/pixman-1 -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/freetype2 -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/libpng12 -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/atk-1.0 -DPREFIX=\"/opt/pkg/ssc\" -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/python2.5 -I/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/.buildlink/include/db4 -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_DEPRECATED -O -c gtkscalebutton.c -KPIC -DPIC -o .libs/gtkscalebutton.o "gtkalias.h", line 12: warning: non-portable use of "defined" operator in macro "gtkalias.h", line 123: warning: non-portable use of "defined" operator in macro [...] "gtkalias.h", line 12042: warning: non-portable use of "defined" operator in macro "gtkalias.h", line 12383: warning: non-portable use of "defined" operator in macro "gtkscalebutton.c", line 437: warning: implicit function declaration: gtk_scale_button_set_orientation "gtkscalebutton.c", line 739: identifier redeclared: gtk_scale_button_set_orientation current : function(pointer to struct _GtkScaleButton {struct _GtkButton {..} parent, pointer to struct _GtkWidget {..} plus_button, pointer to struct _GtkWidget {..} minus_button, pointer to struct _GtkScaleButtonPrivate {..} priv}, enum {GTK_ORIENTATION_VERTICAL(1), GTK_ORIENTATION_HORIZONTAL(0)}) returning void previous: function() returning int : "gtkscalebutton.c", line 437 "gtkaliasdef.c", line 16: warning: non-portable use of "defined" operator in macro "gtkaliasdef.c", line 127: warning: non-portable use of "defined" operator in macro [...] "gtkaliasdef.c", line 12046: warning: non-portable use of "defined" operator in macro "gtkaliasdef.c", line 12387: warning: non-portable use of "defined" operator in macro cc: acomp failed for gtkscalebutton.c gmake[4]: *** [gtkscalebutton.lo] Error 1 gmake[4]: Leaving directory `/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/gtk+-2.16.0/gtk' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/gtk+-2.16.0/gtk' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/gtk+-2.16.0/gtk' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/opt/pkgsrc/pkgsrc/x11/gtk2/work.ssc/gtk+-2.16.0' gmake: *** [all] Error 2 *** Error code 2 This if from within pkgsrc on OpenSolaris snv_101b.
Seems like a forward declaration is missing: --- gtkscalebutton.c.orig Fri Mar 13 06:40:33 2009 +++ gtkscalebutton.c Tue Mar 17 03:37:32 2009 @@ -153,6 +153,8 @@ static void gtk_scale_button_update_icon (GtkScaleButton *button); static void gtk_scale_button_scale_value_changed(GtkRange *range); +static void gtk_scale_button_set_orientation (GtkScaleButton *button, GtkOrientation orientation); + /* see below for scale definitions */ static GtkWidget *gtk_scale_button_scale_new (GtkScaleButton *button);
Thanks, feel free to commit that fix.
Fixed with revision 22574.