wiki:BuildingQt5OnHarmattan

Version 45 (modified by zeno.albisser@nokia.com, 12 years ago) (diff)

--

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. It's also our TODO list to get there.

Goal

The goal is to get WebKit trunk running on the N9/N950, to a state where it can be developed sensibly.

Assumptions

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://gitorious.org/qt/qt5.git qt5
  • cd qt5
  • Check out the current qt5 revision used by the bot to run tests: git checkout 3d88fff7ad0e2331e5f3584572010739b0f7e831
  • 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 3d88fff7ad0e2331e5f3584572010739b0f7e831
  • 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 git clean -fdx
  • git clean -fdx
  • ./configure ......

Note: DO NOT USE SHADOW BUILDS OF QT (MODULES) AT THE MOMENT.

Build Instructions for Qt

Inside Scratchbox:

  • unset QTDIR
  • Run configure in the qt5 directory: ./configure -nokia-developer -fast -platform unsupported/linux-host-g++ -xplatform linux-g++-maemo -force-pkg-config -nomake tests -nomake examples
  • And run make from the toplevel qt5 directory to build all modules in one shot.
  • Ensure your PATH is up-to-date: export PATH=$PWD/qtbase/bin:$PATH

Build WebKit

  • perl Tools/Scripts/build-webkit -2 --qt --release --no-3d-canvas --makeargs="-j8" --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 *
      

Current Issues / TODO

If you find any issues that you're working on, just add them below :)

  • Qt 5 TODOs:
    • Input method support in Qt 5 for Harmattan
  • Rewrite MiniBrowser in QML
  • Figure out "kinetic" scrolling (pending QScroller decision)

Done

  • Qt 5 TODOs:
    • Build issue with the -platform/-xplatform switch and fontconfig/freetype (Simon).
    • No interaction with page possible when launching MiniBrowser with -touch. Due to broken touch mocking. (Simon)
    • Text is funny mis-rendered in MiniBrowser -touch. (Fixed, pending review/inclusion in qtbase. Patch at http://paste.kde.org/134605/ )
    • Touch Input (xi2) support in Qt 5 for Harmattan (Jocelyn. Fixed in qtbase master)
  • Most obvious WebKit issues:
    • MiniBrowser doesn't show any web content on Harmattan (Jocelyn. Fixed in qtbase master)