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. Making my yocto image able to compile my qt project

Making my yocto image able to compile my qt project

Scheduled Pinned Locked Moved Solved Mobile and Embedded
yoctoimx8embedded qt
19 Posts 3 Posters 4.7k Views
  • 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.
  • P Pablo J. Rogina
    5 Oct 2020, 12:42

    @kmarconi said in Making my yocto image able to compile my qt project:

    I successfully integrated my app in my yocto build

    Great! so could you mark this post as solved then?

    K Offline
    K Offline
    kmarconi
    wrote on 5 Oct 2020, 14:05 last edited by kmarconi 10 May 2020, 14:57
    #7

    @Pablo-J-Rogina Was about to do it but I got a last question if it's possible. I would like to know the way to include image files like png or svg in my recipe ? For the moment, i'm doing it with the SRC_URI += instruction but on the embedded side, there is none of the file I would like to find. I'm I doing it wrong ?

    Edit : Adding FILE_${PN} += "path to my directory" seems to be the way

    P 1 Reply Last reply 5 Oct 2020, 16:45
    0
    • K kmarconi
      5 Oct 2020, 14:05

      @Pablo-J-Rogina Was about to do it but I got a last question if it's possible. I would like to know the way to include image files like png or svg in my recipe ? For the moment, i'm doing it with the SRC_URI += instruction but on the embedded side, there is none of the file I would like to find. I'm I doing it wrong ?

      Edit : Adding FILE_${PN} += "path to my directory" seems to be the way

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 5 Oct 2020, 16:45 last edited by
      #8

      @kmarconi said in Making my yocto image able to compile my qt project:

      I would like to know the way to include image files like png or svg in my recipe ?

      I cannot help with Yocto recipes to "bake" those files into the image, but another approach is to add those images into the Qt resource system, making them part of your app executable

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      K 1 Reply Last reply 6 Oct 2020, 10:06
      0
      • P Pablo J. Rogina
        5 Oct 2020, 16:45

        @kmarconi said in Making my yocto image able to compile my qt project:

        I would like to know the way to include image files like png or svg in my recipe ?

        I cannot help with Yocto recipes to "bake" those files into the image, but another approach is to add those images into the Qt resource system, making them part of your app executable

        K Offline
        K Offline
        kmarconi
        wrote on 6 Oct 2020, 10:06 last edited by kmarconi 10 Jun 2020, 12:53
        #9

        @Pablo-J-Rogina I successfully added them to my yocto image, thanks. The thing is that I don't know how to tell my app in the yocto part where to look for these files. In fact, in Qt creator, my app knows that by reading my qrc files and by using "qrc:/...." paths, it will be able to use any kind of files listed in these qrc files. But on the yocto side, I'm not sure that the binary of my app is able to find all these paths. The thing which is telling me this is that I always have this error on my yocto image when i launch the app :

        QQmlCOmponent : Component is not ready
        qml : actionView test for Vid? is null
        QQmlComponent : Component is not ready
        qml : action imageTest for Image is null
        qt.qpa.xcb : xcb_shm_create_segment() failed for size 1228800
        Segmentation fault

        Is there a specific way to tell yocto or qt where to find the files he needs on the yocto side ? Thanks .

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 6 Oct 2020, 18:03 last edited by
          #10

          Is this coming from your own files ?
          Does your image contain all the QtQuick stuff you are using ?

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

          K 1 Reply Last reply 7 Oct 2020, 07:31
          0
          • S SGaist
            6 Oct 2020, 18:03

            Is this coming from your own files ?
            Does your image contain all the QtQuick stuff you are using ?

            K Offline
            K Offline
            kmarconi
            wrote on 7 Oct 2020, 07:31 last edited by kmarconi 10 Jul 2020, 12:31
            #11

            @SGaist What do you mean by your own files ? If it's about the qml : action error, yes I think it's from my files. In fact, I have an action called imageTest, and it requires a file which is registered in my qrc files and the way to get it is by using the qrc path ("qrc:/myfile.png"). I think that the qml is not able to use this qrc path on the yocto image side and that's why it is saying that the Component is not ready. ( correct me if I'm wrong)

            And about QtQuick, do you have a list of all the qtquick package that we can install ?For the moment, I have included qtquicontrols2 in my recipe with qtquickcontrols2 and qtquickcontrols2-mkspecs in my RDEPENDS flag.

            Thanks again !

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kmarconi
              wrote on 7 Oct 2020, 14:37 last edited by
              #12

              Adding qtquickcontrols2-qmlplugins to my recipe didn't changed anything (don't know if this information matters to you)

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 7 Oct 2020, 18:33 last edited by
                #13

                No I don't have such a list.

                What I would do is to check that you build all the Qt modules that are related to your QT += entries.

                qrc paths should just work because these files are built in your executable.

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

                K 1 Reply Last reply 8 Oct 2020, 05:39
                0
                • S SGaist
                  7 Oct 2020, 18:33

                  No I don't have such a list.

                  What I would do is to check that you build all the Qt modules that are related to your QT += entries.

                  qrc paths should just work because these files are built in your executable.

                  K Offline
                  K Offline
                  kmarconi
                  wrote on 8 Oct 2020, 05:39 last edited by kmarconi 10 Aug 2020, 08:11
                  #14

                  @SGaist Thanks for your support again,will try it out today and then come back here asap

                  Edit : I'm using QT += qml quick gui in my .pro, what should I include on the yocto side ? (more than what I actually have in my DEPENDS : qtbase qtdeclarative qtquickcontrols2) . Also, here is my RDEPENDS :
                  RDEPENDS_${PN} += "
                  qtvirtualkeyboard
                  gstreamer1.0-plugins-base
                  gstreamer1.0-plugins-good
                  qtquickcontrols2
                  qtquickcontrols2-mkspecs
                  qtquickcontrols2-qmlplugins
                  "

                  Thanks !

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kmarconi
                    wrote on 8 Oct 2020, 08:56 last edited by kmarconi 10 Aug 2020, 12:34
                    #15

                    EDIT: Problem is solved, I was missing the qtmultimedia package. Now I have this error (hope to be the last one : QML Image : Cannot open : qrc:/image/test.jpg) whereas I have the qrc file which include this jpg file ...

                    EDIT(2) : All my files are now well found by the app, it was a problem of relative path. Now I need to fix the : qt.qpa.xcb : xcb_shm_create_segment() failed for size 1228800 error and it will finally run I wish...

                    After running gdb on my apps, it seems to be a problem linked with Qt and OpenGL ( I have the segmentation fault coming from : QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5)

                    P 1 Reply Last reply 8 Oct 2020, 15:03
                    1
                    • K kmarconi
                      8 Oct 2020, 08:56

                      EDIT: Problem is solved, I was missing the qtmultimedia package. Now I have this error (hope to be the last one : QML Image : Cannot open : qrc:/image/test.jpg) whereas I have the qrc file which include this jpg file ...

                      EDIT(2) : All my files are now well found by the app, it was a problem of relative path. Now I need to fix the : qt.qpa.xcb : xcb_shm_create_segment() failed for size 1228800 error and it will finally run I wish...

                      After running gdb on my apps, it seems to be a problem linked with Qt and OpenGL ( I have the segmentation fault coming from : QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5)

                      P Offline
                      P Offline
                      Pablo J. Rogina
                      wrote on 8 Oct 2020, 15:03 last edited by
                      #16

                      @kmarconi said in Making my yocto image able to compile my qt project:

                      QML Image : Cannot open : qrc:/image/test.jpg

                      Could it be possible your yocto image is missing the Qt Image plugins?
                      You should deploy the JPG plugin at least to your device from the <Qt_installation_folder>/plugins/imageformats folder

                      Upvote the answer(s) that helped you solve the issue
                      Use "Topic Tools" button to mark your post as Solved
                      Add screenshots via postimage.org
                      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kmarconi
                        wrote on 8 Oct 2020, 15:04 last edited by kmarconi 10 Aug 2020, 15:05
                        #17

                        Hi, thanks for your reply . Yeah I was missing the Qtmultimedia package but also some my path in my qrc files were wrong.

                        I'm now working on the segmentation fault : qt.qpa.xcb : xcb_shm_create_segment() failed for size 1228800 which I have everytime I launch my app ... As I said in my earlier message, after running gdb on my apps, it seems to be a problem linked with Qt and OpenGL ( I have the segmentation fault coming from : QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5)

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 8 Oct 2020, 18:19 last edited by
                          #18

                          Is there anything in your Yocto recipe to manage the OpenGL setup of your device ?

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

                          K 1 Reply Last reply 9 Oct 2020, 05:47
                          0
                          • S SGaist
                            8 Oct 2020, 18:19

                            Is there anything in your Yocto recipe to manage the OpenGL setup of your device ?

                            K Offline
                            K Offline
                            kmarconi
                            wrote on 9 Oct 2020, 05:47 last edited by kmarconi 10 Sept 2020, 09:34
                            #19

                            @SGaist I don't think so but in the meantime I don't see any package which could do it. My board support OpenGl ES2 so I tried some stuff like adding "PACKAGE CONFIG += "gles2" " to my qtbase bb file but nothing has changed ...

                            Also tried to add PACKAGECONFIG_append_pn-qtbase = "gles2" in my local.conf but no change.

                            After some googling, I found that the error was printed by this code : https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/xcb/qxcbbackingstore.cpp?h=dev (line 371)

                            Edit: Closing this issue, it was a problem of platform (by default it was using x11 which is not the one used by my embedded device) . Thanks a lot for your help again !

                            1 Reply Last reply
                            1

                            16/19

                            8 Oct 2020, 15:03

                            • Login

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