GNOME Bugzilla – Bug 154973
Sun Forte build problems
Last modified: 2005-01-18 12:16:37 UTC
Compiling gtkmm-2.4.5 (gtk/gtkmm/celllayout.cc) with Sun Studio 8 fails with "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.5/gtk/gtkmm/treeiter.h", line 352: Error: Too few arguments for template std::reverse_iterator. "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.5/gtk/gtkmm/treeiter.h", line 354: Error: Too few arguments for template std::reverse_iterator. Copying the ifdefs from treepath.h seems to fix the problem (GLIBMM_HAVE_SUN_REVERSE_ITERATOR). *** gtk/gtkmm/treeiter.h~ 2004-09-02 17:15:53.913660000 +0200 --- gtk/gtkmm/treeiter.h 2004-10-09 15:44:31.910416000 +0200 *************** *** 349,357 **** --- 349,367 ---- typedef unsigned int size_type; typedef int difference_type; typedef Gtk::TreeIter iterator; + #ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR typedef std::reverse_iterator<iterator> reverse_iterator; + #else + typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, + int, int&, int*, ptrdiff_t> reverse_iterator; + #endif typedef Gtk::TreeIter const_iterator; //TODO: Make it a real const_iterator. + #ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR typedef std::reverse_iterator<const_iterator> const_reverse_iterator; + #else + typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag, + int, const int&, const int*, ptrdiff_t> const_reverse_iterator; + #endif iterator begin(); const_iterator begin() const;
Thanks. Does this patch fix the whole build for you, including the examples? In future, please attach patches and patch the ChangeLog: http://www.gtkmm.org/bugs.shtml#CreatingPatches Sorry for the slow response.
Please respond.
Not much quicker myself .... thanks for ping:ing me. The build is not successful, it terminates a little later with .... "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.5/gtk/gtkmm/textiter.cc", line 250: Error: Overloading ambiguity between "Glib::unwrap<Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)" and "Glib::unwrap<const Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)". "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.5/gtk/gtkmm/textiter.cc", line 255: Error: Overloading ambiguity between "Glib::unwrap<Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)" and "Glib::unwrap<const Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)". "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.5/gtk/gtkmm/textiter.cc", line 260: Error: Overloading ambiguity between "Glib::unwrap<Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)" and "Glib::unwrap<const Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)". "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.5/gtk/gtkmm/textiter.cc", line 265: Error: Overloading ambiguity between "Glib::unwrap<Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)" and "Glib::unwrap<const Gtk::TextTag>(const Glib::RefPtr<const Gtk::TextTag>&)". I am not sure what to do ....
OK. You are one of the first to try this - because we only recently ported libsigc++ 2 to the SUN Forte compiler. $ CC -V By the way, exactly what version of the compiler do you have? For instance, we know that libsigc++ 2 builds with CC: Sun C++ 5.5 Patch 113817-03 2003/10/14 I will try to make some changes that might solve this. If you can give me ssh access to your compiler then I can do this more quickly, of course.
By the way, I have made the treeiter changes already. Please try to submit a cvs patch in future: http://www.gtkmm.org/bugs.shtml#CreatingPatches
I have made some changes in the gtkmm 2.4.8 tarball, released today. Could you please test this and post the errors here again. And please tell us exactly what version of the compiler you have. For instance, we know that libsigc++ 2 builds with $ CC -V CC: Sun C++ 5.5 Patch 113817-03 2003/10/14
Created attachment 34356 [details] [review] Patch for radioaction.h
gtkmm 2.4.8 compiled fine with a minor tweak in radioaction.h (see previous attachment). All examples except treemodelcustom compiled. "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.8/examples/treemodelcustom/exampletreemodel.h", line 87: Error: ExampleTreeModel::GlueItem is not accessible from ExampleTreeModel::GlueList. 1 Error(s) detected. Demos did not compile, I have created a minor patch for demowindow.cc, but there is also an error in example_stockbrowser.cc. "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.8/demos/gtk-demo/example_stockbrowser.cc", line 139: Error: Cannot use Glib::SListHandle<Gtk::StockID, Gtk::StockID_Traits> to initialize const std::vector<Gtk::StockID>. "/it/sw/X11/src/libraries/Gtk/gtkmm-2.4.8/demos/gtk-demo/example_stockbrowser.cc", line 243: Error: Cannot use Glib::ArrayHandle<Gtk::IconSize, Glib::Container_Helpers::TypeTraits<Gtk::IconSize>> to initialize const std::vector<Gtk::IconSize>. 2 Error(s) detected. Since I compile on x86, the patch-level is little different, it should correspond to 113817-10 on sparc. % CC -V CC: Sun C++ 5.5 Patch 113819-10 2004/10/06 I have tested Studio9 (CC: Sun C++ 5.6 Patch 117550-01 2004/10/12) but it didn't like the include-files from libsigc++.
Created attachment 34363 [details] [review] Patch for demowindow.cc
Thanks. Regarding your radiobutton patch: - typedef RadioButtonGroup Group; Why is this necessary? What error does the compiler show? Regarding your demowindow change: + #if defined(__SUNPRO_CC) && !defined(_REENTRANT) + #define _REENTRANT Could you please explain this? I can't check this in without some comment. Please try to create real patches in future. It makes things easier: http://www.gtkmm.org/bugs.shtml#CreatingPatches > I have tested Studio9 (CC: Sun C++ 5.6 Patch 117550-01 2004/10/12) but it didn't > like the include-files from libsigc++. Could you give us some more details. Where exactly did you see the error, and what was it? If this is just a libsigc++ error then please file a bug for libsigc++.
This should all now be fixed in cvs, in both the gtkmm-2-4 and HEAD branches. I'll make a new 2.4 release soon. Thanks. However, I did not use the suggested _REENTRANT change, because I am not sure what it is for, and it did not fix any problems for me. And I'm still don't know what you mean about the libsigc++ headers.