Bug#737814: qgis ftbfs on arm* qreal vs double issues

peter green plugwash at p10link.net
Thu Feb 6 06:35:28 UTC 2014


Package: qgis
Version: 2.0.1-1
Severity: important

Your package FTBFS on arm*

/«PKGBUILDDIR»/src/app/gps/qwtpolar-1.0/qwt_polar_curve.cpp: In member function 'void QwtPolarCurve::drawLines(QPainter*, const QwtScaleMap&, const QwtScaleMap&, const QPointF&, int, int) const':
/«PKGBUILDDIR»/src/app/gps/qwtpolar-1.0/qwt_polar_curve.cpp:436:64: error: no matching function for call to 'qMax(double, qreal)'
         double off = qCeil( qMax( 1.0, painter->pen().widthF() ) );
                                                                ^
/«PKGBUILDDIR»/src/app/gps/qwtpolar-1.0/qwt_polar_curve.cpp:436:64: note: candidate is:
In file included from /«PKGBUILDDIR»/src/app/gps/qwtpolar-1.0/qwt_polar_global.h:12:0,
                 from /«PKGBUILDDIR»/src/app/gps/qwtpolar-1.0/qwt_polar_curve.h:12,
                 from /«PKGBUILDDIR»/src/app/gps/qwtpolar-1.0/qwt_polar_curve.cpp:9:
/usr/include/qt4/QtCore/qglobal.h:1219:34: note: template<class T> const T& qMax(const T&, const T&)
 Q_DECL_CONSTEXPR inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
                                  ^
/usr/include/qt4/QtCore/qglobal.h:1219:34: note:   template argument deduction/substitution failed:
/«PKGBUILDDIR»/src/app/gps/qwtpolar-1.0/qwt_polar_curve.cpp:436:64: note:   deduced conflicting types for parameter 'const T' ('double' and 'qreal {aka float}')
         double off = qCeil( qMax( 1.0, painter->pen().widthF() ) );
                                                                ^
make[4]: *** [src/app/CMakeFiles/qgis.dir/gps/qwtpolar-1.0/qwt_polar_curve.cpp.o] Error 1

In qt4 qreal is defined as float on arn* while on other architectures it 
is defined as double. Assignments between qreal and double are OK 
because assignedments between float and double are ok. However careless 
mixing of qreal and double can cause problems in various situations 
involving pointers, references, temperlates or function overloading.

I've applied the trivial fix (typecast the constant 1.0 to qreal) and 
i'm now running a test build to see if there are other similar issues. 
I'll follow up with a patch when i've either achived a successful build 
or given up.

For qt5 qreal is now defined as double on all platforms but it's way too 
late for a similar change in qt4.



More information about the Pkg-grass-devel mailing list