Francisco Alberto Carrillo Dominguez

Qt5 on i.MX6  DO's and DONT's

Discussion created by Francisco Alberto Carrillo Dominguez Employee on Apr 15, 2013
Latest reply on Sep 5, 2013 by stavrosmarkou

Once we started testing the Qt5 framework, we had stumbled into the wall several times. This is a recount of the problems we faced:

 

  1. Downloading static .tar file
    1. Qt5 is a piece of software that is always getting better, with fixes and  new additions. So a static .tar file limits you to get all these new features.
    2. The GIT version is more flexible and useful, use the GIT.
  2. Configure Line errors
    1. Understand well what are the parameters you want to include in your configure line.  It is supposed that the options are reversible, but some of the options do not seem to work well when deselecting them. So try to understand first why are you including each option.
    2. We made the mistake to try to build Xcb support,  in our gnome distribution the libraries for Xcb and the ones required by Qt5 do not match, since the ltib libraries are outdated. In our Wayland distribution Xcb is not used and in our framebuffer only distributions Xcb should not be selected for obvious reasons. So the configure option -no-xcb should be used.
    3. The no-pch, should be used because if not specified the compiler would try to use precompiled headers which we do not have.
    4. The -no-opengl -opengl es2  option should be used because Qt5 in i.MX is only compatible with OpenGL es2.
    5. The -make libs -make examples -make demos ,  options are needed to generate everything you need to be sure Qt5 was correctly installed.
    6. Select your Crosscompiler, sysroot and prefix correctly.
  3. When installing the libraries will be copied inside the prefix you specified, in your computer and also in the sysroot, which commonly will be a rootfs. So be sure to call this command with sudo since the in the rootfs normally only the root user can write.
  4. Choosing the correct Demos to show:
    1. Qt4 which was broadly used, consisted mostly on C++ programming,  in its latest versions it added support for QML, but this feature was not very famous.  Qt5 for the contrary gets its main advantages from the QML language. Qt5 has added a dedicated scene graph based on OpenGL ES 2.0 or OpenGL 2.0 for its rendering. Using a scene graph for graphics rather than the traditional imperative painting systems.
    2. We had the problem when we tried to execute demos that were designed to run in Qt4.x expecting them to work nice on Qt5, some of them designed to run in the PC rather an embedded environment. These demos compiled, but the behavior in the screen was bad.  Most of the demos that had problems used widgets and windowing, which of course in a framebufffer-only distribution will not look good. Running these demos in an embedded windowing system like wayland showed no better results since the demos were designed for PC.
    3. We had our suspicions on the Demos we were trying to build, and a 3rd party confirmed that trying to use those demos was not relevant, and that they should be replaced with others that showed better the capabilities of Qt5.
    4. The demos that should not be used in an embedded environment,  and their replacements:
      1. hellogl_es2  ----------------------------> hellowindow (only in a graphic environment works O, i.e.  X11, Wayland-weston)
      2. 2dpainting ------------------------------> Delete, do not show. The reason to elimiate this demo is that this demo showcases how in Qt4 you could decide wether to use the GPU to render or use software render, in Qt5 the scenegraph is always accelerated with GPU.
      3. textures ---------------------------------> /quick/scenegraph/textureinsgnodequick/scenegraph/textureinsgnode
    5. Demos that really showcase Qt5 advantages and features are:
      1. customgeometry
      2. openglunderqml
      3. simplematerial
      4. shadereffects
  5. Qt5 over Wayland-Weston
    1. Do not use kernels (uImage files) of other distributions, this will cause failure when trying to start Weston.
    2. Always start the Weston User interface before running demos.
    3. When executing a Qt5 demo, use the correct platform i.e.   ./hellowindow -platform wayland-egl.   Failure to do so will execute the demo on framebuffer and since Weston is running this will wreak havoc in the screen.
    4. Make the correct symlinks for the EGL and GAL libraries, failing to do so will throw openGL errors.
      1. Detailed here  https://community.freescale.com/thread/305945


Outcomes