Qt/X11 cross-compiling and native

I’ve trying to get Qt running on my Beagle. I followed the instructions at [1] and am able to cross compile and run Qt embedded on the Beagle. Now I’d like to run Qt under X11 on the Beagle by:

  1. Cross-compiling on my host, and

  2. Compiling native on the Beagle.

Does anyone have some pointers to instructions on how to do these?

Thanks…

–Mark

[1] http://treyweaver.blogspot.com/2010/10/setting-up-qt-development-environment.html

I've trying to get Qt running on my Beagle. I followed the instructions at [1]

Seriously, don't follow that if you're on angstrom.

and am able to cross compile and run Qt embedded on the Beagle. Now I'd like to run Qt under X11 on the Beagle by:
  • Cross-compiling on my host, and
  • Compiling native on the Beagle.
Does anyone have some pointers to instructions on how to do these?

Yes, for crosscompiling: http://www.angstrom-distribution.org/building-angstrom

Compiling it natively won't be so easy, since you need >3G of ram to link qtwebkit and a few days/weeks to build the rest, so stick to crosscompiling qt. Actually, don't build qt yourself, but reuse the angstrom one and build your apps against that, that will save you needlessly (re)building qt.

Why do qt newbies always insist on rebuilding qt? This isn't 2003 with qt/e2.x anymore, trolltech got their act together with qt4, so stop revisiting mistakes from the past!

Yup, I’d rather not rebuild anything, however Google searches seem to turn up detailed instructions on how to do it the hard way rather than instructions on the easy way.

I’ve poked around my Angstrom installation and found a bunch of qt stuff, so the next question is: How do I compile qt for X11? I have some examples that compile nicely for embedded, but I want them to compile for X11.

–Mark

To cross-compile: make the recipe inherit 'qt4x11' instead of 'qt4e', that's it.
To build it natively: http://lists.linuxtogo.org/pipermail/angstrom-distro-users/2011-June/003678.html

Thanks for the help, but I need a little more context. What recipe do I change qt4e to qt4x11?

–Mark

The recipe of your app you want to build.

Found it. Thanks.

There seems to be a bewildering number of recipes to choose from. I picked

$ source environment-2008
$ bitbake qt4-x11-free-gles

Is there a better choice for just playing the qt?

–Mark

Yes, build an app, it will automatically drag in qt. Building the GLES recipe is for advanced users, since it makes regular QT apps slower

So would bitbake qt4-x11-free be a better choice?

–Mark

bitbake <qtapp> would be better, e.g. 'bitbake wpa-gui'

Well, I tried the bitbake wpa-gui, but I got an error. Details are here [1].

How do I recover from this?

–Mark

NOTE: package cmake-native-2.8.2-r2: task do_compile: Failed
ERROR: Function ‘do_compile’ failed (see /home/yoder/BeagleBoard/oe/build/tmp-angstrom_2008_1/work/i686-linux/cmake-native-2.8.2-r2/temp/log.do_compile.5184 for further information)
ERROR: Task 2153 (/home/yoder/BeagleBoard/oe/sources/openembedded/recipes/cmake/cmake-native_2.8.2.bb, do_compile) failed with exit code ‘1’
Waiting for 1 active tasks to finish:
0: gconf-2.28.0-r2 do_compile (pid 5193)
NOTE: package gconf-2.28.0-r2: task do_compile: Succeeded
ERROR: ‘/home/yoder/BeagleBoard/oe/sources/openembedded/recipes/cmake/cmake-native_2.8.2.bb’ failed

[1] http://pastebin.com/J9fhNEKw