Bug 256640 - rocs-4.5.{2,3} fails to build on arm
Summary: rocs-4.5.{2,3} fails to build on arm
Status: RESOLVED FIXED
Alias: None
Product: Rocs
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Tomaz Canabrava
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-11 23:38 UTC by Andreas K. Huettel
Modified: 2012-03-08 19:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
replace all occurences of double in code with qreal (5.39 KB, patch)
2010-11-11 23:38 UTC, Andreas K. Huettel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Huettel 2010-11-11 23:38:47 UTC
Created attachment 53337 [details]
replace all occurences of double in code with qreal

rocs-4.5.{2,3} fails to build on arm architecture (armv5tel-softfloat-linux-gnueabi), error is this (and more similar)

/var/tmp/portage/kde-base/rocs-4.5.2/work/rocs-4.5.2/rocs/src/Core/node.cpp:210: error: prototype for 'void Node::setWidth(qreal)' does not match any in class 'Node'
/var/tmp/portage/kde-base/rocs-4.5.2/work/rocs-4.5.2/rocs/src/Core/node.h:88: error: candidate is: void Node::setWidth(double)

From the qt docs:

typedef qreal
Typedef for double on all platforms except for those using CPUs with ARM
architectures. On ARM-based platforms, qreal is a typedef for float for
performance reasons.

So, this is what happens when the application assumes qreal=double...

Please consider the attached patch, which simply replaces all occurrences of "double" in the code with "qreal". Works fine on arm and should not harm anywhere else...
Comment 1 Andreas Cord-Landwehr 2012-03-08 19:44:21 UTC
Build tested on armel with 4.7.4.