Qt 4.6 for Maemo 5 applications on Mac OS X, take II

Posted by Harald Fernengel on February 8, 2010 · 9 comments

Last time, I showed a very hacky way to get Qt 4.6 applications built for Maemo 5 on Mac OS X using MADDE, the stand-alone cross-compilation toolkit for Maemo 5.

The newly released technical preview of MADDE fixed some of the issues (bugs #7821 and #7773) that made Qt 4.6 development painful. Also, I’ve finally found some time to package the Mac OS X host tools required to build Qt apps, so it has never been easier to build applications on top of an unstable (beta) Qt release on top of an unstable (tech-preview) tool chain :)

Instructions:

  1. Install MADDE, version 0.6.14.
  2. Download fetch-qt4.6.2~git20100208-0maemo1.sh and execute it (e.g. with /bin/sh $HOME/Downloads/fetch-qt4.6.2~git20100208-0maemo1.sh). This shell script will download the Qt 4.6 2010-02-08 packages from repository.maemo.org and uncompress them into your MADDE sysroot (fremantle-arm-sysroot-2.2009-51-1-qt453).
  3. Download qt4-maemo5.tar.gz. These are the host tools required to build Qt applications (qmake, moc, rcc, uic and the make specs). Uncompress this file to /opt (e.g. tar -C /opt -zvf $HOME/Downloads/qt4-maemo5.tar.gz)

Run /opt/qt4-maemo5/bin/qmake on your qmake based project to get going. Happy hacking :)

Disclaimer: Building Qt 4.6 on MADDE is not officially supported yet. Proper Qt 4.6 support for the official Maemo SDK and for MADDE will come when Qt 4.6 is promoted from it’s /opt/qt4-maemo5 ghetto into /usr, which will most probably happen with the next firmware update.

QShare(this)

Possibly related posts:

  1. Qt for Maemo 5 home screen widgets

9 comments

1 rule February 8, 2010 at 10:52 pm
 

It’s great. In my own opinion MADDE much better then Fremantle SDK.
But I’m still missing the main feature – on-device debugging from Qt-creator.
Is there any plans for it? I know, that support of MADDE in Qt-creator is experimental, but debugging is mandatory, I think.

2 PierreChicoine February 9, 2010 at 2:30 am
 

Ditto. Got my N900 and my OpenGL ES 2 change almost complete. Biting at the bit for a Qt-Creator to Maemo debug platform. I cannot possibly imagine that’s it’s not an imminent release, it is after all the next big thing for Nokia and all of us.

3 Tico February 9, 2010 at 3:55 am
 

Thanks for your help. Anything to speed up the transition to MADDE is a big bonus! I followed your installation steps and I’m still having issues. I tried using MADDE to build the latest qt-labs-qt3d (http://qt.gitorious.org/qt-labs/qt3d/trees/master) package. I got the errors below.

———————–

computer:qt-labs-qt3d tico$ mad make
cd threed/ && make -f Makefile
mad g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -fPIC -DQT_GL_NO_SCISSOR_TEST -DQT_BUILD_QT3D_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/opt/qt4-maemo5/mkspecs/linux-g++-madde -I. -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtGui -I/opt/qt4-maemo5/include/QtOpenGL -I/opt/qt4-maemo5/include -Ipainting -Ienablers -Ieffects -Igeometry -Iviewing -Imath3d -Iscene -Igraphicsview -Ianimation -Iqt-compat -I/usr/X11/include -I. -o qglabstracteffect.o painting/qglabstracteffect.cpp
In file included from painting/qglabstracteffect.cpp:43:
painting/qglpainter_p.h:60:44: error: QtGui/private/qpaintengineex_p.h: No such file or directory
painting/qglpainter_p.h:61:46: error: QtOpenGL/private/qglextensions_p.h: No such file or directory
In file included from painting/qglabstracteffect.cpp:43:
painting/qglpainter_p.h:221: error: ISO C++ forbids declaration of ‘QPaintEngineEx’ with no type
painting/qglpainter_p.h:221: error: expected ‘;’ before ‘*’ token
make[1]: *** [qglabstracteffect.o] Error 1
make: *** [sub-threed-make_default-ordered] Error 2

————————

It looks like I’m missing the /opt/qt4-maemo5/include/QtGui/private/ include directory. Should that be in /opt/qt4-maemo/include/QtGui/private/ or ~/.madde/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/opt/qt4-maemo5/include/QtGui/private? It doesn’t appear to be in either. Any tips towards a successful build?

4 Harald Fernengel February 9, 2010 at 9:48 pm
 

@rule: We try to have everything in order (cross-platform Maemo 5 Qt development with Qt Creator) by the PR 1.2 release (the next minor firmware update for the N900), due to be in a few weeks.

@Tico: Qt3d currently requires private headers from Qt. You have to get the Qt source package (apt-get source libqt4-maemo5-dev), then run “dpkg-buildpackage -rfakeroot -uc -us -b”. You can CTRL-C the build once configure ran through. The private headers are then in the include/ dir, you have to manually copy the directories to /opt/qt4-maemo5/include.

5 wrosecrans February 9, 2010 at 11:21 pm
 

My n900 and I are really looking forward to full support in QtCreator. I have played a little bit with the dev tools, but am kind of waiting for things to stabilise a bit before I invest a lot of time playing with it.

You mention that qt is going to move from the “/opt ghetto” into /usr. You mean on the n900 device itself? I thought that Qt was large enough that it was going to stay in the /opt filesystem forever. Won’t the / filesystem be sort of cramped if you stuff Qt in there? (/ and /opt live on two separate physical devices on the n900. Running out of space on / makes it explode.)

6 Harald Fernengel February 11, 2010 at 12:09 pm
 

@wrosecrans: Qt is already in /usr, we’re just going to upgrade the existing Qt 4.5 that lives in there to Qt 4.6.

7 G73 February 20, 2010 at 4:31 pm
 

this is why iphone / android is much more popular. i can just down load the sdk, then install it from a button click.
nokia really need to make this installation process less painful in order to attract more developers.
when will an official installation guide become available that cover installation for mac also? why are there so many options for installing this maemo, for christ sake one is enough. too many options just adds to the confusion. all i want is a button that says “Qt for maemo sdk for mac 10.6″, i then press button to install. then i develop.

8 benlau March 28, 2010 at 2:59 pm
 

How about Linux support? How can I setup madde 0.6.14 to build QT 4.6 application on Linux?

9 PR1.2 April 20, 2010 at 6:37 pm
 

Is it possible to use QtCreator and Qt 4.6 for Maemo 5 with MADDE? I tried to follow the instructions but if I point QtCreator Qt Version to /opt/qt4-maemo5/bin/qmake, QtCreator says “The Qt Version has no toolchain.”

Tired of waiting PR 1.2…

Comments on this entry are closed.

Previous post:

Next post: