GNOME Bugzilla – Bug 121646
won't build with older gcc
Last modified: 2011-01-16 23:41:31 UTC
Maybe similar to http://bugzilla.gnome.org/show_bug.cgi?id=120619 nexus@thune[5:45pm]/usr/src/libgnomeuimm(527) gcc -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20020723 (prerelease) g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"libgnomeuimm\" -I../../libgnomeui - I../../../libgnomeuimm-2.0.0/libgnomeui -DORBIT2=1 -pthread - I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 - I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 - I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui- 2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include - I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gnome- vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation- 2.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/lib/gtk- 2.0/include -I/usr/include/atk-1.0 -I/usr/X11R6/include - I/usr/include/libxml2 -I/usr/include/libgnomemm-2.0 -I/usr/lib/libgnomemm- 2.0/include -I/usr/include/gtkmm-2.0 -I/usr/lib/gtkmm-2.0/include - I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 - I/usr/include/libgnomecanvasmm-2.0 -I/usr/lib/libgnomecanvasmm- 2.0/include -I/usr/include/gconfmm-2.0 -I/usr/lib/gconfmm-2.0/include - I/usr/include/libglademm-2.0 -I/usr/lib/libglademm-2.0/include - I/usr/include/libglade-2.0 -g -O2 -c ../../../libgnomeuimm- 2.0.0/libgnomeui/libgnomeuimm/dateedit.cc -Wp,-MD,.deps/dateedit.TPlo - fPIC -DPIC -o .libs/dateedit.o ../../../libgnomeuimm-2.0.0/libgnomeui/libgnomeuimm/dateedit.cc: In method `Gnome::UI::DateEdit::DateEdit(long int, bool = true, bool = true)': ../../../libgnomeuimm-2.0.0/libgnomeui/libgnomeuimm/dateedit.cc:40: static_cast from `Gnome::UI::DateEditFlags' to `GnomeDateEditFlags' ../../../libgnomeuimm-2.0.0/libgnomeui/libgnomeuimm/dateedit.cc: In method `Gnome::UI::DateEdit::DateEdit(long int = 0, Gnome::UI::DateEditFlags = DATE_EDIT_SHOW_TIME)': ../../../libgnomeuimm-2.0.0/libgnomeui/libgnomeuimm/dateedit.cc:47: static_cast from `Gnome::UI::DateEditFlags' to `GnomeDateEditFlags' ../../../libgnomeuimm-2.0.0/libgnomeui/libgnomeuimm/dateedit.cc: In method `void Gnome::UI::DateEdit::set_flags(Gnome::UI::DateEditFlags)': ../../../libgnomeuimm-2.0.0/libgnomeui/libgnomeuimm/dateedit.cc:257: static_cast from `Gnome::UI::DateEditFlags' to `GnomeDateEditFlags' make[4]: *** [dateedit.lo] Error 1 make[4]: Leaving directory `/usr/src/libgnomeuimm/libgnomeuimm-2.0.0- build/libgnomeui/libgnomeuimm' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/usr/src/libgnomeuimm/libgnomeuimm-2.0.0- build/libgnomeui/libgnomeuimm' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/libgnomeuimm/libgnomeuimm-2.0.0- build/libgnomeui' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/libgnomeuimm/libgnomeuimm-2.0.0- build/libgnomeui' make: *** [all-recursive] Error 1
Using a C-style cast instead of a static_cast<>, with an explanatory comment, would make this compile with gcc 2.95. Would someone like to submit a patch for that?
As I came across this same problem when compiling libgnomeuimm, I started looking for a possible fix (I'm not very well versed with C++, after all) and found this: http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11-toolkits/libgnomeuimm/files/extra-patch-old_gcc_bugs?rev=1.2&content-type=text/x-cvsweb-markup
Yes, it's not difficult. If someone submits an actual patch then I can approve it and it can be committed to cvs.
If the patch looks good to you, then let me help you :)
Created attachment 20439 [details] [review] libgnomeuimm-2.0.0-gcc2_fix.patch
Yes, someone please commit this, with a ChangeLog entry.
You have patched generated files, so this is not actually a patch. Please see http://www.gtkmm.org/bugs.shtml about making patches.
We will not try to support gcc 2.9* for gtkmm 2.4, but we will happily apply patches that anyone provides. Please reopen this bug if you have a patch that fixes this for you.