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. How to compile QT-GUI project with Yocto build
Servers for Qt installer are currently down

How to compile QT-GUI project with Yocto build

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 4.5k 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.
  • R Offline
    R Offline
    rmkmani1001
    wrote on last edited by
    #1

    Hi all,
    I'm new to Qt5 and Yocto build..
    I have done couple search and exercise I have successfully build my yocto image for "Licheepi Nano" board.
    I have done so far:
    a. I have build "core-image-minimal"
    b. I have build "core-image-sato"
    c. I have build "qt5-image"

    Additionally..
    I have compile c file (hello_world.c).
    I have compile Qt based application (myqtapp - which contain  myQTApp.cpp and myQTApp.pro)
    by got help from this video link : https://www.youtube.com/watch?v=2HyUCWOQhr8
    

    Now I'm developed QT-GUI application which contain couple files (myTree.pro, main.cpp, mainwindow.cpp, mainwindow.h, mainwindow.ui), please guide me, what are the updated will be there in
    a. bblayer.conf,
    b. local.conf
    c. mytree_0.1.bb
    and any other files...

    Note: my application name is "myTree".

    Please guide me.. I have struct from last couple week..

    thanks in advance..

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

      Hi and welcome to devnet,

      This stack overflow answer might help you get going.

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

      R 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        This stack overflow answer might help you get going.

        R Offline
        R Offline
        rmkmani1001
        wrote on last edited by
        #3

        @SGaist thanks for your quick reply..
        The one work for non-graphical or non-wedget application..
        I have tried this method with my QT-GUI application .. but it result in error.. not able to compile..

        Sorry.. Please guide me how to move forward..

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

          Which error would that be ?
          If you can build the application from the command line it means that your project is defined correctly. If you have an error in yocto it means you likely did not include one or more modules that are required for your application.

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

          R 1 Reply Last reply
          0
          • SGaistS SGaist

            Which error would that be ?
            If you can build the application from the command line it means that your project is defined correctly. If you have an error in yocto it means you likely did not include one or more modules that are required for your application.

            R Offline
            R Offline
            rmkmani1001
            wrote on last edited by
            #5

            @SGaist thanks for your guidance..
            I have result in this error

            ERROR: mytree-0.1-r0 do_configure: Execution of '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/run.do_configure.663829' failed with exit code 2
            ERROR: Logfile of failure stored in: /home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/log.do_configure.663829
            Log data follows:
            | DEBUG: Executing shell function qmake5_base_preconfigure
            | DEBUG: Shell function qmake5_base_preconfigure finished
            | DEBUG: Executing shell function do_configure
            | ls: cannot access '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0//.pro': No such file or directory
            | WARNING: exit code 2 from a shell command.
            | ERROR: Execution of '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/run.do_configure.663829' failed with exit code 2
            ERROR: Task (/home/mani/yocto/poky/meta-mani/recipes-software/mytree/mytree_0.1.bb:do_configure) failed with exit code '1'
            NOTE: Tasks Summary: Attempted 6810 tasks of which 6802 didn't need to be rerun and 1 failed.

            Summary: 1 task failed:
            /home/mani/yocto/poky/meta-mani/recipes-software/mytree/mytree_0.1.bb:do_configure
            Summary: There was 1 ERROR message shown, returning a non-zero exit code.


            Additional note:
            a. I have stored all my file in "/home/mani/yocto/poky/meta-mani/recipes-software/mytree/files" folder
            b. mytree_0.1.bb file is in "/home/mani/yocto/poky/meta-mani/recipes-software/mytree" folder

            1. mytree_0.1.bb file as below:

            SUMMARY = "Test QT program"
            DESCRIPTION = "Test QT program"
            LICENSE = "CLOSED"

            DEPENDS += " qtbase wayland "

            SRC_URI = " file://myTree.pro
            file://main.cpp
            file://mainwindow.cpp
            file://mainwindow.h
            file://mainwindow.ui
            "
            TARGET_CC_ARCH += "${LDFLAGS}"

            S = "${WORKDIR}/*"

            do_install_append () {
            install -d ${D}${bindir}
            install -m 0775 myTree ${D}${bindir}/
            }

            inherit qmake5


            1. Added in conf/local.conf file as below:

            IMAGE_INSTALL_append += " mycapp "
            IMAGE_INSTALL_append += " myqtapp "
            IMAGE_INSTALL_append += " mytree "
            DISTRO_FEATURES_append += " wayland "
            IMAGE_INSTALL_append += " qtbase qtwayland "
            CORE_IMAGE_EXTRA_INSTALL += " wayland weston "
            IMAGE_INSTALL_remove += " connman connman-client connman-plugin-wifi "

            CONF_VERSION = "1"
            RM_OLD_IMAGE = "1"
            INHERIT += "rm_work"


            please guide me, what was the mistake i have done..

            thanks.

            R 1 Reply Last reply
            0
            • R rmkmani1001

              @SGaist thanks for your guidance..
              I have result in this error

              ERROR: mytree-0.1-r0 do_configure: Execution of '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/run.do_configure.663829' failed with exit code 2
              ERROR: Logfile of failure stored in: /home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/log.do_configure.663829
              Log data follows:
              | DEBUG: Executing shell function qmake5_base_preconfigure
              | DEBUG: Shell function qmake5_base_preconfigure finished
              | DEBUG: Executing shell function do_configure
              | ls: cannot access '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0//.pro': No such file or directory
              | WARNING: exit code 2 from a shell command.
              | ERROR: Execution of '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/run.do_configure.663829' failed with exit code 2
              ERROR: Task (/home/mani/yocto/poky/meta-mani/recipes-software/mytree/mytree_0.1.bb:do_configure) failed with exit code '1'
              NOTE: Tasks Summary: Attempted 6810 tasks of which 6802 didn't need to be rerun and 1 failed.

              Summary: 1 task failed:
              /home/mani/yocto/poky/meta-mani/recipes-software/mytree/mytree_0.1.bb:do_configure
              Summary: There was 1 ERROR message shown, returning a non-zero exit code.


              Additional note:
              a. I have stored all my file in "/home/mani/yocto/poky/meta-mani/recipes-software/mytree/files" folder
              b. mytree_0.1.bb file is in "/home/mani/yocto/poky/meta-mani/recipes-software/mytree" folder

              1. mytree_0.1.bb file as below:

              SUMMARY = "Test QT program"
              DESCRIPTION = "Test QT program"
              LICENSE = "CLOSED"

              DEPENDS += " qtbase wayland "

              SRC_URI = " file://myTree.pro
              file://main.cpp
              file://mainwindow.cpp
              file://mainwindow.h
              file://mainwindow.ui
              "
              TARGET_CC_ARCH += "${LDFLAGS}"

              S = "${WORKDIR}/*"

              do_install_append () {
              install -d ${D}${bindir}
              install -m 0775 myTree ${D}${bindir}/
              }

              inherit qmake5


              1. Added in conf/local.conf file as below:

              IMAGE_INSTALL_append += " mycapp "
              IMAGE_INSTALL_append += " myqtapp "
              IMAGE_INSTALL_append += " mytree "
              DISTRO_FEATURES_append += " wayland "
              IMAGE_INSTALL_append += " qtbase qtwayland "
              CORE_IMAGE_EXTRA_INSTALL += " wayland weston "
              IMAGE_INSTALL_remove += " connman connman-client connman-plugin-wifi "

              CONF_VERSION = "1"
              RM_OLD_IMAGE = "1"
              INHERIT += "rm_work"


              please guide me, what was the mistake i have done..

              thanks.

              R Offline
              R Offline
              rmkmani1001
              wrote on last edited by
              #6

              @rmkmani1001 said in How to compile QT-GUI project with Yocto build:

              IMAGE_INSTALL_append += " mytree "

              I have successfully executed these two programs.

              1. IMAGE_INSTALL_append += " mycapp "
              2. IMAGE_INSTALL_append += " myqtapp "

              I have added new line for my QT-GUI as
              IMAGE_INSTALL_append += " mytree "

              Just for information, these three lines are added in end of local.conf file.
              CONF_VERSION = "1"
              RM_OLD_IMAGE = "1"
              INHERIT += "rm_work"

              thanks..

              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