| Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
hi, we tried to build Qt 4.3.0 rc1 on Debian arm and it failed to build from scratch. Qt 4.2.3 seems affected too: http://buildd.debian.org/fetch.cgi?pkg=qt4-x11;ver=4.2.3-1;arch=arm;stamp=1177691549 It seems the detected architecure is generic, confirmed by qconfig.h: /* Machine Architecture */ #define QT_ARCH_GENERIC it makes QT_NO_FPU not defined and qreal is a typedef for double. In qtestcase.h, __arm__ is used. It causes QTest::qCompare redefinition and FTBFS. I don't know why generic architecture is detected ? what's the recommended define to use for arm (QT_ARCH_ARM, QT_NO_FPU, __arm__) ? Qt use both QT_ARCH_ARM and __arm__, a bit confusing. Any recommended fix ? cheers, Fathi To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
On Sunday 20 May 2007 11:39:35 Fathi Boudra wrote: > hi, > > we tried to build Qt 4.3.0 rc1 on Debian arm and it failed to build from > scratch. Qt 4.2.3 seems affected too: > http://buildd.debian.org/fetch.cgi?pkg=qt4-x11;ver=4.2.3-1;arch=arm;stamp=1 >177691549 > > It seems the detected architecure is generic, confirmed by qconfig.h: > /* Machine Architecture */ > #define QT_ARCH_GENERIC > > it makes QT_NO_FPU not defined and qreal is a typedef for double. In > qtestcase.h, __arm__ is used. It causes QTest::qCompare redefinition and > FTBFS. > > I don't know why generic architecture is detected ? what's the recommended > define to use for arm (QT_ARCH_ARM, QT_NO_FPU, __arm__) ? > > Qt use both QT_ARCH_ARM and __arm__, a bit confusing. > > Any recommended fix ? I think your observation of the failing architecture detection (falling back to generic) is the key. We usually cross-compile for arm, which is when we specify the architecture on the commandline. AFAICS the case of a native arm compilation isn't really handled by the configure script, but I think that would be the right place to fix the detection and most likely your problem. Now I don't know the exact output of uname on your arm autobuilder, so I can't offer a direct fix. But it shouldn't be too hard to get there if you could try the following: 1) In the configure script search for the "determine the system architecture" comment 2) There's an if statement and in the else branch of it there's a case on the uname output. You can see various architectures being handled there but no arm flavour. 3) There is a fallback that tries to match uname -m directly to the list of supported architectures in src/corelib/global/arch/$ARCH, but that doesn't seem to work for you, which indicates that uname -m is not arm for you. Perhaps something like armv4? 3) Try adding a case that matches your uname output and sets ARCH to "arm". Simon
Attachment:
Attachment:
pgpUdgHypeVJF.pgp
Description: PGP signature
Message 3 in thread
> 1) In the configure script search for the "determine the system
> architecture" comment
> 2) There's an if statement and in the else branch of it there's a case on
> the uname output. You can see various architectures being handled there but
> no arm flavour.
> 3) There is a fallback that tries to match uname -m directly to the list of
> supported architectures in src/corelib/global/arch/$ARCH, but that doesn't
> seem to work for you, which indicates that uname -m is not arm for you.
> Perhaps something like armv4?
exact. We have build daemons with armv4, armv5tel and armv5tejl.
> 3) Try adding a case that matches your uname output and sets ARCH to "arm".
ok, i'll try. By the way, it could be nice to replace remaining __arm__ by
QT_ARCH_ARM to avoid confusion or mixing both:
* src/corelib/io/qfilesystemwatcher_inotify.cpp:71:
#elif defined (__arm__)
* src/corelib/global/qglobal.h:319:
# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
* tools/qtestlib/src/qtestcase.h:198:
#if defined(QT_COORD_TYPE) || defined(__arm__)
cheers,
Fathi
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
Message 4 in thread
> 3) Try adding a case that matches your uname output and sets ARCH to "arm".
i applied the joined patch. Build is in progress, we'll see if it fixes FTBFS.
cheers,
Fathi
diff -urNad qt4-x11-4.3.0~rc1~/configure qt4-x11-4.3.0~rc1/configure
diff -urNad qt4-x11-4.3.0~rc1~/configure qt4-x11-4.3.0~rc1/configure
--- qt4-x11-4.3.0~rc1~/configure 2007-05-06 17:54:53.000000000 +0200
+++ qt4-x11-4.3.0~rc1/configure 2007-05-20 16:10:15.000000000 +0200
@@ -2204,6 +2204,12 @@
fi
ARCH=s390
;;
+ *:*:arm*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " ARM (arm)"
+ fi
+ ARCH=arm
+ ;;
*:*:*)
if [ "$OPT_VERBOSE" = "yes" ]; then
echo " Trying '$UNAME_MACHINE'..."
diff -urNad qt4-x11-4.3.0~rc1~/tools/qtestlib/src/qtestcase.h qt4-x11-4.3.0~rc1/tools/qtestlib/src/qtestcase.h
--- qt4-x11-4.3.0~rc1~/tools/qtestlib/src/qtestcase.h 2007-05-06 17:54:35.000000000 +0200
+++ qt4-x11-4.3.0~rc1/tools/qtestlib/src/qtestcase.h 2007-05-20 16:11:07.000000000 +0200
@@ -195,7 +195,7 @@
template <typename T1, typename T2>
bool qCompare(T1 const &, T2 const &, const char *, const char *, const char *, int);
-#if defined(QT_COORD_TYPE) || defined(__arm__)
+#if defined(QT_COORD_TYPE) || defined(QT_ARCH_ARM)
template <>
inline bool qCompare<qreal, double>(qreal const &t1, double const &t2, const char *actual,
const char *expected, const char *file, int line)
Message 5 in thread
hi simon,
> Did you have success with the patch?
Qt4.3.0rc1 with the patch was successfully built on our arm buildd.
Thanks for your support, and webkitkde ;)
cheers,
Fathi
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx