[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

qt4-x11: FTBFS on arm (cannot bind packed field)



Package: qt4-x11
Severity: important
Tags: patch

Currently, qt4-x11 fails to build from source on arm, with this error:

In member function 'ushort& QChar::unicode()':
/build/buildd/qt4-x11-4.0.0/include/QtCore/../../src/corelib/tools/qchar.h:225:
error: cannot bind packed field '((QChar*)this)->QChar::ucs' to
'ushort&'

The full log is here:

http://buildd.debian.org/fetch.php?&pkg=qt4-x11&ver=4.0.1-5&arch=arm&stamp=1132352199&file=log&as=raw

I noticed there is a patch in the Debian version of qt-x11-free
(10_arm_gcc4.dpatch) that seems to address the same issue. The attached
patch should hopefully do the trick (I haven't been able to check for myself as I couldn't find a Debian/arm machine with chroots that is up).

Cheers,
Jeremy

--
http://www.jerryweb.org/             : JerryWeb.org
http://sailcut.sourceforge.net/      : Sailcut CAD
http://opensource.polytechnique.org/ : Polytechnique.org Free Software


diff -urN qt4-x11-4.0.1/src/corelib/tools/qchar.h qt4-x11-4.0.1.patched/src/corelib/tools/qchar.h
--- qt4-x11-4.0.1/src/corelib/tools/qchar.h	2005-08-16 10:41:08.000000000 +0200
+++ qt4-x11-4.0.1.patched/src/corelib/tools/qchar.h	2005-12-13 13:09:37.000000000 +0100
@@ -219,7 +219,7 @@
     inline const char toLatin1() const;
     inline const ushort unicode() const { return ucs; }
 #ifdef Q_NO_PACKED_REFERENCE
-    inline ushort &unicode() { return *(&ucs); }
+    inline ushort &unicode() { return *((ushort*)&ucs); }
 #else
     inline ushort &unicode() { return ucs; }
 #endif

Reply to: