Hello,
I tried to cross compile QT application for Colibri T20 . But unfortunately I ended up with the following errors. I’m unable to sort out these errors. To setup the Oe-core and installation of SDK , I followed this link.
In issues I got this
error: execvp: …/qt-tutorial-01/mainwindow.ui: Permission denied
In General Messages I got this
Failed to set up kit for Qbs: Could not determine whether Qt is a static build.
17:01:58: Starting: “/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qmake2” /home/dev1/Desktop/qt-tutorial-01/qt-tutorial-01.pro -r -spec linux-gnueabi-oe-g++ CONFIG+=debug sh: 1: -d: not found
17:01:58: The process “/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/qmake2” exited normally.
17:01:58: Starting: “/usr/bin/make” …/qt-tutorial-01/mainwindow.ui -o ui_mainwindow.h
Makefile:196: recipe for target ‘ui_mainwindow.h’ failed
make: execvp: …/qt-tutorial-01/mainwindow.ui: Permission denied
make: *** [ui_mainwindow.h] Error 127
17:02:00: The process “/usr/bin/make” exited with code 2.
Error while building/deploying project qt-tutorial-01 (kit: T20)
When executing step “Make”
17:02:00: Elapsed time: 00:02.
You should first resolve the “Permission denied” issue, please verify and if necessary fix access rights for your project files. Please also share you Qt creator Build & Run config (screenshot all tabs with arm/t20 options selected).
I’m unable to resolve this “Permission Denied” issue. I have attached the build and configuration setup screen shots.][1]][1]
Can you compile this project with your computer as a target?
What does ls -la
returns in your project folders?
I could compile the project with my computer as target and I got the executable file. Also I ran the QT application in my development machine. Below I have mentioned the output of the command ls -la.
dev1@dev1-desktop:~/Desktop/qt-tutorial-01/qt-tutorial-01$ ls -la
total 88
drwxrwxr-x 2 dev1 dev1 4096 Dec 2 15:17 .
drwxrwxr-x 6 dev1 dev1 4096 Dec 2 15:12 …
-rwxrwxr-x 1 dev1 dev1 824 Dec 2 15:10 main.cpp
-rwxrwxr-x 1 dev1 dev1 532 Dec 2 15:10 mainwindow.cpp
-rwxrwxr-x 1 dev1 dev1 416 Dec 2 15:10 mainwindow.h
-rwxrwxr-x 1 dev1 dev1 1490 Dec 2 15:10 mainwindow.ui
-rw-rw-r-- 1 dev1 dev1 1293 Dec 2 15:10 popup.h
-rw-rw-r-- 1 dev1 dev1 318 Dec 2 15:10 qt-tutorial-01.pro
-rw-rw-r-- 1 dev1 dev1 36818 Dec 2 15:17 qt-tutorial-01.pro.user
-rw-rw-r-- 1 dev1 dev1 18607 Dec 2 15:11 qt-tutorial-01.pro.user.2.5pre1
Can you upload this project so we can try compiling it?
I have compressed my project for qt and attached it . Please have a look at this. If you can build this project successfully, I would like to know how it happened for you and please attach screen shots of compiled Output. Also I kindly request you to send the build output so that I can check it with colibri if you successfully built this project.
project file
I’ve tried compiling your project, here’s the output:
12:46:39: Running steps for project qt-tutorial-01...
12:46:39: Starting: "/home/dsliwa/toradex/sdk/qt_201612/sysroots/x86_64-angstromsdk-linux/usr/bin/qmake" /home/dsliwa/tmp/qt-tutorial-01/qt-tutorial-01/qt-tutorial-01.pro -r -spec linux-gnueabi-oe-g++ CONFIG+=debug
12:46:39: The process "/home/dsliwa/toradex/sdk/qt_201612/sysroots/x86_64-angstromsdk-linux/usr/bin/qmake" exited normally.
12:46:39: Starting: "/usr/bin/make"
/home/dsliwa/toradex/sdk/qt_201612/sysroots/x86_64-angstromsdk-linux/usr/bin/uic4 ../qt-tutorial-01/mainwindow.ui -o ui_mainwindow.h
arm-angstrom-linux-gnueabi-g++ -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=hard --sysroot=/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -c -pipe -O2 -pipe -g -feliminate-unused-debug-types -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/share/qt4/mkspecs/linux-g++ -I../qt-tutorial-01 -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtCore -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtGui -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4 -I. -I. -I../qt-tutorial-01 -I. -o main.o ../qt-tutorial-01/main.cpp
arm-angstrom-linux-gnueabi-g++ -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=hard --sysroot=/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -c -pipe -O2 -pipe -g -feliminate-unused-debug-types -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/share/qt4/mkspecs/linux-g++ -I../qt-tutorial-01 -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtCore -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtGui -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4 -I. -I. -I../qt-tutorial-01 -I. -o mainwindow.o ../qt-tutorial-01/mainwindow.cpp
/home/dsliwa/toradex/sdk/qt_201612/sysroots/x86_64-angstromsdk-linux/usr/bin/moc4 -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/share/qt4/mkspecs/linux-g++ -I../qt-tutorial-01 -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtCore -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtGui -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4 -I. -I. -I../qt-tutorial-01 -I. ../qt-tutorial-01/mainwindow.h -o moc_mainwindow.cpp
arm-angstrom-linux-gnueabi-g++ -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=hard --sysroot=/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -c -pipe -O2 -pipe -g -feliminate-unused-debug-types -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/share/qt4/mkspecs/linux-g++ -I../qt-tutorial-01 -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtCore -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4/QtGui -I/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/include/qt4 -I. -I. -I../qt-tutorial-01 -I. -o moc_mainwindow.o moc_mainwindow.cpp
arm-angstrom-linux-gnueabi-g++ -mfpu=vfpv3-d16 -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=hard --sysroot=/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-rpath-link,/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib -o qt-tutorial-01 main.o mainwindow.o moc_mainwindow.o -L/home/dsliwa/toradex/sdk/qt_201612/sysroots/armv7at2hf-vfp-angstrom-linux-gnueabi/usr/lib -lQtGui -lEGL -lQtCore -lpthread
12:46:46: The process "/usr/bin/make" exited normally.
12:46:46: Connecting to device...
12:46:47: The remote file system has 683 megabytes of free space, going ahead.
12:46:47: Deploy step finished.
12:46:47: Uploading file "/home/dsliwa/tmp/qt-tutorial-01/build-qt-tutorial-01-qt4_t20_28b1-Debug/qt-tutorial-01"...
12:46:48: All files successfully deployed.
12:46:48: Deploy step finished.
12:46:48: Elapsed time: 00:09.
I’ve created T20 image and sdk with this commands:
repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImageV2.7-next
repo sync
source ./export
bitbake angstrom-qt-x11-image
bitbake -k meta-toolchain-qt
Then I installed the sdk, sourced the environment file and started qtcreator (make sure you’re using the same environment for qtcreator, you should run it from the console that you’ve sourced environment in)
Here’s my qtcreator (version 4.2.2) config:
[upload|faQXzcUADN0g2itH1tUL7Jr8y+Q=]
[upload|1iX+PeQY2TEMXse+vrciCqH2H3A=]
[upload|qhkg2/AayV14zgvD/a1UfstoLn4=]
[upload|9SmkVyoceLGWPULQXIWT6NmzaPk=]
Quick tip, you can add:
target.path = /root
INSTALLS += target
to you .pro file if you want qtcreator to automatically deploy your application (you also need to configure your device in qtcreator see Tools->Options->Devices)
Thank you . Now I could run my application on COlibri T20 board. But I’m unable to compile the software using qtcreator and I could compile it in terminal by doing some changes in makefile. In the make file that was generated using qtcreator kit, the GCC, GCCXX, debugger and linkers were set for the X86 machine even though I manually organized the kit for colibri T20 using corresponding tool-chains.
Kit compiler config is not being properly used by qtcreator currently. You’re having issues because you’re not running qtcreator with a proper environment. You have to source the environment and then run qtcreator in the same console.
Thanks for your support. I forgot to choose the path for qt mkspec. This was the issue and after giving the exact path for the qt mkspec , I could cross compile my application on qtcreator without modifying the make file.