Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Build app for yocto 2.1 with Qt 5.6

Build app for yocto 2.1 with Qt 5.6

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
21 Posts 4 Posters 9.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fanning
    wrote on last edited by
    #3

    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@

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Does it work properly if you do it from the command line ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      0
      • SGaistS SGaist

        Does it work properly if you do it from the command line ?

        F Offline
        F Offline
        Fanning
        wrote on last edited by
        #5

        @SGaist
        Thanks for rep !
        When i try run @qmake -project@ on terminal, i dont see everything. So i @ctl + c@ to end this command

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #6

          Except that by calling just qmake like that you are likely calling your distribution installed and not your poky built qmake. You should use the full path to ensure which one is used.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • F Offline
            F Offline
            Fanning
            wrote on last edited by Fanning
            #7

            Thanks for rep !

            I go to qmake path in /opt/poky/2.1.1/.../qt5/qmake but like the same, the command run but dont see notthing, It like i run a qt app on terrminal and end it using @crl+C@

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              What do you mean by I don't see nothing ? Did you call make after calling qmake ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Fanning
                wrote on last edited by Fanning
                #9

                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.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Silly question but do you have an X server running on your BBB ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    Fanning
                    wrote on last edited by
                    #11

                    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.

                    jsulmJ 1 Reply Last reply
                    0
                    • F Fanning

                      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.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @Fanning Without X server or frame-buffer you cannot execute GUI applications at all (not only Qt applications).

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        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.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          Fanning
                          wrote on last edited by
                          #14

                          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 !

                          jsulmJ 1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            The frame buffer is the device that you write into to get something on the screen.

                            For the X server see here.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • F Fanning

                              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 !

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #16

                              @Fanning If you have problems with sysroot/SDK in QtCreator then you should say what problems exactly. Else it is not possible to help you.

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • F Offline
                                F Offline
                                Fanning
                                wrote on last edited by
                                #17

                                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.

                                jsulmJ 1 Reply Last reply
                                0
                                • F Fanning

                                  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.

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #18

                                  @Fanning You're not using your ARM compiler.
                                  g++ -o untitled4 main.o -lQt5Core -lpthread
                                  g++ is your host compiler.
                                  Check the Kit you're using - especially the compiler.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • L Offline
                                    L Offline
                                    lcmscheid
                                    wrote on last edited by
                                    #19

                                    Hi @SGaist and @jsulm

                                    I am facing a similar problem.

                                    I've setup my Kit like this:
                                    0_1479386305532_upload-ac729de1-f0cb-4e93-ba3f-9052cc8b8fa1

                                    0_1479386337351_upload-c1ac4c0a-7203-4520-b15d-a5a62393a279 file:///home/lcmscheid/Documents/yocto/Selection_005.png

                                    0_1479386359735_upload-88a0bf12-3286-443f-8ad8-84e3a7fb5fe7 file:///home/lcmscheid/Documents/yocto/Selection_006.png

                                    0_1479386374891_upload-ada78920-769a-47c5-85be-ec1e1e61fb4f file:///home/lcmscheid/Documents/yocto/Selection_007.png

                                    So, 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.

                                    1 Reply Last reply
                                    0
                                    • L Offline
                                      L Offline
                                      lcmscheid
                                      wrote on last edited by
                                      #20

                                      The compiler output :

                                      0_1479386583125_upload-6a299a7e-c86c-441d-b6fa-91f4d5af9a6b file:///home/lcmscheid/Documents/yocto/Selection_008.png

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • L lcmscheid

                                        The compiler output :

                                        0_1479386583125_upload-6a299a7e-c86c-441d-b6fa-91f4d5af9a6b file:///home/lcmscheid/Documents/yocto/Selection_008.png

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #21

                                        @lcmscheid Please upload the picture to some web space and post links here. Attaching pictures here usually doesn't work.

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        0

                                        • Login

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Users
                                        • Groups
                                        • Search
                                        • Get Qt Extensions
                                        • Unsolved