Problem with Colibri iMX6/Qt

Hi!

I try currently to make an image for Colibri iMX6 and development with Qt. I have been following this guide

but I have many probelms. I compiled angstrom-lxde-image with meta-qt5 and use it on the module when i try to let an application run on module using the existing cross compiler for Qt embbeded linux then it doesn’t work :

/ Home / root / test: /usr/lib/libQt5Gui.so.5: version `Qt_5 'not found (required by / home / root / sample)
/ Home / root / test: /usr/lib/libQt5Core.so.5: version `Qt_5 'not found (required by / home / root / sample)
/ Home / root / test: /usr/lib/libQt5Widgets.so.5: version `Qt_5 'not found (required by / home / root / sample)
**these libraries are existing on module in /usr/lib.** 

I have used this but did not work also:

# LD_LIBRARY_PATH =/usr/lib/ ./sample

if I try to compile meta-toolchain-qt5 , then i have such issues :

ERROR: Task 847 (../oe-core/build/../stuff/meta-qt5/recipes-qt/qt5/qtwayland_git.bb, do_compile) failed with exit code '1'. (if i use the meta-qt5.5.1 repo version no changes)

or

ERROR: ParseError at ../oe-core/build/../stuff/meta-qt5/classes/qmake5_base.bbclass:50: Could not inherit file classes/remove-libtool.bbclass (if i use the meta-qt5 from github **perhaps qt5.6.1)**

I can’t find the meta-qt5.6.1 on github. I would like to make an image using meta-qt5.6.1 and later build for toolchain-qt5.

i look forward to your reply
than you

angstrom-lxde-image does not have the Qt libraries installed by default. Is the image build after adding the Qt components as described here with IMAGE_INSTALL_append?

When you say cross compiler for Qt Embedded Linux, are you referring to qte with Qt at 4.8? What is OE core version you use? remove-libtool error would only probably occur if meta-qt5 and used OE core version are not in sync.

There is no meta-qt5.6.1. meta-qt5 is the layer and depending upon the Yocto/OpenEmbedded release the Qt5 version will be decided. We are currently at jethro and this ties the Qt5 version at 5.5. With krogoth it would be 5.6, however if and when we migrate to krogoth is undecided. See here and here.

I created an image with Qt libraries but still does not work. I used OE V2.6 and meta-qt5 master but I get many same error message.
I would like to use the CAN bus with Qt but how can I create a useful a linux image for this purpose?

Could someone help me please?
I need some advices, how to make an image for CAN bus using Qt.

Please note that meta-qt5 master would not in all probability build with our OE V2.6 out of the box. You can use the existing meta-qt5 layer already integrated in our V2.6 or V2.6.1 and then build meta-toolchain-qt5.

To include the Qt libraries in the image for example with angstrom-lxde-image, change the “build/conf/local.conf” file to add the packages:

PREFERRED_PROVIDER_psplash-support = "psplash-angstrom"
+
+IMAGE_INSTALL_append = " qtbase qtbase-plugins cinematicexperience"

Add the Qt packages as applicable for your requirement.

For testing CAN, see here. For development purposes, it is recommended to follow the procedure as per here and use kernel build out of OpenEmbedded. Once your changes I finalised, you may integrate them in OE. See an article on this thematic.

Edit: I tried with yocto/poky and fsl-community-bsp and ran into errors with both. The easiest way turned out to be the following. I assume you use the stock OE V2.6.1 from here on.

In ~oe-core/layers/meta-qt5 run the following commands

git checkout -b 2.6.1
git checkout -b master -t remotes/repo/master

The first command checkouts the default branch with 2.6.1 which will allow us to return to it later if required. Next we checkout the master branch so that Qt 5.7 can be used.

Next download the patch in ~oe-core/layers/openembedded-core and apply it with

git am < 1-5-remove-libtool-add-new-class.patch

Make sure this patch is applied correctly by checking with git log and that no errors get reported while applying the patch.

Next follow the build procedure as usual and stated by our article. Below is the log from the build of qtserialbus on our build server here.

[mas@linuxdev build]$ MACHINE=colibri-imx6 bitbake qtserialbus
Loading cache: 100% |######################################################################################| ETA:  00:00:00
Loaded 125 entries from dependency cache.
Parsing recipes: 100% |####################################################################################| Time: 00:00:27
Parsing of 2482 .bb files complete (98 cached, 2384 parsed). 3081 targets, 173 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-23"
TARGET_SYS        = "arm-angstrom-linux-gnueabi"
MACHINE           = "colibri-imx6"
DISTRO            = "angstrom"
DISTRO_VERSION    = "v2015.12"
TUNE_FEATURES     = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU        = "vfp-neon"
meta-angstrom     = "HEAD:7f2eec75fd20b672221ff071d121fa9ea2e1e6ea"
meta-toradex-nxp  = "HEAD:b7fa1ed761c53c2737d8722efca6421607ecfa89"
meta-fsl-arm      = "HEAD:417f669e4dede244a81e11aa6d8b60c4e333e589"
meta-fsl-arm-extra = "HEAD:dd074c47af53948041f6c5671e519fbf815b0980"
meta-toradex-tegra = "HEAD:8a8ea0510f3aba5f9a0949c986eb8639ff41917f"
meta-jetson-tk1   = "HEAD:0569d7a930506c185734097a58e1de219dc66c80"
meta-toradex-bsp-common = "HEAD:77b0c48863b6194628f2ff4c633469bb84f549c3"
meta-linaro-toolchain = "HEAD:9b1fd178309544dff1f7453e796a9437125bc0d9"
meta-oe           
meta-efl          
meta-gpe          
meta-gnome        
meta-xfce         
meta-initramfs    
meta-systemd      
meta-networking   
meta-multimedia   
meta-python       = "HEAD:8ab04afbffb4bc5184cfe0655049de6f44269990"
meta-lxde         = "HEAD:d097882e3859220e9ce0c99250e22f5833233c6e"
meta-browser      = "HEAD:e114d625d4bd23a52cc1108a45d96ffd8dc0ab7f"
meta-qt5          = "master:9aa870eecf6dc7a87678393bd55b97e21033ab48"
meta-fsl-demos    = "HEAD:8bffde8d803dd2362fbded79781ce084d723b048"
meta-toradex-demos = "HEAD:bc692472e86eb646f0f5a78e9dd4fdc70356c50e"
meta              = "HEAD:346b6ef31253789d7d6664a19297b6deec9d27a0"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2831 tasks of which 2560 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
[mas@linuxdev build]$

@sanchayan.tx said:
Please note that meta-qt5 master would not in all probability build with our OE V2.6 out of the box. You can use the existing meta-qt5 layer already integrated in our V2.6 or V2.6.1 and then build meta-toolchain-qt5.


The qtserialbus lib does not exist by default in your existing meta-qt5 layer in the V2.6 or V2.6.1 this meta-qt5 come from branch jethro (qt5.5) and it does not contain the qtserialbus lib for CAN bus.
I need the qt5.6 or qt5.7 libs installed in your V2.6 and then i can make an application for CAN bus using Qt Creator.

@sanchayan.tx said:
For testing CAN, see here. For development purposes, it is recommended to follow the procedure as per here and use kernel build out of OpenEmbedded. Once your changes I finalised, you may integrate them in OE. See an article on this thematic.


It does not matter how to test CAN bus using can-utils in angstrom distro.

I’m asking now, if there is any way to including Qt5.7 libs to your V2.6?

You can try using yocto/poky with our meta-toradex-nxp layer and check if meta-qt5 master branch builds correctly. Some information is available in the following post.

@Zanam I updated the answer above to reflect the solution for your requirement.

Tried to build the image adding ‘qtbase qtbase-plugins cinematicexperience qtserialbus’ to local.conf, I didn’t face any build issues. How is your local.conf looks like?

Build log:

-bash-4.3$ MACHINE=colibri-imx6 bitbake -k angstrom-lxde-image
Loading cache: 100% |#################################################################################################################| ETA:  00:00:00
Loaded 3082 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-23"
TARGET_SYS        = "arm-angstrom-linux-gnueabi"
MACHINE           = "colibri-imx6"
DISTRO            = "angstrom"
DISTRO_VERSION    = "v2015.12"
TUNE_FEATURES     = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU        = "vfp-neon"
meta-angstrom     = "HEAD:7f2eec75fd20b672221ff071d121fa9ea2e1e6ea"
meta-toradex-nxp  = "HEAD:b7fa1ed761c53c2737d8722efca6421607ecfa89"
meta-fsl-arm      = "HEAD:417f669e4dede244a81e11aa6d8b60c4e333e589"
meta-fsl-arm-extra = "HEAD:dd074c47af53948041f6c5671e519fbf815b0980"
meta-toradex-tegra = "HEAD:8a8ea0510f3aba5f9a0949c986eb8639ff41917f"
meta-jetson-tk1   = "HEAD:0569d7a930506c185734097a58e1de219dc66c80"
meta-toradex-bsp-common = "HEAD:77b0c48863b6194628f2ff4c633469bb84f549c3"
meta-linaro-toolchain = "HEAD:9b1fd178309544dff1f7453e796a9437125bc0d9"
meta-oe           
meta-efl          
meta-gpe          
meta-gnome        
meta-xfce         
meta-initramfs    
meta-systemd      
meta-networking   
meta-multimedia   
meta-python       = "HEAD:8ab04afbffb4bc5184cfe0655049de6f44269990"
meta-lxde         = "HEAD:d097882e3859220e9ce0c99250e22f5833233c6e"
meta-browser      = "HEAD:e114d625d4bd23a52cc1108a45d96ffd8dc0ab7f"
meta-qt5          = "master:9aa870eecf6dc7a87678393bd55b97e21033ab48"
meta-fsl-demos    = "HEAD:8bffde8d803dd2362fbded79781ce084d723b048"
meta-toradex-demos = "HEAD:bc692472e86eb646f0f5a78e9dd4fdc70356c50e"
meta              = "HEAD:346b6ef31253789d7d6664a19297b6deec9d27a0"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
....
NOTE: Tasks Summary: Attempted 7380 tasks of which 7374 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory

Summary: There were 1486 WARNING messages shown.

Hi,

@sanchayan.tx

When i try to compile an image then i become this error
Loading cache: 100% |####################################################################################################################################################| ETA: 00:00:00
Loaded 3082 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-16.04"
TARGET_SYS        = "arm-angstrom-linux-gnueabi"
MACHINE           = "colibri-imx6"
DISTRO            = "angstrom"
DISTRO_VERSION    = "v2015.12"
TUNE_FEATURES     = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU        = "vfp-neon"
meta-angstrom     = "HEAD:7f2eec75fd20b672221ff071d121fa9ea2e1e6ea"
meta-toradex-nxp  = "HEAD:b7fa1ed761c53c2737d8722efca6421607ecfa89"
meta-fsl-arm      = "HEAD:417f669e4dede244a81e11aa6d8b60c4e333e589"
meta-fsl-arm-extra = "HEAD:dd074c47af53948041f6c5671e519fbf815b0980"
meta-toradex-tegra = "HEAD:8a8ea0510f3aba5f9a0949c986eb8639ff41917f"
meta-jetson-tk1   = "HEAD:0569d7a930506c185734097a58e1de219dc66c80"
meta-toradex-bsp-common = "HEAD:77b0c48863b6194628f2ff4c633469bb84f549c3"
meta-linaro-toolchain = "HEAD:9b1fd178309544dff1f7453e796a9437125bc0d9"
meta-oe           
meta-efl          
meta-gpe          
meta-gnome        
meta-xfce         
meta-initramfs    
meta-systemd      
meta-networking   
meta-multimedia   
meta-python       = "HEAD:8ab04afbffb4bc5184cfe0655049de6f44269990"
meta-lxde         = "HEAD:d097882e3859220e9ce0c99250e22f5833233c6e"
meta-browser      = "HEAD:e114d625d4bd23a52cc1108a45d96ffd8dc0ab7f"
meta-qt5          = "master:9aa870eecf6dc7a87678393bd55b97e21033ab48"
meta-fsl-demos    = "HEAD:8bffde8d803dd2362fbded79781ce084d723b048"
meta-toradex-demos = "HEAD:bc692472e86eb646f0f5a78e9dd4fdc70356c50e"
meta              = "2.6.1:346b6ef31253789d7d6664a19297b6deec9d27a0"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: oe_runmake failed
ERROR: Function failed: do_compile (log file is located at ../oe-core/build/tmp-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtmultimedia/5.7.0+gitAUTOINC+1be4f74843-r0/temp/log.do_compile.20888)
**ERROR: Logfile of failure stored in: ../build/tmp-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtmultimedia/5.7.0+gitAUTOINC+1be4f74843-r0/temp/log.do_compile.20888

ERROR: /oe-core/build/…/layers/meta-qt5/recipes-qt/qt5/qtmultimedia_git.bb, do_compile) failed with exit code ‘1’**

i used IMAGE_INSTALL_remove = "qtmultimedia" to remove it but it doesn’t work.

@bhuvan.tx

I have add some another Qt5 lib as below:

 IMAGE_INSTALL_append = " qtbase qtbase-plugins cinematicexperience qtserialbus qtserialport qtsensors qtdeclarative qtdeclarative-qmlplugins qtdeclarative-plugins qtmultimedia qtconnectivity qtconnectivity-qmlplugins qtlocation qtwebsockets qtx11extras qtgraphicaleffects qtgraphicaleffects-qmlplugins qttools qtscript qtsvg qtsvg-plugins qtsystems qtsystems-tools qtsystems-qmlplugins qtimageformats qtquickcontrols qtquickcontrols2 qtwayland qtwebengine  xserver-xorg xf86-video-fbdev xf86-input-evdev xserver-xorg-extension-glx mesa-driver-swrast xinit xterm openbox mesa-demos "

If i only try to build meta-toolchain-qt5, the same issue will appear again. Could your help me please?

I assume your image with Qt 5.7 builds fine now. For the toolchain, do you get a build failure with qtmultimedia?

Can you check if removing all qtmultimedia references from here help?

i have built an image with qt5.7 and the toolchain after long battle with it.
i face now more issues with Qt creator after i have configured it.
i upload snapshots from Qt creator
[upload|Bsmqt6oVdCm4Pivopy8rXn1KCzE=][upload|KTJZ2W3yDWPMk9x2U3Py8DC/exk=]

I can’t deploy my applications on Colibri right now.

I think that this solution is not a correct solution. There must be a compatibility between individual parts.
Why your OE VX.X does not support Qt5.7 yet?

Yes it is not a correct solution. We are currently using jethro branch of OpenEmbedded and jethro branch supports 5.5.

When is it supported?

We plan to update to the Morty/Yocto 2.2 release of OpenEmbedded in 2016 Q4. That should support Qt 5.7. See Issue 21226 in Linux BSP roadmap.

Hi, I tried to migrate from 2.6.1 to 2.7 and after building the sdk, I can’t compile code in Qt creator too. I followed this guide How to set up Qt Creator to cross compile for embedded Linux | Toradex Developer Center but for version 2.7 is not working for me.
I was digging around and found out that QMAKE_SPEC is in qmake set to linux-g++ for Qt version 5.7.0 and {path}/oe-core/build/out-glibc/sysroots/x86_64-linux/usr/lib/qt5/mkspecs/linux-oe-g++ for 5.5.1 version. QMAKE_XSPEC is set to linux-g++ for Qt 5.7.0 and linux-oe-g++ for 5.5.1.
When I try to run qmake in command line and set the arguments to be same as in Qt creator but change -spec argument to linux-oe-g++ it generates correct Makefile wich can be compiled and run on the host. Is there a way, how to change the spec argument in Qt creator or where I could make a mistake?

By migration I assume you mean that you use OE synced to V2.7. The Qt mkspec you speak of is documented here. Specifically this note at the end of Add Kit section.

With Qt 5.7 from OpenEmbedded Morty release (BSP version 2.7 Beta1 and later) require Qt mkspec to be set as follows

/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++

Greate thanks, I did not read that note at the end. My mistake