Bug 318136 - kde-base/kdepim-runtime-4.10.1 nepomukfeeder agent failed compile
Summary: kde-base/kdepim-runtime-4.10.1 nepomukfeeder agent failed compile
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kdepim
Classification: Applications
Component: libkdepim (show other bugs)
Version: 4.10
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 13:13 UTC by daiajo
Modified: 2013-04-15 13:50 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 daiajo 2013-04-10 13:13:52 UTC
This compile error aborted the install:
kdepim-runtime-4.10.1/agents/nepomukfeeder/nepomukfeederagent.cpp:66: error: using typename outside of template

Line 66 of nepomukfeederagent.cpp is
typedef QSharedPointer< QMultiHash< typename Akonadi::Collection::Id,  typename Akonadi::Item::Id> > MultiHashPointer;

My understanding of the C++ language specification is that the "typename" keyword can only be used in an actual template definition. The above line is not, its a typedef.

I changed this line:
66c66
< typedef QSharedPointer< QMultiHash< Akonadi::Collection::Id,  Akonadi::Item::Id> > MultiHashPointer;
---
> typedef QSharedPointer< QMultiHash< typename Akonadi::Collection::Id,  typename Akonadi::Item::Id> > MultiHashPointer;

and finished installing the package manually without errors.
I believe the existing line with the typename is faulty, but will pass by some compilers.


Reproducible: Always

Steps to Reproduce:
1. emerge -1 kde-base/kdepim-runtime
2.
3.
Actual Results:  
[ 93%] Building CXX object agents/nepomukfeeder/CMakeFiles/akonadi_nepomuk_feeder.dir/nepomukfeederagent.o
cd /var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1_build/agents/nepomukfeeder
&& /usr/bin/x86_64-pc-linux-gnu-g++  -DDISABLE_NEPOMUK_LEGACY -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS
-D_BSD_SOURCE  -DQT_NO_DEBUG -DNDEBUG -O2 -pipe  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align
-Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new
-fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden
-fexceptions -UQT_NO_EXCEPTIONS -fexceptions -UQT_NO_EXCEPTIONS -fPIC
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1_build/agents/nepomukfeeder
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1/agents/nepomukfeeder
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1_build
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1_build/agents/ontologies
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1/agents/ontologies
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1/agents/nepomukfeeder/plugin
-I/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1/agents/nepomukfeeder/.
-I/usr/include/boost-1_49 -I/usr/include/KDE -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml
-I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg
-I/usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL
-I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtDBus
-I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt
-I/usr/share/qt4/mkspecs/default -I/usr/include/qt4
-o CMakeFiles/akonadi_nepomuk_feeder.dir/nepomukfeederagent.o
-c /var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1/agents/nepomukfeeder/nepomukfeederagent.cpp
/var/tmp/portage/kde-base/kdepim-runtime-4.10.1/work/kdepim-runtime-4.10.1/agents/nepomukfeeder/nepomukfeederagent.cpp:66: error: using âtypenameâ outside of template

Expected Results:  
Successful compile.

I initially logged this in the gentoo bugtracker, but it seems to be a coding error rather than gentoo error.
Comment 1 Laurent Montel 2013-04-10 13:30:27 UTC
compile fine here.
=> gentoo problem.
Report to gentoo.
Comment 2 Jekyll Wu 2013-04-10 13:44:34 UTC
(In reply to comment #1)
> compile fine here.
> => gentoo problem.
> Report to gentoo.

Well, " it compiles" doesn't necessarily mean the code is right.  Anyway, set a more appropriate resolution.
Comment 3 daiajo 2013-04-10 21:53:32 UTC
I already mentioned I initially assigned to gentoo, and that it does compile with some compilers.
Its a case of strict vs less strict language checking.
Comment 4 Michael Palimaka 2013-04-13 13:51:22 UTC
Note that this is apparently a GCC 4.4 issue.
Comment 5 daiajo 2013-04-14 01:47:51 UTC
gentoo also said a gcc upgrade will probably bypass the issue. I still think its a minor fault in the code though.
Comment 6 daiajo 2013-04-15 13:50:05 UTC
Apparently this is a known problem fixed in a later version:
http://quickgit.kde.org/?p=kdepim-runtime.git&a=commit&h=3481748772adce09dd57c7ca5f006d7c7f37006d

I coped that url from the gentoo bug notes.

So this bug can be closed.