Building Qt5 for i.MX6 with YOCTO

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Building Qt5 for i.MX6 with YOCTO

Building Qt5 for i.MX6 with YOCTO

For long I looked for a working tutorial to build Qt5 with YOCTO (Yocto Training - HOME) both the libraries for the board image and also a toolchain to build Qt5 applications for the board.

See the full tutorial here:

Building Qt5 using yocto on Wandboard - Wandboard Wiki

The Tutorial is written for the Wandboard that also uses an i.MX6 CPU but you can adapt the tutorial for most of the boards of the i.MX6 family I think - in my case it worked with the i.MX6 SABRE AI without problems.

You only have to adjust the sysroot and maybe also the toolchain-path because the wiki entry is a little bit older :smileyhappy:

Ask your questions for this topic - maybe I can help.

Comments

Thank you Florian for the link.

I followed successfully this tutorial and was able to cross build applications for my wandboard quad from within my Qt Creator on my x64 host. However, when it comes to 'deploy' I receive the following output in Qt Creator:

23:28:42: The remote file system has 46 megabytes of free space, going ahead.

23:28:42: Deploy step finished.

23:28:42: No deployment action necessary. Skipping.

23:28:42: Deploy step finished.

Also, do you know if it is possible to debug the application on the board from within the Qt Creator GUI interface (remotely)?

Thanks,

--Mohamed

Anyone has tried to build Qt5 with webkit? I'm getting this error:

ERROR: Nothing PROVIDES 'ruby-native' (but /home/js/fsl-community-bsp/sources/meta-qt5/recipes-qt/qt5/qtwebkit_5.2.0.bb DEPENDS on or otherwise requires it). Close matches:

  db-native

  bc-native

  byacc-native

NOTE: Runtime target 'qtwebkit-examples' is unbuildable, removing...

Missing or unbuildable dependency chain was: ['qtwebkit-examples', 'qtwebkit', 'ruby-native']

ERROR: Required build target 'core-image-x11' has no buildable providers.

Missing or unbuildable dependency chain was: ['core-image-x11', 'qtwebkit-examples', 'qtwebkit', 'ruby-native']

I get nothing when I do bitbake -s | grep ruby

Regards

Hi Mohamed,

you are welcome :smileyhappy:

You should take a look into this Youtube-Video - he explains how to set up everything with qt creator - its for another board, but similiar to a imx6 board: Beaglebone: Qt Creator for C++ ARM Embedded Linux Development - YouTube one of the Videos in the series is explaining every step.

Keep in mind that for the deployment step you also have to select the right qpa in Qt 5 - e.g.: ./myapplication -platform eglfs -plugin tslib (I think in the youtube series he uses the old -qws parameter for deployment to start the Qt Window Server System - in Qt 5 this is obsolete!)

It looks like you want to compile Qt 5.2? I think the layer is not ready yet - make shure that you have the same branch for yocto and the meta-qt5 layer!

Best regards

Florian

Yes, I'm trying to compile 5.2. Using the branch master for both Yocto and meta-qt5. I'm think that I should wait.

Regards.

Hi Florian

I built an image from the master-next branch and generally everything seems to be working. Except for QT no mediaservices are built. See heremeta-qt5 on master-next does not build video mediaservices

Any idea? I'm still pretty new to yocto and imx6 development...

Hi Florian/Everybody,

florianl

The follow the same exact steps as   mentioned  here, but i keep getting this error in QTCreator Build&Run KIT settings "the compiler cannot produce code for QT version" , has anyone come across this before ? . ! !

Thanks

Jay

When am trying to cross compile Qt5.3 Beta using toolchain as mentioned, it gives below error..
obj/qguivariantanimation.o: In function `(anonymous namespace)::qUnregisterGuiGetInterpolator_dtor_class_::~qUnregisterGuiGetInterpolator_dtor_class_()':
qguivariantanimation.cpp:(.text+0x10): undefined reference to `QVariantAnimation::registerInterpolator(QVariant (*)(void const*, void const*, float), int)'
qguivariantanimation.cpp:(.text+0x1c): undefined reference to `QVariantAnimation::registerInterpolator(QVariant (*)(void const*, void const*, float), int)'
qguivariantanimation.cpp:(.text+0x28): undefined reference to `QVariantAnimation::registerInterpolator(QVariant (*)(void const*, void const*, float), int)'
qguivariantanimation.cpp:(.text+0x34): undefined reference to `QVariantAnimation::registerInterpolator(QVariant (*)(void const*, void const*, float), int)'
qguivariantanimation.cpp:(.text+0x40): undefined reference to `QVariantAnimation::registerInterpolator(QVariant (*)(void const*, void const*, float), int)'
.obj/qguivariantanimation.o:qguivariantanimation.cpp:(.text.startup+0x18): more undefined references to `QVariantAnimation::registerInterpolator(QVariant (*)(void const*, void const*, float), int)' follow
collect2: error: ld returned 1 exit status
make[3]: *** [../../lib/libQt5Gui.so.5.3.0] Error 1
make[3]: Leaving directory `/home/kishore/Qt5_IMX6/qt-everywhere-opensource-src-5.3.0-beta/qtbase/src/gui'
make[2]: *** [sub-gui-make_first] Error 2
make[2]: Leaving directory `/home/kishore/Qt5_IMX6/qt-everywhere-opensource-src-5.3.0-beta/qtbase/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/home/kishore/Qt5_IMX6/qt-everywhere-opensource-src-5.3.0-beta/qtbase'
make: *** [module-qtbase-make_first] Error 2

Please let me know if anyone has encountered the above error.

Could successfully create the image and run the examples as mentioned in https://community.freescale.com/docs/DOC-99366#comment-11516.

However, when I tried to cross compile Qt5.3 Beta(inorder to run sample app) with the meta toolchain, it is giving errors.

Please let me know if am doing anything wrong in creation of toolchain.

PS: The board is Sabre AI IMX6 with 32 bit ubuntu host system.

I have the same exact problem as above when cross compiling for Qt5.2.1 and 5.3.  Any solutions?

I'm building the Yocto Daisy branch according to the Wandboard requirements.   I'm building with: bitbake core-image-directfb and get the following errors when building Qt:

| arm-poky-linux-gnueabi-g++  -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/ben/WandBoard/Yocto/daisy/build/tmp/sysroots/wandboard-quad -c -pipe  -O2 -pipe -g -feliminate-unused-debug-types -fvisibility-inlines-hidden -D_REENTRANT -O2 -DLINUX=1 -DEGL_API_FB=1 -DLINUX=1 -DEGL_API_FB=1 -Wall -W -fPIE  -I../../../../qtbase-opensource-src-5.2.1/mkspecs/linux-oe-g++ -I../../../../qtbase-opensource-src-5.2.1/config.tests/qpa/directfb -I../../../../../../../../sysroots/wandboard-quad/usr/include/directfb -I. -o directfb.o ../../../../qtbase-opensource-src-5.2.1/config.tests/qpa/directfb/directfb.cpp

| ../../../../qtbase-opensource-src-5.2.1/config.tests/qpa/directfb/directfb.cpp:45:2: error: #error DirectFB headers are unclean and cannot compile

|  #error DirectFB headers are unclean and cannot compile

|   ^

| make: *** [directfb.o] Error 1

| DirectFB disabled.

|  DirectFB support cannot be enabled due to functionality tests!

|  Turn on verbose messaging (-v) to /home/ben/WandBoard/Yocto/daisy/build/tmp/work/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/qtbase-opensource-src-5.2.1/configure to see the final report.

|  If you believe this message is in error you may use the continue

|  switch (-continue) to /home/ben/WandBoard/Yocto/daisy/build/tmp/work/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/qtbase-opensource-src-5.2.1/configure to continue.

| WARNING: /home/ben/WandBoard/Yocto/daisy/build/tmp/work/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/temp/run.do_configure.31508:1 exit 101 from

|   /home/ben/WandBoard/Yocto/daisy/build/tmp/work/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/qtbase-opensource-src-5.2.1/configure -v -dont-process -opensource -confirm-license -sysroot /home/ben/WandBoard/Yocto/daisy/build/tmp/sysroots/wandboard-quad -no-gcc-sysroot -prefix /usr -bindir /usr/bin/qt5 -libdir /usr/lib -datadir /usr/share/qt5 -sysconfdir /etc/qt5 -docdir /usr/share/doc/qt5 -headerdir /usr/include/qt5 -archdatadir /usr/lib/qt5 -libexecdir /usr/lib/qt5/libexec -plugindir /usr/lib/qt5/plugins -importdir /usr/lib/qt5/imports -qmldir /usr/lib/qt5/qml -translationdir /usr/share/qt5/translations -testsdir /usr/share/qt5/tests -examplesdir /usr/share/qt5/examples -hostbindir /usr/bin/qt5 -hostdatadir /home/ben/WandBoard/Yocto/daisy/build/tmp/sysroots/wandboard-quad/usr/lib/qt5 -external-hostbindir /home/ben/WandBoard/Yocto/daisy/build/tmp/sysroots/i686-linux/usr/bin/qt5 -platform /home/ben/WandBoard/Yocto/daisy/build/tmp/sysroots/i686-linux/usr/lib/qt5/mkspecs/linux-oe-g++ -xplatform linux-oe-g++ -reduce-relocations -shared -silent -no-pch -no-rpath -pkg-config -no-accessibility -no-alsa -dbus -directfb -evdev -make examples -compile-examples -no-fontconfig -freetype -opengl es2 -eglfs -no-glib -no-gtkstyle -no-iconv -icu -system-libjpeg -no-kms -system-libpng -make libs -no-linuxfb -no-mitshm -no-mtdev -no-nis -openssl-linked -no-openvg -qt-pcre -pulseaudio -release -no-sm -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -nomake tests -make tools -tslib -libudev -widgets -no-xcb -no-xcursor -no-xfixes -no-xinerama -no-xinput -no-xinput2 -no-xkb -no-xrandr -no-xrender -no-xshape -no-xsync -no-xvideo -system-zlib -eglfs

| ERROR: Function failed: do_configure (log file is located at /home/ben/WandBoard/Yocto/daisy/build/tmp/work/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/temp/log.do_configure.31508)

ERROR: Task 739 (/home/ben/WandBoard/Yocto/daisy/sources/meta-qt5/recipes-qt/qt5/qtbase_5.2.1.bb, do_configure) failed with exit code '1'

NOTE: Tasks Summary: Attempted 1086 tasks of which 1080 didn't need to be rerun and 1 failed.

Waiting for 0 running tasks to finish:

Thanks,

Ben Beckwith

Ok, so the answer was in the error message!  I hacked in a "-continue" to the qtbase.inc in the qt5 recipies and the configure passed.

Cheers,
Ben

Hi sir, I follow the step by step to build the qt for my yocto iMX6 board

It works well when the kit is ubuntu desktop app.

But when I select the yocto kit, it throws following msg:

  1. 09:59:37: Running steps for project 25...
  2. 09:59:37: Starting: "/opt/poky/1.2/sysroots/i686-pokysdk-linux/usr/bin/qmake"/home/davide/qtproject/25/25.pro -r -spec linux-gnueabi-oe-g++CONFIG+=debug
  3. sh: 1: -d: not found
  4. 09:59:37: The process "/opt/poky/1.2/sysroots/i686-pokysdk-linux/usr/bin/qmake" exited normally.
  5. 09:59:37: Starting: "/usr/bin/make"
  6. ../25/mainwindow.ui -o ui_mainwindow.h
  7. make: execvp: ../25/mainwindow.ui: Permission denied
  8. make: *** [ui_mainwindow.h] Error 127
  9. 09:59:37: The process "/usr/bin/make" exited with code 2.
  10. Error while building/deploying project 25 (kit: qt Yocto)
  11. When executing step "Make"
  12. 09:59:37: Elapsed time: 00:00.

I got stuck here for 2 weeks, could you give me some hint to solve this?

Hi,

I added dbus in build/local.conf in the building of IMX6 with Yocto. However, UDisks command is not found on core image when I build the image with bitbake core-image-minimal.

As a result, it gives below error on IMX6 Sabre AI board when I try to use with Udisks.

response is: QDBusMessage(type=Error, service="", error name="org.freedesktop.DBus.Error.ServiceUnknown", error message="The name org.freedesktop.UDisks was not provided by any .service files", signature="", contents=() )

Please let me know if am missing anything to have UDisks in generated image in this regard.

Thanks and Regards,

Ramakanth

Thank you Florian for the link.

I followed successfully this tutorial and was able to cross build applications for my wandboard quad from within my Qt Creator on my x64 host. However, when it comes to 'deploy' I receive the following output in Qt Creator:

23:28:42: The remote file system has 46 megabytes of free space, going ahead.

23:28:42: Deploy step finished.

23:28:42: No deployment action necessary. Skipping.

23:28:42: Deploy step finished.

Also, do you know if it is possible to debug the application on the board from within the Qt Creator GUI interface (remotely)?

Thanks,

--Mohamed

make sure you have all of the following features included in your build/local.conf file:

EXTRA_IMAGE_FEATURES += "debug-tweaks ssh-server-dropbear ssh-server-openssh tools-debug eclipse-debug"

Hi i work with cross-compile application for freescale imx6, and worked up with his linkYocto Training - HOME, and all right, but in the moment of run the application in QtCreator in the tab Issues show me the next error:

execvp: ../Widget/mainwindow.ui:Permission Denied

You can help me please, thanks.

Regards.

No ratings
Version history
Last update:
‎01-10-2014 09:11 AM
Updated by: