Bug 288736

Summary: kdepim-4.7.4 fails to compile, error in messagecomposer
Product: [Applications] kdepim Reporter: Alexey Chernov <4ernov>
Component: messagecomposerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: anders, johu, winter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alexey Chernov 2011-12-11 16:25:39 UTC
Version:           unspecified (using KDE 4.7.3) 
OS:                Linux

There's compilation error during kdepim-4.7.4 compilation:
[ 35%] Building CXX object messagecomposer/CMakeFiles/messagecomposer.dir/akonadisender.o
/usr/src/packages/kde4/4.7.4/kdepim-4.7.4/messagecomposer/akonadisender.cpp: In member function 'void AkonadiSender::sendOrQueueMessage(const boost::shared_ptr<KMime::Message>&, MessageSender::SendMethod)':     
/usr/src/packages/kde4/4.7.4/kdepim-4.7.4/messagecomposer/akonadisender.cpp:138: error: reference to 'Message' is ambiguous
/usr/src/packages/kde4/4.7.4/kdepim-4.7.4/messagecomposer/util.h:35: error: candidates are: namespace Message { }
/usr/include/kmime/kmime_message.h:82: error:                 class KMime::Message
make[2]: *** [messagecomposer/CMakeFiles/messagecomposer.dir/akonadisender.o] Error 1
make[1]: *** [messagecomposer/CMakeFiles/messagecomposer.dir/all] Error 2

I believe an error says itself, small ambiguous call:
if ( !Message::Util::sendMailDispatcherIsOnline() )

Making an explicit reference to global namespace is enough to fix it:
if ( !::Message::Util::sendMailDispatcherIsOnline() )

But I think it's better to sort out this name collision.

Reproducible: Didn't try

Steps to Reproduce:
1. Start the compilation of kdepim-4.7.4.
2. Notice some strange behavior during compilation.

Actual Results:  
The package fails to compile.

Expected Results:  
The package compiles successfully.
Comment 1 Johannes Huber 2011-12-23 22:50:43 UTC
This compile error happens only with <gcc-4.5

See downstream bug report:
https://bugs.gentoo.org/show_bug.cgi?id=394531
Comment 2 Allen Winter 2012-01-01 14:24:17 UTC
is this fixed?  according to the gentoo bug it is fixed.

close this then?
Comment 3 Johannes Huber 2012-01-01 16:58:55 UTC
The applied patch is git id 02544849c1ba657cca59908960a75e0f65b87aea
Comment 4 Allen Winter 2012-01-03 19:59:54 UTC
ok, then resolving this