After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 154973 - Sun Forte build problems
Sun Forte build problems
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: build
2.4
Other opensolaris
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-10-09 13:57 UTC by Joel Fredrikson
Modified: 2005-01-18 12:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for radioaction.h (784 bytes, patch)
2004-12-01 13:52 UTC, Joel Fredrikson
none Details | Review
Patch for demowindow.cc (1009 bytes, patch)
2004-12-01 15:13 UTC, Joel Fredrikson
none Details | Review

Description Joel Fredrikson 2004-10-09 13:57:51 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;
Comment 1 Murray Cumming 2004-10-12 12:07:09 UTC
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.
Comment 2 Murray Cumming 2004-10-19 17:35:28 UTC
Please respond.
Comment 3 Joel Fredrikson 2004-10-19 17:42:05 UTC
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 ....
Comment 4 Murray Cumming 2004-10-20 13:06:03 UTC
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.
Comment 5 Murray Cumming 2004-10-26 10:01:11 UTC
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
Comment 6 Murray Cumming 2004-11-30 18:30:49 UTC
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
Comment 7 Joel Fredrikson 2004-12-01 13:52:53 UTC
Created attachment 34356 [details] [review]
Patch for radioaction.h
Comment 8 Joel Fredrikson 2004-12-01 15:12:41 UTC
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++. 

Comment 9 Joel Fredrikson 2004-12-01 15:13:31 UTC
Created attachment 34363 [details] [review]
Patch for demowindow.cc
Comment 10 Murray Cumming 2004-12-02 18:22:52 UTC
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++.

Comment 11 Murray Cumming 2005-01-18 12:16:37 UTC
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.