Processed: Re: Bug#760535: Experimental qgis FTBS on armel and armhf due to Qreal issue

2014-09-05 Thread Debian Bug Tracking System
Processing control commands:

> forwarded 760535 https://hub.qgis.org/issues/11148
Bug #760535 [qgis] Experimental qgis FTBS on armel and armhf due to Qreal issue
Set Bug forwarded-to-address to 'https://hub.qgis.org/issues/11148'.

-- 
760535: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760535
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Processed: Re: Bug#760535: Experimental qgis FTBS on armel and armhf due to Qreal issue

2014-09-05 Thread Debian Bug Tracking System
Processing control commands:

> forwarded 760535 https://hub.qgis.org/issues/11148
Bug #760535 [qgis] Experimental qgis FTBS on armel and armhf due to Qreal issue
Ignoring request to change the forwarded-to-address of bug#760535 to the same 
value

-- 
760535: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760535
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Bug#760535: Experimental qgis FTBS on armel and armhf due to Qreal issue

2014-09-05 Thread Ross Gammon
Control: forwarded 760535 https://hub.qgis.org/issues/11148

Thanks very much Peter. Both for the investigation and the
comprehensive explanations. I can see that I cast the wrong item in
qMax to Qreal when I tried to fix it. But even if I had got it right,
I would not have got much further!

I have forwarded your patch upstream, and hopefully they will review
it and let us know if there is more to fix, or a better fix.

Regards,

Ross

___
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel


Bug#760535: Experimental qgis FTBS on armel and armhf due to Qreal issue

2014-09-04 Thread peter green

Package: qgis
Version: 2.4.0-1~exp1
Severity: important
X-debbugs-cc: rossgam...@mail.dk

Ross Gammon wrote:

Hi Peter,

I am working in the Debian GIS Team and I am hoping you can help me with
a build failure on arm*:
  

^

(without having any detailed knowledge of the issue)


The issue is that on arm platforms with qt4 qreal is defined as float 
rather than double. You can safely assign between qreal and double 
because you can safely assign between float and double but more complex 
cases involving templates or pointers can give problems.


Since there is a lot of analysis in this message i'm turning this into a 
bug report so it doesn't get lost.

/«PKGBUILDDIR»/src/gui/qgscomposerview.cpp: In member function 'virtual
void QgsComposerView::mouseReleaseEvent(QMouseEvent*)':
/«PKGBUILDDIR»/src/gui/qgscomposerview.cpp:872:189: error: no matching
function for call to 'qMax(qreal, double)'
 newTable->setSceneRect( QRectF(
mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(),
mRubberBandItem->rect().width(), qMax( mRubberBandItem->rect().height(),
15.0 ) ) );


 ^
/«PKGBUILDDIR»/src/gui/qgscomposerview.cpp:872:189: note: candidate is:
In file included from /usr/include/qt4/QtCore/qnamespace.h:45:0,
 from /usr/include/qt4/QtCore/qobjectdefs.h:45,
 from /usr/include/qt4/QtCore/qobject.h:47,
 from /usr/include/qt4/QtCore/qcoreapplication.h:45,
 from /usr/include/qt4/QtGui/qapplication.h:45,
 from /usr/include/qt4/QtGui/QApplication:1,
 from /«PKGBUILDDIR»/src/gui/qgscomposerview.cpp:18:
/usr/include/qt4/QtCore/qglobal.h:1219:34: note: template 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/gui/qgscomposerview.cpp:872:189: note:   deduced
conflicting types for parameter 'const T' ('float' and 'double')
 newTable->setSceneRect( QRectF(
mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(),
mRubberBandItem->rect().width(), qMax( mRubberBandItem->rect().height(),
15.0 ) ) );
  
In this case qMax is a template. The result is it will work with 
arguments of any numeric type but the two arguments must be the same 
type. The literal 12.0 is type double. So on a platform where qreal is 
float qMax gets passed one float and one double and the compiler can't 
decide which to use for the template parameter and errors out. Easy 
enough to fix by casting the literal to qreal.



Unfortunately after fixing that the buidl fails later with
[ 94%] Generating analysis/sip_analysispart0.cpp, 
analysis/sip_analysispart1.cpp, analysis/sip_analysispart2.cpp, 
analysis/sip_analysispart3.cpp

cd /qgis-2.4.0/obj-arm-linux-gnueabihf/python && /usr/bin/cmake -E echo

cd /qgis-2.4.0/obj-arm-linux-gnueabihf/python && /usr/bin/cmake -E touch 
/qgis-2.4.0/obj-arm-linux-gnueabihf/python/analysis/sip_analysispart0.cpp 
/qgis-2.4.0/obj-arm-linux-gnueabihf/python/analysis/sip_analysispart1.cpp 
/qgis-2.4.0/obj-arm-linux-gnueabihf/python/analysis/sip_analysispart2.cpp 
/qgis-2.4.0/obj-arm-linux-gnueabihf/python/analysis/sip_analysispart3.cpp
cd /qgis-2.4.0/obj-arm-linux-gnueabihf/python && /usr/bin/sip -w -e -x 
ANDROID -x HAVE_TOUCH -x MOBILITY_LOCATION -x QSETINT_CONVERSION -x 
QSETTYPE_CONVERSION -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -x 
PyQt_qreal_double -t Qt_4_8_6 -x Py_v3 -g -o -a 
/qgis-2.4.0/obj-arm-linux-gnueabihf/python/qgis.analysis.api -j 4 -c 
/qgis-2.4.0/obj-arm-linux-gnueabihf/python/analysis -I 
/usr/share/sip/PyQt4 -I /qgis-2.4.0/python 
/qgis-2.4.0/python/analysis/analysis.sip
sip: /qgis-2.4.0/python/core/composer/qgsatlascomposition.sip:165: 
QgsAtlasComposition::predefinedScales() unsupported function return type 
- provide %MethodCode and a C++ signature
python/CMakeFiles/python_module_qgis__analysis.dir/build.make:305: 
recipe for target 'python/analysis/sip_analysispart0.cpp' failed

make[4]: *** [python/analysis/sip_analysispart0.cpp] Error 1
make[4]: Leaving directory '/qgis-2.4.0/obj-arm-linux-gnueabihf'
CMakeFiles/Makefile2:3415: recipe for target 
'python/CMakeFiles/python_module_qgis__analysis.dir/all' failed
make[3]: *** [python/CMakeFiles/python_module_qgis__analysis.dir/all] 
Error 2


I changed double to qreal in the .sip file in a couple of places and 
that made the file build but I wasn't sure if it was a correct fix or 
not. In particular I wasn't sure if there is some  corresponding peice 
of native code that needs to be changed to match.


Then it failed with

/qgis-2.4.0/obj-arm-linux-gnueabihf/python/core/sip_corepart2.cpp:12735:67: 
error: no matching function for call to 'QVector::QVector(const 
QVector&)'

sipRaiseUnknownE