GNOME Bugzilla – Bug 352226
gtkmm-2.10.0 build problem with gcc-3.3.6
Last modified: 2006-11-23 15:31:34 UTC
gtkmm-2.10.0 fails to build out of the box with gcc-3.3.6 (Slackware 10.2) and glibmm-2.12.0. [zlatko@disclosure]:~/usrlocal/src/gtkmm-2.10.0$ make [...] if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/cairomm-1.0 -I/usr/local/include/cairo -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gtk-unix-print-2.0 -I/usr/X11R6/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -g -O2 -Wall -MT listviewtext.lo -MD -MP -MF ".deps/listviewtext.Tpo" -c -o listviewtext.lo listviewtext.cc; \ then mv -f ".deps/listviewtext.Tpo" ".deps/listviewtext.Plo"; else rm -f ".deps/listviewtext.Tpo"; exit 1; fi g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"gtkmm\" -I../../gtk -I../../gtk -I../../pango -I../../pango -I../../atk -I../../atk -I../../gdk -I../../gdk -I../../gtk -I../../gtk -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/cairomm-1.0 -I/usr/local/include/cairo -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gtk-unix-print-2.0 -I/usr/X11R6/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -g -O2 -Wall -MT listviewtext.lo -MD -MP -MF .deps/listviewtext.Tpo -c listviewtext.cc -fPIC -DPIC -o .libs/listviewtext.o listviewtext.cc: In member function `Glib::ustring Gtk::ListViewText::get_column_title(unsigned int) const': listviewtext.cc:86: error: syntax error before `;' token make[5]: *** [listviewtext.lo] Error 1 make[5]: Leaving directory `/usr/local/src/gtkmm-2.10.0/gtk/gtkmm' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/usr/local/src/gtkmm-2.10.0/gtk/gtkmm' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/usr/local/src/gtkmm-2.10.0/gtk' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/local/src/gtkmm-2.10.0/gtk' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/gtkmm-2.10.0' make: *** [all] Error 2 [zlatko@disclosure]:~/usrlocal/src/gtkmm-2.10.0$ gcc -v Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/specs Configured with: ../gcc-3.3.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux Thread model: posix gcc version 3.3.6 [zlatko@disclosure]:~/usrlocal/src/gtkmm-2.10.0$ pkg-config --modversion glibmm-2.4 2.12.0 [zlatko@disclosure]:~/usrlocal/src/gtkmm-2.10.0$ The attached patch fixes this problem.
Created attachment 71273 [details] [review] patch to fix build error on gcc-3.3.6
Does it work with "" instead of Glib::ustring()? That's a bit cleaner.
Please respond.
why not just use the default constructor: Glib::ustring dummy; That doesn't work?
I'd prefer not to create a variable that's only used inside g_return_val_if_fail(), because the g_return_val_if_fail() macro might conceivable resolve to nothing, leaving an unused variable.
Murray, as per comment #2, using "" instead of Glib::ustring() does indeed work. This was with gcc 3.4.6.
Sorry for answering late, I only just returned from a three weeks' vacation. I'll try to do #2 and #3 by end of this week.
Don't worry, Joshua already confirmed that it works. I have committed it to cvs HEAD. Thanks.
*** Bug 350881 has been marked as a duplicate of this bug. ***