Bug 182432

Summary: Nepomuk fails to compile in current (post-4.2.0) 4.2 branch
Product: [Frameworks and Libraries] kdelibs Reporter: Bernhard Rosenkraenzer <bero>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fix

Description Bernhard Rosenkraenzer 2009-01-30 14:41:07 UTC
Version:           4.2.1 svn (using Devel)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Compiled sources

Linking CXX shared library ../../lib/libnepomuk.so                                                                                                                                                                                         
CMakeFiles/nepomuk.dir/resourcedata.o: In function `QHash<QUrl, Nepomuk::Variant>::findNode(QUrl const&, unsigned int*) const':                                                                                                            
resourcedata.cpp:(.text._ZNK5QHashI4QUrlN7Nepomuk7VariantEE8findNodeERKS0_Pj[QHash<QUrl, Nepomuk::Variant>::findNode(QUrl const&, unsigned int*) const]+0x2c): undefined reference to `qHash(QUrl const&)'                                 
CMakeFiles/nepomuk.dir/ontology/ontology.o: In function `Nepomuk::Ontology::findPropertyByUri(QUrl const&) const':                                                                                                                         
ontology.cpp:(.text+0xe0): undefined reference to `qHash(QUrl const&)'                                                                                                                                                                     
CMakeFiles/nepomuk.dir/ontology/ontology.o: In function `Nepomuk::Ontology::findClassByUri(QUrl const&) const':                                                                                                                            
ontology.cpp:(.text+0x1a0): undefined reference to `qHash(QUrl const&)'                                                                                                                                                                    
CMakeFiles/nepomuk.dir/ontology/class.o: In function `Nepomuk::Class::findPropertyByUri(QUrl const&) const':                                                                                                                               
class.cpp:(.text+0x2b1): undefined reference to `qHash(QUrl const&)'                                                                                                                                                                       
CMakeFiles/nepomuk.dir/ontology/ontologymanager.o: In function `QHash<QUrl, Nepomuk::Ontology>::findNode(QUrl const&, unsigned int*) const':                                                                                               
ontologymanager.cpp:(.text._ZNK5QHashI4QUrlN7Nepomuk8OntologyEE8findNodeERKS0_Pj[QHash<QUrl, Nepomuk::Ontology>::findNode(QUrl const&, unsigned int*) const]+0x2c): undefined reference to `qHash(QUrl const&)'                            
CMakeFiles/nepomuk.dir/ontology/ontologymanager.o:ontologymanager.cpp:(.text._ZNK5QHashI4QUrlN7Nepomuk5ClassEE8findNodeERKS0_Pj[QHash<QUrl, Nepomuk::Class>::findNode(QUrl const&, unsigned int*) const]+0x2c): more undefined references to `qHash(QUrl const&)' follow                                                                                                                                                                                                              
collect2: ld returned 1 exit status                                                                                                                                                                                                        
make[2]: *** [lib/libnepomuk.so.4.2.0] Error 1
Comment 1 Bernhard Rosenkraenzer 2009-01-30 14:43:27 UTC
Created attachment 30746 [details]
Fix

The attached patch fixes it -- not committing myself because this is so obvious that I'm probably overlooking something
Comment 2 Christian Ehrlicher 2009-02-20 15:07:50 UTC
looks like a too old soprano version - qHash(QUrl) was moved to soprano in 2.1.68 iirc
Comment 3 Christoph Feck 2009-06-24 06:50:44 UTC
The linker error clearly shows: the include files and the library files do not match. This is probably due to using headers from KDE, while libraries are from distribution packages.

Closing.