Bug 268595 - KDEPIM fails to compile after recent Ontologies change
Summary: KDEPIM fails to compile after recent Ontologies change
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: VHI major
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2011-03-15 23:34 UTC by Christoph Feck
Modified: 2011-05-19 17:19 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patches up the rcgen (10.14 KB, patch)
2011-05-19 16:01 UTC, Vishesh Handa
Details
Handle properties with nrl:cardinality==1 (11.24 KB, patch)
2011-05-19 17:02 UTC, Vishesh Handa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2011-03-15 23:34:56 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Since recent commit 7255604855f332abaae22969b42e7ef01194f3d7 in shared-desktop-ontologies, KDEPIM from 4.4 branch no longer compiles.

Error message is:

/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp: In member function 'void AkonadiFuture::NepomukContactFeeder::updateContactItem(const Akonadi::Item&, const QUrl&)':
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:104:13: error: 'class NepomukFast::PersonContact' has no member named 'setNameGivens'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:110:13: error: 'class NepomukFast::PersonContact' has no member named 'setNameFamilys'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:159:14: error: 'class NepomukFast::BbsNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:163:14: error: 'class NepomukFast::CarPhoneNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:167:14: error: 'class NepomukFast::CellPhoneNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:171:14: error: 'class NepomukFast::FaxNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:175:14: error: 'class NepomukFast::IsdnNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:179:14: error: 'class NepomukFast::MessagingNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:183:14: error: 'class NepomukFast::ModemNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:187:14: error: 'class NepomukFast::PagerNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:191:14: error: 'class NepomukFast::PcsNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:195:14: error: 'class NepomukFast::VideoTelephoneNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:199:14: error: 'class NepomukFast::VoicePhoneNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:203:14: error: 'class NepomukFast::PhoneNumber' has no member named 'setPhoneNumbers'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:222:13: error: 'class NepomukFast::PostalAddress' has no member named 'setStreetAddresses'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:230:15: error: 'class NepomukFast::PostalAddress' has no member named 'addPobox'
/local/svn/kde/branches/KDE/4.4/kdepim/runtime/agents/nepomuk_contact_feeder/nepomukcontactfeeder.cpp:233:13: error: 'class NepomukFast::PostalAddress' has no member named 'setExtendedAddresses'
make[2]: *** [runtime/agents/nepomuk_contact_feeder/CMakeFiles/akonadi_nepomuk_contact_feeder.dir/nepomukcontactfeeder.o] Error 1


Reproducible: Didn't try
Comment 1 Christoph Feck 2011-04-12 22:57:19 UTC
The same error also happens when compiling today's kdepim-runtime from master branch. This means the bug is most certainly in shared-desktop-ontologies.

Reassigning accordingly.
Comment 2 Luis Silva 2011-05-01 19:17:51 UTC
The bug is related to the use of "nrl:maxCardinality 1" in nco. Either nco needs to be reverted or kdepim-runtime updated to not include the list forms.
Comment 3 Vishesh Handa 2011-05-01 20:43:28 UTC
I think kdepim-runtime will have to be updated. 

Many of the ontologies do not have their cardinalities set which is wrong, and causes major problem in other places.

AFAIK, the only change that would have occurred is that the properties whose cardinality has been set would now not contain the respective addPropertyName() function, and the setPropertyName() function would take 'T' instead of a 'QList<T>'
Comment 4 Christophe Marin 2011-05-01 20:50:34 UTC
(In reply to comment #3)
> I think kdepim-runtime will have to be updated. 
> 

That wouldn't fix the source incompatible change in SDO. kdepim already have a couple versions released which fail to compile with recent shared desktop ontologies
Comment 5 Vishesh Handa 2011-05-01 21:06:19 UTC
Just to clarify a little bit -

The source incompatibility is not actually there in SDO. The ontologies are read by a helper program called the "Nepomuk Resource Generator" which is present in kdelibs/nepomuk/rcgen/*. This generator produces C++ code from the ontologies, which is used in kdepim. The 'nepomuk-rcgen' is invoked via a cmake function before compiling kdepim.
Comment 6 Christophe Marin 2011-05-19 14:44:52 UTC
Adding the release_blocker keyword. 

Dirk, please don't tag beta 1 until this issue is fixed.

Sebastian, can you take care of this please. 
[quote]
Like I already said: patching rcgen seems like the best solution to me and that is so trivial I can have finished it today
[/quote]
Comment 7 Vishesh Handa 2011-05-19 16:01:47 UTC
Created attachment 60154 [details]
Patches up the rcgen

I've patched up rc-gen, but I haven't tested building kdepim-4.6 with this patch. I think it should build, cause I've fixed the issue, but someone should test it out.
Comment 8 Vishesh Handa 2011-05-19 17:02:48 UTC
Created attachment 60159 [details]
Handle properties with nrl:cardinality==1

I've cleaned up the earlier patch and added those extra functions for properties with nrl:cardinality==1 as well.
Comment 9 Christophe Marin 2011-05-19 17:03:46 UTC
Looks correct, both kdepim-runtime 4.4 and 4.6 build against kdelibs master now.

kdepim/nepomuk_email_feeder also builds for 4.4 and 4.6
Comment 10 Vishesh Handa 2011-05-19 17:19:40 UTC
Git commit 1f796983aa8385da77f30813041b40e208c17391 by Vishesh Handa.
Committed on 19/05/2011 at 17:22.
Pushed by vhanda into branch 'master'.

Make KDEPIM 4.6 compile with master

This makes the rcgen produce add/setProperty( QList<T> ) functions for
properties with nrl:maxCardinality and nrl:cardinality = 1. This was
required because with SDO 0.7 the cardinalities of many properties
have been set.

BUG: 268595

M  +103  -44   nepomuk/rcgen/codegenerator.cpp     
M  +7    -0    nepomuk/rcgen/codegenerator.h     
M  +8    -1    nepomuk/rcgen/ontologyparser.cpp     
M  +24   -1    nepomuk/rcgen/property.cpp     
M  +21   -0    nepomuk/rcgen/property.h     

http://commits.kde.org/kdelibs/1f796983aa8385da77f30813041b40e208c17391