Bug 116339 - kopete >=3.5_beta2 won't compile on ppc64
Summary: kopete >=3.5_beta2 won't compile on ppc64
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 116451 117124 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-14 12:47 UTC by Markus Rothe
Modified: 2005-11-30 09:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
compile error (8.04 KB, text/plain)
2005-11-14 12:48 UTC, Markus Rothe
Details
Possible patch for compiling problems (651 bytes, patch)
2005-11-14 17:34 UTC, Tommi Rantala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Rothe 2005-11-14 12:47:56 UTC
Version:           kde 3.5 rc1 (using KDE KDE 3.5.0)
Installed from:    Gentoo Packages
Compiler:          3.4.4 
OS:                Linux

Hi,

kopete versions bundled with kdenetwork-3.5_beta2 and kdenetwork-3.5_rc1 won't compile on ppc64 (beta1 might fail, too, but I didn't test that). I'll attach an output of the error shown while compiling kopete from kdenetwork-3.5_rc1 tarball.

kopete built just fine with kde-3.4 versions on ppc64.

Regards,

Markus
Comment 1 Markus Rothe 2005-11-14 12:48:47 UTC
Created attachment 13438 [details]
compile error
Comment 2 Thiago Macieira 2005-11-14 15:40:53 UTC
Pasting the relevant error message:

kircmessage.cpp: In static member function `static KIRC::Message KIRC::Message::parse(KIRC::Engine*, const QTextCodec*, bool*)':
kircmessage.cpp:171: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/qt/3/include/qmemarray.h:100: note: candidate 1: type& QMemArray<type>::operator[](int) const [with type = char]
kircmessage.cpp:171: note: candidate 2: operator[](const char*, long int) <built-in>
Comment 3 Tommi Rantala 2005-11-14 17:34:16 UTC
Created attachment 13450 [details]
Possible patch for compiling problems

Hi, could you test this patch? It should fix these errors.
Comment 4 kde 2005-11-14 18:36:50 UTC
I got the same error on amd64 and this patch fixed it.

Thanks a lot for the quick fix!
Comment 5 Tommi Rantala 2005-11-14 19:33:09 UTC
SVN commit 480399 by rantala:

BUG: 116339

Fix reported compilation problems with some 64-bit architectures.



 M  +4 -4      kircmessage.cpp  


--- branches/KDE/3.5/kdenetwork/kopete/protocols/irc/libkirc/kircmessage.cpp #480398:480399
@@ -168,11 +168,11 @@
 			//
 			// Some servers send '\n' instead of '\r\n' that the RFCs say they should be sending.
 
-			if (length > 1 && raw[length-2] == '\n') {
-				raw[length-2] = '\0';
+			if (length > 1 && raw.at(length-2) == '\n') {
+				raw.at(length-2) = '\0';
 			}
-			if (length > 2 && raw[length-3] == '\r') {
-				raw[length-3] = '\0';
+			if (length > 2 && raw.at(length-3) == '\r') {
+				raw.at(length-3) = '\0';
 			}
 
 			kdDebug(14121) << "<< " << raw << endl;
Comment 6 Matt Rogers 2005-11-15 22:08:27 UTC
*** Bug 116451 has been marked as a duplicate of this bug. ***
Comment 7 Tommi Rantala 2005-11-30 09:27:42 UTC
*** Bug 117124 has been marked as a duplicate of this bug. ***