Bug 249682 - build failure - const issue in dataengines/calendar/eventdatacontainer.cpp
Summary: build failure - const issue in dataengines/calendar/eventdatacontainer.cpp
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 01:01 UTC by tropikhajma
Modified: 2010-09-07 14:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2010-09-01 01:01:33 UTC
Version:           unspecified (using Devel) 
OS:                Solaris

building kdebase-workspace from svn ends with the below error

"/export/home/test/Dashboards/installs/2.8.1/kdepimlibs/include/KDE/Akonadi/../../akonadi/itempayloadinternals_p.h", line 73: Error: Non-const function KCal::Incidence::clone() called for const object.
"/export/home/test/Dashboards/installs/2.8.1/kdepimlibs/include/KDE/Akonadi/../../akonadi/itempayloadinternals_p.h", line 216:     Where: While instantiating "static Akonadi::Internal::clone_traits_helper<KCal::Incidence, 1>::clone(const KCal::Incidence*)".
"/export/home/test/Dashboards/installs/2.8.1/kdepimlibs/include/KDE/Akonadi/../../akonadi/itempayloadinternals_p.h", line 216:     Where: Instantiated from static Akonadi::Internal::PayloadTrait<boost::shared_ptr<KCal::Incidence>>::clone(const QSharedPointer<KCal::Incidence>&).
"/export/home/test/Dashboards/installs/2.8.1/kdepimlibs/include/KDE/Akonadi/../../akonadi/item.h", line 547:     Where: Instantiated from Akonadi::Item::tryToClone<boost::shared_ptr<KCal::Incidence>>(boost::shared_ptr<KCal::Incidence>*) const.
"/export/home/test/Dashboards/installs/2.8.1/kdepimlibs/include/KDE/Akonadi/../../akonadi/item.h", line 525:     Where: Instantiated from Akonadi::Item::payloadImpl<boost::shared_ptr<KCal::Incidence>>() const.
"/export/home/test/Dashboards/installs/2.8.1/kdepimlibs/include/KDE/Akonadi/../../akonadi/item.h", line 503:     Where: Instantiated from Akonadi::Item::payloadImpl<boost::shared_ptr<KCal::Event>>() const.
"/export/home/test/Dashboards/installs/2.8.1/kdepimlibs/include/KDE/Akonadi/../../akonadi/item.h", line 489:     Where: Instantiated from Akonadi::Item::payload<boost::shared_ptr<KCal::Event>>() const.
"/export/home/test/Dashboards/kdebase-workspace/srcdir/plasma/generic/dataengines/calendar/eventdatacontainer.cpp", line 66:     Where: Instantiated from non-template code.

(http://my.cdash.org/viewBuildError.php?buildid=93514)
I do not have a patch ATM

Reproducible: Always
Comment 1 Aaron J. Seigo 2010-09-01 02:16:45 UTC
it builds here with trunk akonadi and kdepimlibs.
Comment 2 Christoph Feck 2010-09-01 04:53:29 UTC
Aaron, works for you, but not for him :) He uses the Solaris compiler, which is much more picky than the GNU compiler. But if you don't feel like fixing it he surely will provide a patch.
Comment 3 Christoph Feck 2010-09-01 04:57:25 UTC
It is related to kdepim/akonadi ...
Comment 4 tropikhajma 2010-09-06 23:30:57 UTC
the below modification to kdepimlibs helped me to proceed. Trying the full build ...

--- /opt/kde4/include/akonadi/itempayloadinternals_p.h.orig     2010-09-06 23:28:24.275353090 +0200
+++ /opt/kde4/include/akonadi/itempayloadinternals_p.h  2010-09-06 23:28:35.947432429 +0200
@@ -70,7 +70,7 @@
 
 template <typename T>
 struct clone_traits_helper<T,true> {
-    static T * clone( const T * t ) { return t ? t->clone() : 0 ; }
+    static T * clone( T * t ) { return t ? t->clone() : 0 ; }
 };
 
 template <typename T>
Comment 5 Allen Winter 2010-09-07 14:20:05 UTC
SVN commit 1172520 by winterz:

fix build on Sun Studio compiler.
patch from tropikhajma.

..hmmm.. I wonder if doxygen will like this file better now?

BUG: 249682


 M  +1 -1      itempayloadinternals_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1172520