Version 57 (modified by, 12 years ago) (diff)

Add extra file to remove linux-g++-maemo from. Enables Maliit keyboard.

Building the Qt port on MeeGo 1.2 Harmattan with Qt 5

See also Building QtWebKit on Linux

This page, as well as the attempt of achieving this build, is work in progress.


Installing Build Dependencies

Inside Scratchbox:

  • Basic build deps, shared between Qt 5/4 and WebKit stuff: fakeroot apt-get build-dep qt4-x11 libgrob-qtwebkit (Yes, the libgrob-qtwebkit part is intentional)
  • Dependencies needed for XCB back-end: fakeroot apt-get install libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm1 libxcb-icccm1-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev
  • Ensure the render packages are gone: fakeroot apt-get remove --purge libxcb-render-util0 libxcb-render-util0-dev

Getting the Qt sources

Outside Scratchbox:

  • git clone git:// qt5
  • cd qt5
  • Check out the current qt5 revision used by the bot to run tests: git checkout 91f83fa33a1cc5a97b17d8e4d25e1bb952006061
  • Initialize & Clone the sub-modules needed: ./init-repository --module-subset=qtbase,qtxmlpatterns,qtscript,qtdeclarative

Note: Use the following commands to update from a previous check-out:

  • cd qt5
  • git fetch --recurse-submodules
  • git checkout 91f83fa33a1cc5a97b17d8e4d25e1bb952006061
  • git submodule update --recursive

If you'd like to clean out everything(!), you can use the following sequence of commands:

  • cd qt5
  • git submodule foreach --recursive git clean -fdx
  • git clean -fdx
  • ./configure ......

Build Instructions for Qt


Inside Scratchbox in the qt5 directory:

export -n QTDIRTo unset QTDIR. Or make sure that QTDIR points to your qt5/qtbase directory.
sed -i 's/CFG_V8SNAPSHOT=auto/CFG_V8SNAPSHOT=no/' qtbase/configureWorks around make: *** [generated-debug/snapshot.cpp] Error 126 caused by a crash of qemu in scratchbox. There is no configure option as this should not be needed. Let's see if we need one or if we start building outside of scratchbox with a sysroot instead.
sed -i 's/linux-g++-maemo://' qtbase/src/plugins/platforms/xcb/ qtbase/src/plugins/platforminputcontexts/ linux-g++-maemo was used before to get the Harmattan-specific XInput2 touch and Maliit (virtual keyboard) support. But now xplatform doesn't work anymore since qtbase breaks the old 3.5 host compiler in scratchbox, so we have to enable it by hand. We should have some kind of auto-detection but we have to try cross-compiling + sysrooting properly before and find a mechanism that fits properly with this mode once we have something stable.
./configure -nokia-developer -fast -force-pkg-config -nomake tests -nomake examples
makeFrom the toplevel qt5 directory to build all modules in one shot.
export PATH=$PWD/qtbase/bin:$PATHEnsure your PATH is up-to-date to use the qt5 qmake instead of the default one.

Build WebKit

  • perl Tools/Scripts/build-webkit --qt --release --no-3d-canvas --qmakearg="CONFIG+=use_qt_mobile_theme"

Install dependencies on the device

  • Some packages are not in the device apt repositories and therefore need to be transfered from scratchbox.
    • Execute the following lines inside scratchbox:
      fakeroot apt-get -d install libxcb-image0 libxcb-keysyms1 libxcb-icccm1 libxcb-aux0 libxcb-event1 libxcb-property1
      mkdir ~/swork/packages && cd ~/swork/packages
      cp /var/cache/apt/archives/libxcb-image0_* . 
      cp /var/cache/apt/archives/libxcb-keysyms1_* .
      cp /var/cache/apt/archives/libxcb-icccm1_* .
      cp /var/cache/apt/archives/libxcb-aux0_* .
      cp /var/cache/apt/archives/libxcb-event1_* .
      cp /var/cache/apt/archives/libxcb-property1_* .
    • Now ssh to the device and change into your NFS mounted directory to install the previously downloaded packages
      cd /your_nfs_mount/swork/packages/
      dpkg -i *