Package: kdesdk Severity: normal Tags: patch When building 'kdesdk' on ppc64 with gcc-4.0, I get the following error:
if g++ -DHAVE_CONFIG_H -I. -I../../../kcachegrind/kcachegrind -I../.. -I/usr/include/kde -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT callgraphview.o -MD -MP -MF ".deps/callgraphview.Tpo" \ -c -o callgraphview.o `test -f '../../../kcachegrind/kcachegrind/callgraphview.cpp' || echo '../../../kcachegrind/kcachegrind/'`../../../kcachegrind/kcachegrind/callgraphview.cpp; \ then mv -f ".deps/callgraphview.Tpo" ".deps/callgraphview.Po"; \ else rm -f ".deps/callgraphview.Tpo"; exit 1; \ fi /usr/share/qt3/include/qtooltip.h:86: warning: 'class QToolTip' has virtual functions but non-virtual destructor ../../../kcachegrind/kcachegrind/callgraphview.h:153: warning: 'class GraphOptions' has virtual functions but non-virtual destructor ../../../kcachegrind/kcachegrind/callgraphview.h:172: warning: 'class StorableGraphOptions' has virtual functions but non-virtual destructor ../../../kcachegrind/kcachegrind/callgraphview.cpp: In member function 'void GraphExporter::writeDot()': ../../../kcachegrind/kcachegrind/callgraphview.cpp:579: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:594: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:633: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:634: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:672: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:674: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:675: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:695: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:697: error: cast from 'TraceFunction*' to 'int' loses precision ../../../kcachegrind/kcachegrind/callgraphview.cpp:698: error: cast from 'TraceFunction*' to 'int' loses precision With the attached patch 'kdesdk' can be compiled on ppc64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/kdesdk-3.3.1/kcachegrind/kcachegrind/callgraphview.cpp ./kcachegrind/kcachegrind/callgraphview.cpp --- ../tmp-orig/kdesdk-3.3.1/kcachegrind/kcachegrind/callgraphview.cpp 2004-07-17 21:12:11.000000000 +0200 +++ ./kcachegrind/kcachegrind/callgraphview.cpp 2004-12-23 17:14:24.432245888 +0100 @@ -576,7 +576,7 @@ break; } if (f) - *stream << QString(" center=F%1;\n").arg((int)f, 0, 16); + *stream << QString(" center=F%1;\n").arg((long)f, 0, 16); *stream << QString(" overlap=false;\n splines=true;\n"); } @@ -591,7 +591,7 @@ if ((int)abr.length() > Configuration::maxSymbolLength()) abr = abr.left(Configuration::maxSymbolLength()) + "..."; - *stream << QString(" F%1 [").arg((int)n.function(), 0, 16); + *stream << QString(" F%1 [").arg((long)n.function(), 0, 16); if (_useBox) { // make label 3 lines for CallGraphView *stream << QString("shape=box,label=\"** %1 **\\n**\\n%2\"];\n") @@ -630,9 +630,9 @@ to.callers.removeRef(&e); *stream << QString(" F%1 -> F%2 [weight=%3") - .arg((int)e.from(), 0, 16) - .arg((int)e.to(), 0, 16) - .arg((int)log(log(e.cost))); + .arg((long)e.from(), 0, 16) + .arg((long)e.to(), 0, 16) + .arg((long)log(log(e.cost))); if (_go->detailLevel() ==1) *stream << QString(",label=\"%1\"") @@ -669,10 +669,10 @@ e->count = countSum; *stream << QString(" R%1 [shape=point,label=\"\"];\n") - .arg((int)n.function(), 0, 16); + .arg((long)n.function(), 0, 16); *stream << QString(" R%1 -> F%2 [label=\"%3\\n%4 x\",weight=%5];\n") - .arg((int)n.function(), 0, 16) - .arg((int)n.function(), 0, 16) + .arg((long)n.function(), 0, 16) + .arg((long)n.function(), 0, 16) .arg(SubCost(costSum).pretty()) .arg(SubCost(countSum).pretty()) .arg((int)log(costSum)); @@ -692,10 +692,10 @@ e->count = countSum; *stream << QString(" S%1 [shape=point,label=\"\"];\n") - .arg((int)n.function(), 0, 16); + .arg((long)n.function(), 0, 16); *stream << QString(" F%1 -> S%2 [label=\"%3\\n%4 x\",weight=%5];\n") - .arg((int)n.function(), 0, 16) - .arg((int)n.function(), 0, 16) + .arg((long)n.function(), 0, 16) + .arg((long)n.function(), 0, 16) .arg(SubCost(costSum).pretty()) .arg(SubCost(countSum).pretty()) .arg((int)log(costSum)); -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]