Hi -release list, and hi arm and armel buildd-admins,
I have a FTBFS for package qBittorrent on armel arch (see [1]), and I
guess I will also on arm (currently package is 'Needs build' on arm).
I'm pretty sure that the error is due to a particular typedef in Qt4
headers: in fact, as you can read at [2], file qtglobal.h defines type
qreal as a float for arm arches (instead of a double).
I'm wondering which is the best fix for this problem: maybe it is enough
to cast to (double *) the second argument of modf() (this should not
affect at all build on other arches).
--- qbittorrent-1.1.0beta3.orig/src/realprogressbarthread.cpp
+++ qbittorrent-1.1.0beta3/src/realprogressbarthread.cpp
@@ -142,9 +142,9 @@
end = array.size();
int start_int, end_int;
qreal temp, start_frac, end_frac;
- start_frac = modf(start, &temp);
+ start_frac = modf(start, (double *) &temp);
start_int = (int) temp;
- end_frac = modf(end, &temp);
+ end_frac = modf(end, (double *) &temp);
end_int = (int) temp;
if(start_int == end_int)
{
Otherwise (in order to fix the code in a clean way only for involved
arches), I guess we need to use some specific #define for arm{,el} (does
QT_ARCH_ARM is really suited for this purpose?).
--- qbittorrent-1.1.0beta3.orig/src/realprogressbarthread.cpp
+++ qbittorrent-1.1.0beta3/src/realprogressbarthread.cpp
@@ -142,9 +142,17 @@
end = array.size();
int start_int, end_int;
qreal temp, start_frac, end_frac;
+#ifdef (QT_ARCH_ARM)
+ start_frac = modf(start, (double *) &temp);
+#else
start_frac = modf(start, &temp);
+#endif
start_int = (int) temp;
+#ifdef (QT_ARCH_ARM)
+ end_frac = modf(end, (double *) &temp);
+#else
end_frac = modf(end, &temp);
+#endif
end_int = (int) temp;
if(start_int == end_int)
{
I hope someone more experienced with such arches can suggest me the best
way to proceed.
Thanks,
Cristian
[1] http://buildd.debian.org/fetch.cgi?&pkg=qbittorrent&ver=1.1.0%7Ebeta3-1&arch=armel&stamp=1215931718&file=log
[2] http://doc.trolltech.com/main-snapshot/qtglobal.html#qreal-typedef
Attachment:
signature.asc
Description: Digital signature