How to compile qt application for colibri IMX6

Hi, I have built a qt console application on Ubuntu 16.04.

Now I want to compile my project for Colibri iMX6DL but every article I have read till now they linked me to qt device creation and build2qt but when follow those direction I got nothing, there is no qt for device creation or something on Online installer or any direction to how to compile from my qt for iMX6DL.

how can I compile and run my project on this module?

1 Like

HI @ara_tz and Welcome to the Toradex Community!

Please check our Developer Article about Setting up Qt creator cross compilation. To run your application on the module, you need to build a custom image with Qt Support.

Best regards,
Jaski

I already read this Article, what is “Qt for device creation” and how to install it? this article refers to qt online installer Downloading page to install “Qt for device creation”, after downloading online installer and executing, there is no option for “Qt for device creation”? how can I Install it when there is no Option?

Hi @ara_tz

what is “Qt for device creation” and how to install it?

Qt for Device Creation is called Boot2Qt by the Qt Company. You can install the image from here.

this article refers to qt online installer Downloading page to install “Qt for device creation”, after downloading online installer and executing, there is no option for “Qt for device creation”?

The device creation has to be done in QtCreator. Did you install this software?

how can I Install it when there is no Option?

What exactly do you want to install and on which device?

Best regards,
Jaski

thank you for answering, I have created a project on my ubuntu 16.04-64bit, all I want is to cross compile my project for iMX6DL, boot2qt is an image for iMX6DL right?
How can I cross compile my project on My computer?

The device creation has to be done in QtCreator. Did you install this software?

how should I do that?? there is no clear way for doing this! all articles and references I saw are confusing and directing me to some links which are different things from the article!

what is the step by step, clear, and simple way to do what I want?

You are welcome.

Yes, boot2qt is an image.

For cross compilation, I would suggest to build the qt5 image with corresponding SDK. Once you build the SDK, you can install the SDK on your host and cross compile your Qt Application.

Best regards,
Jaski

thank you! I’ll test it.

hi again jaski, I did the things described in oe-core and the SDK after a lot of time for downloading and compiling, with the local.conf changes as following:

 1. MACHINE ?= "colibri-imx6"
 2. PREFERRED_PROVIDER_psplash-support = "psplash-angstrom"

IMAGE_INSTALL_append = " qt3d qt5-plugin-generic-vboxtouch qtbase qtcanvas3d qtcharts qtconnectivity qtdatavis3d qtdeclarative qtenginio qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquick1 qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit-examples qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver sqlite "
PACKAGECONFIG_append_pn-qtbase = " sql-sqlite"

and after those configuration, compiling with:

bitbake image-name -c populate_sdk

and running :

cd ../deploy/sdk/
./angstrom-glibc-x86_64-armv7at2hf-neon-v2016.12-toolchain.sh

the final resualt, there is no qmake in the following address:

/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/

Hi @ara_tz

Which image did you build?

I used this command: bitbake console-tdx-image -c populate_sdk

Hi

You need to add inherit populate_sdk populate_sdk_qt5 in the console-tdx-image recipe as explained here.

Best regards,
Jaski

Thank you jaski, I was able to make SDK with qmake with your help, but now when I want to compile any of my projects, it has errors.
a simple prject which prints “Hi” has the following error:

and in tools->options->Kits , there is a problem with my kit the error is:

Mkspec Not found for Qt version

Hi

Perfect that you created the SDK.
For Mkspec, please have a look here.

Best regards,
Jaski

thank you again for your help jaski. on the link you gave to me, he mentioned Qt version 4.9.0, but when I got to “Index of /archive/qt” there is no version 4.9 in Qt archive…

so what do I do now?

Actually you should install the newest QT creator. The QT creator coming with Ubuntu 16.04 is too old.

Best regards,
Jaski

I have Qt creator 5.3.1 & 4.11.0 which based on Qt 5.14.0, but I have problem with both of them…

have you deleted any old version of QtCreator?

no I didn’t delete any version, I just installed Qt 5.14.0 from it’s offline installer.

I am able to compile my project with qmake, so thank you jaski for your help.

and the issue with mkspec? is it solved?