install qcharts module to yocto sdk
-
I try to cross-compile qt chart example for a yocto platform. I do following steps to compile my qt programs:
- source /opt/myimage/2.1.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
- qmake -o Makefile areachart.pro
- make
But When I add
QT += chartsto any project run qmake likeqmake -o Makefile areachart.proI hit this error:Project ERROR: Unknown module(s) in QT: chartsHere is the output of
qmake -v:QMake version 3.0 Using Qt version 5.7.0 in /opt/myimage/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/libShould I should add
qtchartsmodule my yocto SDK to be able to compile the example? if yes how?For some reasons I was able to cross-compiled Qt from source using
qtcreatorand get the binary files for qt examples and qtchart library itself. I aslo run the qt examples on my target platform by putting resultinglibQtCharts.soand other files manually in/usr/lib/and/usr/include/on the target and I was able to draw the charts on target.However, what I need is to include the charts in my project and run
qmakesteps as mentioned above. But what I get is theProject ERROR: Unknown module(s) in QT: charts
I have tried to putlibQtCharts.sowhich I got from compiling qt source manually in/opt/myimage/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/libbut still not able to get the make file withqmake -o Makefile areachart.proAnother thing that I cannot understand is that why I can cross-compile qtchart from source by openning it in qtcreator and pressing build button but I am not able to do the same with
qmake -o Makefile qtchart.proandmake -
I try to cross-compile qt chart example for a yocto platform. I do following steps to compile my qt programs:
- source /opt/myimage/2.1.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
- qmake -o Makefile areachart.pro
- make
But When I add
QT += chartsto any project run qmake likeqmake -o Makefile areachart.proI hit this error:Project ERROR: Unknown module(s) in QT: chartsHere is the output of
qmake -v:QMake version 3.0 Using Qt version 5.7.0 in /opt/myimage/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/libShould I should add
qtchartsmodule my yocto SDK to be able to compile the example? if yes how?For some reasons I was able to cross-compiled Qt from source using
qtcreatorand get the binary files for qt examples and qtchart library itself. I aslo run the qt examples on my target platform by putting resultinglibQtCharts.soand other files manually in/usr/lib/and/usr/include/on the target and I was able to draw the charts on target.However, what I need is to include the charts in my project and run
qmakesteps as mentioned above. But what I get is theProject ERROR: Unknown module(s) in QT: charts
I have tried to putlibQtCharts.sowhich I got from compiling qt source manually in/opt/myimage/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/libbut still not able to get the make file withqmake -o Makefile areachart.proAnother thing that I cannot understand is that why I can cross-compile qtchart from source by openning it in qtcreator and pressing build button but I am not able to do the same with
qmake -o Makefile qtchart.proandmake@pehi said in install qcharts module to yocto sdk:
qmake -o Makefile qtchart.pro
This will most probably call qmake from your Linux distribution Qt, not your cross compiled one.
Use full path to your cross compiled qmake.Also the error message you wanted to post isn't visibla (sharing images in this forum often doesn't work).
-
@jsulm thanks for reply.
This will most probably call qmake from your Linux distribution Qt, not your cross compiled one.
Use full path to your cross compiled qmake.But since I have sourced the
environment-setup-cortexa9hf-neon-poky-linux-gnueabiscript it should be the correct qmake. I have compile the project for my targe with the same qmake successfully but when I addchartsmodule to my .pro file the qmake cannot detect it. Bye the way I have tried to find other qmake binary files on my machine and I found one which is a qmake binary file for the target platform and obviously it cannot be executed from my development machine. so if I run it
cd /opt/myimage/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/bin/qt5/.debug/$
./qmake -vand I get this error:
-bash: ./qmake: cannot execute binary file: Exec format errorAlso the error message you wanted to post isn't visibla (sharing images in this forum often doesn't work).
thanks for reminding, I have updated it it was actually a text in a wrong format that has been hidden.
-
@jsulm thanks for reply.
This will most probably call qmake from your Linux distribution Qt, not your cross compiled one.
Use full path to your cross compiled qmake.But since I have sourced the
environment-setup-cortexa9hf-neon-poky-linux-gnueabiscript it should be the correct qmake. I have compile the project for my targe with the same qmake successfully but when I addchartsmodule to my .pro file the qmake cannot detect it. Bye the way I have tried to find other qmake binary files on my machine and I found one which is a qmake binary file for the target platform and obviously it cannot be executed from my development machine. so if I run it
cd /opt/myimage/2.1.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/bin/qt5/.debug/$
./qmake -vand I get this error:
-bash: ./qmake: cannot execute binary file: Exec format errorAlso the error message you wanted to post isn't visibla (sharing images in this forum often doesn't work).
thanks for reminding, I have updated it it was actually a text in a wrong format that has been hidden.
@pehi said in install qcharts module to yocto sdk:
-bash: ./qmake: cannot execute binary file: Exec format error
Looks like this qmake was built for your target hardware and not the host machine.
You can check this:file qmakeIf you cross compiled Qt you should have a qmake for it which was built for x86.
-
@pehi said in install qcharts module to yocto sdk:
-bash: ./qmake: cannot execute binary file: Exec format error
Looks like this qmake was built for your target hardware and not the host machine.
You can check this:file qmakeIf you cross compiled Qt you should have a qmake for it which was built for x86.
Looks like this qmake was built for your target hardware and not the host machine.
You can check this:file qmakeIf you cross compiled Qt you should have a qmake for it which was built for x86.
Yes, correct . I am able to cross compile my application with this qmake:
/opt/myimage/2.1.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmakeBut it fails to recognize the qchart module when I add a qchart to my project .pro file and so strange that I can cross-compile qtchart from source with qtcreator but not able to do so with for my own project.
additionally can doqmakeon qtchart source code but when I runmakeit fails with error:BEGIN failed--compilation aborted at /opt/myimage/2.1.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/syncqt.pl line 55 Project ERROR: Failed to run: perl -w /opt/myimage/2.1.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/syncqt.pl -module QtCharts -version 5.7.1 -outdir /home/pehen/prg/qtcharts /home/pehen/prg/qtcharts -
I have found the problem finally. I need to add this qtchart module to the meta-toolchain sdk in
following file: <meta-qt5> /recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb here is the patch for it also:
https://patchwork.openembedded.org/patch/147962/then I build the sdk by
bitbake meta-toolchain-qt
and reinstall by:
rm -rf /opt/myimage/
and executing this scripts:
poky/build/tmp/deploy/sdk/myimage-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain.sh
So now I do have a new/opt/myimageand I can runqmakeon .pro file with aQT += chartsmodule.