Build app for yocto 2.1 with Qt 5.6
-
Hi,
I build console Qt simple to printf "Hello" but it error.18:52:07: Running steps for project untitled4... 18:52:07: Configuration unchanged, skipping qmake step. 18:52:07: Starting: "/usr/bin/make" g++ -o untitled4 main.o -lQt5Core -lpthread /usr/bin/ld: cannot find -lQt5Core Makefile:201: recipe for target 'untitled4' failed collect2: error: ld returned 1 exit status make: *** [untitled4] Error 1 18:52:07: The process "/usr/bin/make" exited with code 2. Error while building/deploying project untitled4 (kit: Beaglebone) When executing step "Make" 18:52:07: Elapsed time: 00:00.So i add
QMAKE_LFLAGS=--sysroot=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabion my pro file app, till error18:53:40: Running steps for project untitled4... 18:53:40: Configuration unchanged, skipping qmake step. 18:53:40: Starting: "/usr/bin/make" g++ --sysroot=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi -o untitled4 main.o -lQt5Core -lpthread /usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/../lib/libQt5Core.so when searching for -lQt5Core /usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core /usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core /usr/bin/ld: cannot find -lQt5Core Makefile:201: recipe for target 'untitled4' failed collect2: error: ld returned 1 exit status make: *** [untitled4] Error 1 18:53:40: The process "/usr/bin/make" exited with code 2. Error while building/deploying project untitled4 (kit: Beaglebone) When executing step "Make" 18:53:40: Elapsed time: 00:00.Please, help me out. Thanks !
-
Hi,
It looks like you are building with a desktop compiler while trying to link with your yocto based Qt.
Are you sure your kit is setup correctly ?
-
Hi, thanks for rep.
I am sure my kit is correct. !This is my configure.
QtCreator configuration
I did update qtcreator.sh to set the env variable required for cross compilation
Sysyroot: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux@
Compiler: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ @
QtVersion: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake@(qt 5.6.2).
Debug: @/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb@ -
Does it work properly if you do it from the command line ?
-
Except that by calling just
qmakelike that you are likely calling your distribution installed and not your poky builtqmake. You should use the full path to ensure which one is used. -
What do you mean by I don't see nothing ? Did you call
makeafter callingqmake? -
Hi SGaist, thanks for rep.
Now I can build console Qt app and run it on my beaglebone, but when i build Qt Gui app using terminal and run on my bbb, the error @QXcbConnection: Could not connect to display
Aborted@.I google and trying @export DISPLAY:=0@ but dont work.
-
Silly question but do you have an X server running on your BBB ?
-
Hi,
I dont have x server, i just build yocto for beagbone with the image qt5-image on meta-bbb on github. On local.conf i have add these package openssh with dropbear. -
If you want a GUI but don't have an X server for whatever reason, you should build one of the other backends of Qt.
-
Hi @jsulm , @SGaist , thanks for rep !
I google and found how to run my qt app gui, when i run like this @./hello -platform linuxfb@ my app run ok ! Now i can run my Gui app, so i know my yocto and sdk ok, but why i add sysroot and sdk into QtCrator dont work. I dont know i doing wrong or enviroment variable misssing ?
I have a question, what exactly x server, frame-buffer in here ? Thanks ! -
Hi @jsulm , @SGaist , thanks for rep !
I google and found how to run my qt app gui, when i run like this @./hello -platform linuxfb@ my app run ok ! Now i can run my Gui app, so i know my yocto and sdk ok, but why i add sysroot and sdk into QtCrator dont work. I dont know i doing wrong or enviroment variable misssing ?
I have a question, what exactly x server, frame-buffer in here ? Thanks ! -
Hi, @jsulm , my prolem on top. !
Hi,
I build console Qt simple to printf "Hello" but it error.18:52:07: Running steps for project untitled4...
18:52:07: Configuration unchanged, skipping qmake step.
18:52:07: Starting: "/usr/bin/make"
g++ -o untitled4 main.o -lQt5Core -lpthread
/usr/bin/ld: cannot find -lQt5Core
Makefile:201: recipe for target 'untitled4' failed
collect2: error: ld returned 1 exit status
make: *** [untitled4] Error 1
18:52:07: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled4 (kit: Beaglebone)
When executing step "Make"
18:52:07: Elapsed time: 00:00.So i add QMAKE_LFLAGS=--sysroot=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi on my pro file app, till error
18:53:40: Running steps for project untitled4...
18:53:40: Configuration unchanged, skipping qmake step.
18:53:40: Starting: "/usr/bin/make"
g++ --sysroot=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi -o untitled4 main.o -lQt5Core -lpthread
/usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/../lib/libQt5Core.so when searching for -lQt5Core
/usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core
/usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core
/usr/bin/ld: cannot find -lQt5Core
Makefile:201: recipe for target 'untitled4' failed
collect2: error: ld returned 1 exit status
make: *** [untitled4] Error 1
18:53:40: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled4 (kit: Beaglebone)
When executing step "Make"
18:53:40: Elapsed time: 00:00. -
Hi, @jsulm , my prolem on top. !
Hi,
I build console Qt simple to printf "Hello" but it error.18:52:07: Running steps for project untitled4...
18:52:07: Configuration unchanged, skipping qmake step.
18:52:07: Starting: "/usr/bin/make"
g++ -o untitled4 main.o -lQt5Core -lpthread
/usr/bin/ld: cannot find -lQt5Core
Makefile:201: recipe for target 'untitled4' failed
collect2: error: ld returned 1 exit status
make: *** [untitled4] Error 1
18:52:07: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled4 (kit: Beaglebone)
When executing step "Make"
18:52:07: Elapsed time: 00:00.So i add QMAKE_LFLAGS=--sysroot=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi on my pro file app, till error
18:53:40: Running steps for project untitled4...
18:53:40: Configuration unchanged, skipping qmake step.
18:53:40: Starting: "/usr/bin/make"
g++ --sysroot=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi -o untitled4 main.o -lQt5Core -lpthread
/usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/../lib/libQt5Core.so when searching for -lQt5Core
/usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core
/usr/bin/ld: skipping incompatible /opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core
/usr/bin/ld: cannot find -lQt5Core
Makefile:201: recipe for target 'untitled4' failed
collect2: error: ld returned 1 exit status
make: *** [untitled4] Error 1
18:53:40: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled4 (kit: Beaglebone)
When executing step "Make"
18:53:40: Elapsed time: 00:00. -
I am facing a similar problem.
I've setup my Kit like this:

file:///home/lcmscheid/Documents/yocto/Selection_005.png
file:///home/lcmscheid/Documents/yocto/Selection_006.png
file:///home/lcmscheid/Documents/yocto/Selection_007.pngSo, when I build the program, I have the error. Seems that it is running the host g++ compiler and not the one that has been set in the kit. How could I fix this?
Thanks.
file:///home/lcmscheid/Documents/yocto/Selection_008.png