Ticket #600 (new defect)

Opened 9 months ago

Last modified 8 months ago

gobby fails to compile with clang

Reported by: jhowarth Owned by: armin
Priority: normal Milestone: Gobby 0.4.94
Component: Gobby Version:
Severity: normal Keywords: clang
Cc: Launchpad Bug:

Description

Both Apple clang version 4.0 and current clang svn fail to compile gobby 0.4.94 due to the error...

clang++ -DHAVE_CONFIG_H -I. -I../../code -I/sw/include/libxml++-2.6 -I/sw/lib/libxml++-2.6/include -I/sw/include/glibmm-2.4 -I/sw/lib/glibmm-2.4/include -I/sw/include/sigc++-2.0 -I/sw/lib/sigc++-2.0/include -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/giomm-2.4 -I/sw/lib/giomm-2.4/include -I/sw/include -I/sw/include/gtkmm-2.4 -I/sw/lib/gtkmm-2.4/include -I/sw/include/pangomm-1.4 -I/sw/lib/pangomm-1.4/include -I/sw/include/gtk-2.0 -I/sw/include/gtk-unix-print-2.0 -I/sw/include/atkmm-1.6 -I/sw/include/gdkmm-2.4 -I/sw/lib/gdkmm-2.4/include -I/sw/include/cairomm-1.0 -I/sw/lib/cairomm-1.0/include -I/sw/include/pango-1.0 -I/sw/include/cairo -I/sw/include/freetype2 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/gtksourceview-2.0 -I/opt/X11/include -I/usr/X11R6/include -I/usr/X11/include -I/sw/include/libinfinity-0.5 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/libxml2 -I/sw/include -I/sw/include/libinftext-0.5 -I/sw/include/libinfgtk-0.5 -I/sw/include/gtk-2.0 -I/sw/lib/gtk-2.0/include -I/sw/include/atk-1.0 -I/sw/include/cairo -I/sw/include/pango-1.0 -I/sw/include/freetype2 -I/sw/include/libinftextgtk-0.5 -I/opt/X11/include -I/usr/X11R6/include -I/usr/X11/include -I../../code -I/sw/include -Os -MT serialize.o -MD -MP -MF .deps/serialize.Tpo -c -o serialize.o serialize.cpp mv -f .deps/i18n.Tpo .deps/i18n.Po mv -f .deps/serialize.Tpo .deps/serialize.Po mv -f .deps/file.Tpo .deps/file.Po mv -f .deps/resolv.Tpo .deps/resolv.Po In file included from config.cpp:19: ../../code/util/config.hpp:455:7: error: explicit specialization of 'Gobby::serialize::default_context_to<Glib::ustring>' after

instantiation

class default_context_to<Glib::ustring>: public context_base_to<Glib::ustring>

../../code/util/config.hpp:72:5: note: implicit instantiation first required here

serialize::default_context_to<DataType?>()

mv -f .deps/color.Tpo .deps/color.Po config.cpp:298:18: error: unknown type name 'data_type'

to_string(const data_type& from) const

config.cpp:298:2: error: template specialization requires 'template<>'

to_string(const data_type& from) const

3 errors generated. make[3]: *** [config.o] Error 1 make[3]: *** Waiting for unfinished jobs.... mv -f .deps/closebutton.Tpo .deps/closebutton.Po mv -f .deps/historyentry.Tpo .deps/historyentry.Po make[2]: *** [all-recursive] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1

Attachments

gobby.patch (2.4 kB) - added by jhowarth 8 months ago.
gobby 0.4.94 clang fix

Change History

Changed 8 months ago by jhowarth

gobby 0.4.94 clang fix

Changed 8 months ago by jhowarth

The fix for the explicit specialization errors under clang is pretty trivial. The attached gobby.patch allows gobby 0.4.94 to compley compile under Apple Clang 4.1 from Xcode 4.5 on Mac OS X 10.7.5 by moving the declaration of the serialize namespace to the front of the Gobby namespace declaration in code/util/config.hpp.

Note: See TracTickets for help on using tickets.