[scribus-dev] [scribus] Compiling Scribus 1.4.3 on an ARM CPU (Debian Wheezy)

William Bell whbell at btinternet.com
Tue Aug 20 21:12:10 UTC 2013


Hi,

Would it be possible to use qreal rather than double and 
float for the Qt function calls and template instantiations of Qt 
objects?  This would completely solve the ARM compilation problems and 
avoid the need for the LINUX distributions that support ARM to carry 
around patch files.  The decision to use qreal as float for ARM is a 
decision made by the Qt developers.  Therefore, there is some resistance
 to patch Qt within the Debian camp.  I can supply patch files, for 
changes against 1.4.3,

Thanks and best regards,

Will



________________________________
 From: William Bell <whbell at btinternet.com>
To: Scribus User Mailing List <scribus at lists.scribus.net> 
Sent: Tuesday, 20 August 2013, 20:45
Subject: Re: [scribus] Compiling Scribus 1.4.3 on an ARM CPU (Debian Wheezy)
 


Hi Dan,

Is
Scribus/scribus/ui/modetoolbar.h.orig


the orginal file in the Scribus repository or your patched version?  How does your change fix the problem in scpainter?  What does the Fedora ARM build contain in /usr/include/qt4/Qt/qglobal.h ? Do you have float types on ARM or not?

Thanks and best regards,

Will



________________________________
 From: Dan Horák <dan at danny.cz>
To: scribus at lists.scribus.net 
Sent: Tuesday, 20 August 2013, 18:30
Subject: Re: [scribus] Compiling Scribus 1.4.3 on an ARM CPU (Debian Wheezy)
 

On Tue, 20 Aug 2013 17:12:50 +0100 (BST)
William Bell <whbell at btinternet.com> wrote:

> Hi,
> 
> I am trying to build Scribus 1.4.3 on an ARM CPU that runs 
> Debian Wheezy (Raspbian).  Following the installation of all of the 
> dependencies, the compilation goes well until 

we in Fedora use
http://pkgs.fedoraproject.org/cgit/scribus.git/tree/scribus-to-double.patch
for ARM, resulting rpms are at
http://koji.fedoraproject.org/koji/taskinfo?taskID=5830461


        Dan

> [ 66%] Building CXX object
>
 scribus/CMakeFiles/scribus.dir/scpainter.cpp.o /home/pi/Scribus/scribus/scpainter.cpp:
> In member function ‘void ScPainter::drawVPath
> (int)’: /home/pi/Scribus/scribus/scpainter.cpp:1119:31: error: no
> matching function for call to ‘QPen::setDashPattern(QVector<double>&)’
> /home/pi/Scribus/scribus/scpainter.cpp:1119:31: note: candidate is:
> /usr/include/qt4/QtGui/qpen.h:87:10: note: void QPen::setDashPattern
> (const QVector<float>&) /usr/include/qt4/QtGui/qpen.h:87:10:
>  note:   no known conversion for argument 1 from ‘QVector<double>’
>  to ‘const QVector<float>&’
> make[2]: *** [scribus/CMakeFiles/scribus.dir/scpainter.cpp.o] Error 1
> make[1]: *** [scribus/CMakeFiles/scribus.dir/all] Error 2
> make: *** [all]
>  Error 2
> 
> It is very clear why this fails.  In Qt4 there
 is
> 
> /usr/include/qt4/Qt/qglobal.h
> 
> typedef QT_COORD_TYPE qreal;
> #elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined
> #(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
> typedef float qreal;
> #else
> typedef double qreal;
> #endif
> 
> The Qt functions use qreal, rather than double of float.  In the
> Scribus source code there are lots of 
> 
> QList<double> and QVector<double>
> 
> While I could use sed to switch these to qreal, there are other
> pieces of code such as
> 
> Scribus/scribus/util.cpp
> 
> void getDashArray(int dashtype, double linewidth, QVector<float>
> &m_array) { QVector<double> tmp;
>    getDashArray(dashtype, linewidth, tmp);
>    m_array.clear();
>    for (int i = 0; i < tmp.count(); ++i)
 {
>    m_array <<
>  static_cast<float>(tmp[i]);
>   }
> }
> 
> void getDashArray(int dashtype, double linewidth, QVector<double>
> &m_array) {
>         m_array.clear();
>         if ((dashtype == 1) || (dashtype == 0))
>                 return;
>         double Dt = qMax(1.0*linewidth, 0.1);
>         double Sp = qMax(2.0*linewidth,
>  0.1);
>         double Da = qMax(4.0*linewidth, 0.1);
>         switch (dashtype)
>         {
> 
> 
> Why is QVector<double> used instead of
 QVector<qreal> etc?  If I use
> sed, I will have to remove overloaded functions that include
> <float>.  Is this safe?
> 
> Thanks and best regards,
> Will
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://lists.scribus.net/pipermail/scribus/attachments/20130820/ea7587d4/attachment.html>
> ___ Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net

___
Scribus Mailing List: scribus at lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20130820/7bb5d004/attachment.html>


More information about the scribus-dev mailing list