bugGNU Octave - Bugs: bug #44970, Build fails on ARM because qreal...

 
 

bug #44970: Build fails on ARM because qreal is a typedef for float

Submitted by:  Orion Poplawski <opoplawski>
Submitted on:  Thu 30 Apr 2015 08:08:27 PM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 02 Jun 2015 04:52:50 PM UTC, comment #9:

Retagging release from 4.0.0-rc4 to 4.0.0.

John W. Eaton <jwe>
Project Administrator
Sat 02 May 2015 04:41:30 AM UTC, comment #8:

Oops. Wrong report.

Rik <rik5>
Project Administrator
Sat 02 May 2015 04:40:50 AM UTC, comment #7:

I checked in a cset that at checks for a modern version of sndfile before setting HAVE_SNDFILE (http://hg.savannah.gnu.org/hgweb/octave/rev/3b3579ad7e46). More could be done, but this is probably enough.

Rik <rik5>
Project Administrator
Sat 02 May 2015 03:44:29 AM UTC, comment #6:

I unrolled the for loop because it was so small and because I felt it was clearer about what was happening. I checked in the change under your name here (http://hg.savannah.gnu.org/hgweb/octave/rev/6446649e42c1). Closing report.

Rik <rik5>
Project Administrator
Fri 01 May 2015 02:41:04 PM UTC, comment #5:

I suspect (someone correct if I'm wrong) that the only functions that matter are the ones that pass a pointer or a reference to a qreal, not by value or return value.

There are only a handful of functions in the Qt header files that do so, a quick grep in the Qt directory shows functions like getRect, getCoords, getRgbF, getHsvF, etc.

And the only one of these I see in Octave is getRgbF, so this looks pretty safe and complete to me.

Mike Miller <mtmiller>
Project Administrator
Fri 01 May 2015 02:05:13 AM UTC, comment #4:

This appears to be the only compile error on arm. Final patch:

Orion Poplawski <opoplawski>
Thu 30 Apr 2015 10:12:04 PM UTC, comment #3:

That fails with:
I think it would be:
Ugly, yes, but I don't have another suggestion.

Orion Poplawski <opoplawski>
Thu 30 Apr 2015 09:58:27 PM UTC, comment #2:

Is it only one location that this happens? Or is the assumption that qreal = double all over the Qt code? If it's just one or two locations then we can probably hack something together as suggested in comment #1.

Rik <rik5>
Project Administrator
Thu 30 Apr 2015 08:39:45 PM UTC, comment #1:

http://koji.fedoraproject.org/koji/getfile?taskID=9608836&name=build.log&offset=-4000

http://doc.qt.io/qt-4.8/qtglobal.html#qreal-typedef
says:
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.

This causes the problem in

I think this is a ugly patch but just to give an idea:

Andreas Weber <andy1978>
Project Member
Thu 30 Apr 2015 08:08:27 PM UTC, original submission:

graphics/QtHandlesUtils.cc: In function 'Matrix QtHandles::Utils::toRgb(const QColor&)':
graphics/QtHandlesUtils.cc:155:43: error: no matching function for call to 'QColor::getRgbF(double&, double, double*) const'
c.getRgbF (rgbData, rgbData+1, rgbData+2);
^
In file included from /usr/include/QtGui/qpalette.h:46:0,
from /usr/include/QtGui/qwidget.h:50,
from /usr/include/QtGui/QWidget:1,
from graphics/Container.h:26,
from graphics/QtHandlesUtils.cc:37:
/usr/include/QtGui/qcolor.h:114:10: note: candidate: void QColor::getRgbF(qreal, qreal, qreal, qreal) const
void getRgbF(qreal r, qreal g, qreal b, qreal a = 0) const;
^
/usr/include/QtGui/qcolor.h:114:10: note: no known conversion for argument 1 from 'double' to 'qreal {aka float*}'
Makefile:3422: recipe for target 'graphics/graphics_libgui_graphics_la-QtHandlesUtils.lo' failed

Orion Poplawski <opoplawski>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by opoplawski (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 02 Jun 2015 04:52:50 PM UTCjweRelease4.0.0-rc4=>4.0.0
    Sat 02 May 2015 04:41:30 AM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sat 02 May 2015 04:40:50 AM UTCrik5StatusFixed=>Ready For Test
      Open/ClosedClosed=>Open
    Sat 02 May 2015 03:44:29 AM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Fri 01 May 2015 02:41:26 PM UTCmtmillerCategoryNone=>Configuration and Build System
      StatusNone=>Patch Submitted
    Thu 30 Apr 2015 08:39:45 PM UTCandy1978SummaryBuild fails on arm=>Build fails on ARM because qreal is a typedef for float

    Back to the top


    Powered by Savane 3.1-cleanup1