Bug 269439 - Nepomuk 4.6.1 fails to build (final): QHash include problem
Summary: Nepomuk 4.6.1 fails to build (final): QHash include problem
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-26 08:19 UTC by esigra
Modified: 2012-06-15 18:47 UTC (History)
1 user (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 esigra 2011-03-26 08:19:49 UTC
Version:           unspecified
OS:                Linux

Nepomuk 4.6.1 fails to build in final mode. The cause is that nepomukindexwriter fails to build if QHash is included first in its implementation file. This can be seen in non-final mode if the line "#include <QtCore/QHash>" is added first in kdebase-runtime-4.6.1/nepomuk/services/strigi/nepomukindexwriter.cpp.

Obviously a final build is very likely to fail if some implementation file fails when some standard include file is added to the top of it.

Reproducible: Always

Steps to Reproduce:
In final mode:
1. tar jxvf kdebase-runtime-4.6.1.tar.bz2
2. cd kdebase-runtime-4.6.1
3. mkdir build
4. cd build
5. cmake -DCMAKE_VERBOSE_MAKEFILE=ON ..
6. make

In non-final mode:
1. tar jxvf kdebase-runtime-4.6.1.tar.bz2
2. cd kdebase-runtime-4.6.1
3. echo "#include <QtCore/QHash>" > nepomuk/services/strigi/nepomukindexwriter.cpp.modified
4. cat nepomuk/services/strigi/nepomukindexwriter.cpp >> nepomuk/services/strigi/nepomukindexwriter.cpp.modified
5. mv nepomuk/services/strigi/nepomukindexwriter.cpp{.modified,}
6. mkdir build
7. cd build
8. cmake ..
9. make

Actual Results:  
In final mode:
In file included from /usr/include/qt4/QtCore/qvariant.h:50,
                 from /usr/include/qt4/QtCore/qvariantanimation.h:48,
                 from /usr/include/qt4/QtCore/qpropertyanimation.h:45,
                 from /usr/include/qt4/QtCore/QtCore:7,
                 from /usr/include/qt4/QtDBus/QtDBus:3,
                 from kdebase-runtime-4.6.1/build/nepomuk/services/strigi/strigiadaptor.h:16,
                 from kdebase-runtime-4.6.1/nepomuk/services/strigi/strigiservice.cpp:21,
                 from kdebase-runtime-4.6.1/build/nepomuk/services/strigi/nepomukstrigiservice_final_cpp.cpp:2:
/usr/include/qt4/QtCore/qhash.h: In member function 'QHashNode<Key, T>** QHash<Key, T>::findNode(const Key&, uint*) const [with Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = QVariant::Type]':
/usr/include/qt4/QtCore/qhash.h:741:   instantiated from 'T& QHash<Key, T>::operator[](const Key&) [with Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = QVariant::Type]'
kdebase-runtime-4.6.1/nepomuk/services/strigi/nepomukindexwriter.cpp:611:   instantiated from here
/usr/include/qt4/QtCore/qhash.h:880: error: no matching function for call to 'qHash(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/usr/include/qt4/QtCore/qhash.h:62: note: candidates are: uint qHash(char)
/usr/include/qt4/QtCore/qhash.h:63: note:                 uint qHash(uchar)
/usr/include/qt4/QtCore/qhash.h:64: note:                 uint qHash(signed char)
/usr/include/qt4/QtCore/qhash.h:65: note:                 uint qHash(ushort)
/usr/include/qt4/QtCore/qhash.h:66: note:                 uint qHash(short int)
/usr/include/qt4/QtCore/qhash.h:67: note:                 uint qHash(uint)
/usr/include/qt4/QtCore/qhash.h:68: note:                 uint qHash(int)
/usr/include/qt4/QtCore/qhash.h:69: note:                 uint qHash(ulong)
/usr/include/qt4/QtCore/qhash.h:77: note:                 uint qHash(long int)
/usr/include/qt4/QtCore/qhash.h:78: note:                 uint qHash(quint64)
/usr/include/qt4/QtCore/qhash.h:86: note:                 uint qHash(qint64)
/usr/include/qt4/QtCore/qhash.h:87: note:                 uint qHash(QChar)
/usr/include/qt4/QtCore/qhash.h:88: note:                 uint qHash(const QByteArray&)
/usr/include/qt4/QtDBus/qdbusextratypes.h:60: note:                 uint qHash(const QString&)
/usr/include/qt4/QtCore/qhash.h:90: note:                 uint qHash(const QStringRef&)
/usr/include/qt4/QtCore/qbitarray.h:58: note:                 uint qHash(const QBitArray&)

In non-final mode:
In file included from /usr/include/qt4/QtCore/QHash:1,                                                                                                                                                      
                 from kdebase-runtime-4.6.1/nepomuk/services/strigi/nepomukindexwriter.cpp:1:
/usr/include/qt4/QtCore/qhash.h: In member function "QHashNode<Key, T>** QHash<Key, T>::findNode(const Key&, uint*) const [with Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = QVariant::Type]":
/usr/include/qt4/QtCore/qhash.h:741:   instantiated from "T& QHash<Key, T>::operator[](const Key&) [with Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = QVariant::Type]"
kdebase-runtime-4.6.1/nepomuk/services/strigi/nepomukindexwriter.cpp:612:   instantiated from here
/usr/include/qt4/QtCore/qhash.h:880: fel: ingen funktion som stämmer för anrop av "qHash(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)"
/usr/include/qt4/QtCore/qhash.h:62: anm: kandidater är: uint qHash(char)
/usr/include/qt4/QtCore/qhash.h:63: anm:                uint qHash(uchar)
/usr/include/qt4/QtCore/qhash.h:64: anm:                uint qHash(signed char)
/usr/include/qt4/QtCore/qhash.h:65: anm:                uint qHash(ushort)
/usr/include/qt4/QtCore/qhash.h:66: anm:                uint qHash(short int)
/usr/include/qt4/QtCore/qhash.h:67: anm:                uint qHash(uint)
/usr/include/qt4/QtCore/qhash.h:68: anm:                uint qHash(int)
/usr/include/qt4/QtCore/qhash.h:69: anm:                uint qHash(ulong)
/usr/include/qt4/QtCore/qhash.h:77: anm:                uint qHash(long int)
/usr/include/qt4/QtCore/qhash.h:78: anm:                uint qHash(quint64)
/usr/include/qt4/QtCore/qhash.h:86: anm:                uint qHash(qint64)
/usr/include/qt4/QtCore/qhash.h:87: anm:                uint qHash(QChar)
/usr/include/qt4/QtCore/qhash.h:88: anm:                uint qHash(const QByteArray&)
/usr/include/qt4/QtCore/qhash.h:89: anm:                uint qHash(const QString&)
/usr/include/qt4/QtCore/qhash.h:90: anm:                uint qHash(const QStringRef&)
/usr/include/qt4/QtCore/qhash.h:91: anm:                uint qHash(const QBitArray&)
Comment 1 Vishesh Handa 2012-06-15 18:47:09 UTC
Please let me know if this is still a problem in nepomuk-core. The relevant code has moved over there.