Package: kmatplot Severity: normal Tags: patch When building 'kmatplot' on amd64 with gcc-4.0, I get the following error:
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -pthread -O0 -g -Wall -O2 -fno-exceptions -fno-check-new -c qsruler.cpp g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -pthread -O0 -g -Wall -O2 -fno-exceptions -fno-check-new -c qsgraphicaldata.cpp qsgraphicaldata.cpp: In static member function 'static QSGFill QSGraphicalData::fillFromData(QSMatrix*, int, int, const QSGFill&)': qsgraphicaldata.cpp:227: error: invalid cast from type 'double' to type 'QSGFill::Style' qsgraphicaldata.cpp: In static member function 'static QSGLine QSGraphicalData::lineFromData(QSMatrix*, int, int, const QSGLine&)': qsgraphicaldata.cpp:240: error: invalid cast from type 'double' to type 'QSGLine::Style' qsgraphicaldata.cpp: In static member function 'static QSGPoint QSGraphicalData::pointFromData(QSMatrix*, int, int, const QSGPoint&)': qsgraphicaldata.cpp:254: error: invalid cast from type 'double' to type 'QSGPoint::Style' qsgraphicaldata.cpp:255: error: invalid cast from type 'double' to type 'QSGPoint::Fill' qsgraphicaldata.cpp: In static member function 'static QSGArrow QSGraphicalData::arrowFromData(QSMatrix*, int, int, const QSGArrow&)': qsgraphicaldata.cpp:269: error: invalid cast from type 'double' to type 'QSGArrow::Style' make[4]: *** [qsgraphicaldata.o] Error 1 make[4]: Leaving directory `/kmatplot-0.4/kmatplot/widgets' With the attached patch 'kmatplot' can be compiled on amd64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/kmatplot-0.4/kmatplot/widgets/qsgraphicaldata.cpp ./kmatplot/widgets/qsgraphicaldata.cpp --- ../tmp-orig/kmatplot-0.4/kmatplot/widgets/qsgraphicaldata.cpp 2002-01-24 17:48:51.000000000 +0100 +++ ./kmatplot/widgets/qsgraphicaldata.cpp 2005-03-22 12:16:33.000000000 +0100 @@ -224,7 +224,7 @@ QSGFill result = default_value; if ( source && source->rows() > row ) { int cols = source->cols() - start_col; - if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGFill::Style )source->value(row,start_col+0); + if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGFill::Style )(long)source->value(row,start_col+0); result.color = colorFromData( source, row, start_col+1, result.color ); } return result; @@ -237,7 +237,7 @@ QSGLine result = default_value; if ( source && source->rows() > row ) { int cols = source->cols() - start_col; - if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGLine::Style )source->value(row,start_col+0); + if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGLine::Style )(long)source->value(row,start_col+0); if ( cols>1 && !source->string(row,start_col+1).isEmpty() ) result.width = (int )source->value(row,start_col+1); result.color = colorFromData( source, row, start_col+2, result.color ); } @@ -251,8 +251,8 @@ QSGPoint result = default_value; if ( source && source->rows() > row ) { int cols = source->cols() - start_col; - if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGPoint::Style )source->value(row,start_col+0); - if ( cols>1 && !source->string(row,start_col+1).isEmpty() ) result.fill = (QSGPoint::Fill )source->value(row,start_col+1); + if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGPoint::Style )(long)source->value(row,start_col+0); + if ( cols>1 && !source->string(row,start_col+1).isEmpty() ) result.fill = (QSGPoint::Fill )(long)source->value(row,start_col+1); if ( cols>2 && !source->string(row,start_col+2).isEmpty() ) result.size = (int )source->value(row,start_col+2); result.color = colorFromData( source, row, start_col+3, result.color ); } @@ -266,7 +266,7 @@ QSGArrow result = default_value; if ( source && source->rows() > row ) { int cols = source->cols() - start_col; - if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGArrow::Style )source->value(row,start_col+0); + if ( cols>0 && !source->string(row,start_col+0).isEmpty() ) result.style = (QSGArrow::Style )(long)source->value(row,start_col+0); if ( cols>1 && !source->string(row,start_col+1).isEmpty() ) result.size = (int )source->value(row,start_col+1); } return result; diff -urN ../tmp-orig/kmatplot-0.4/configure ./configure --- ../tmp-orig/kmatplot-0.4/configure 2005-03-22 12:35:05.585336075 +0100 +++ ./configure 2005-03-22 12:22:27.000000000 +0100 @@ -1015,7 +1015,7 @@ fi - CFLAGS=" $CFLAGS" + CFLAGS=" $CFLAGS -fPIC" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]