Setting up the qt creator to build for I.MX6 Sabre SDB :-
*My yocto build PC0 setup:-
> Yocto build version: 4.1.15-2.0.1 with Bitbake Image type: fsl-image-qt5
> for qt toolcahin : bitbake meta-toolchain-qt5
> after this fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.0.1.sh got generated successfully.
*my Qt Development PC1:-
HostPC : Ubuntu 16.04LTS
> Qt5 tool-chain sh file copied from PC0 to PC1 and executed the fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.0.1.sh
> following link:Setting up Qt Creator to build for i.MX6
QtCreator: http://www.qt.io/download-open-source/ as recommended
#Compiler Path: /opt/fsl-imx-xwayland/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
#qmake: /opt/fsl-imx-xwayland/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake
Error:
Don't know what is wrong, please help on this, its very important for me.
please anyone can give solution for this, waiting for your reply.
Thanks & Regards
-Anil
Hello Anil Kumar and Do Nam,
I’ve replicated this issue. I tried adding the path to the sysroot on the .pro file of the QtCreator proyect:
QMAKE_LFLAGS=--sysroot=/opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi
Which manages to find the libraries, but I’m seeing a compatibility error. Perhaps you can try this and let me know the outcome?
Regards,
Hello Anil Kumar and Do Nam,
Updating this thread, the QMAKE_LFLAGS does points to the correct libraries. However, the root cause of this issue is that the architecture is not matching the libraries, which seemed odd.
If you look at the Makefile created by qmake it was not using the correct toolchain.
The way to give qmake the right parameters to build is by using a qmake configuration file. You would need to add the linux-arm-gnueabi-g++ spec on:
/opt/<DISTRO>/<VERSION>/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/
You should have several specs. On this same folder create the linux-arm-gnueabi-g++ spec folder and create the qmake.conf and qplatformdefs.h:
/opt/<DISTRO>/<VERSION>/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/ linux-arm-gnueabi-g++/qmake.conf
/opt/<DISTRO>/<VERSION>/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/ linux-arm-gnueabi-g++/qplatformdefs.h
I have attached the format of both. You may leave the gplatformdefs.h untouched and just edit qmake.conf so it has the right path for the sysroot on your system.
Then on the Kits settings under Qt mkspec you would need to write: linux-arm-poky-gnueabi-g++.
After setting all this up please make a clean and then run qmake and build again. It should be able to find the right libraries now.
Regards,
HI Gusarambula,
It still didn't work! :smileysad:
I did post in this topic:
Building Qt applications for i.MX6QPhttps://community.nxp.com/thread/444316#comment-879125
HI Gusarambula,
Thanks for your valuable inputs and its helps a lot.
Regards
-Anil