title: How do I cross-compile a Qt-project with a recipe in yocto
body: <p>I am trying to Cross-compile a qt-project from a recipe. I have created a recipe file but when I try to bitbake it. I am met with error</p>
  
  <p>Here is my recipe file</p>
  
  <pre><code>DESCRIPITION = "my_project File Transfer"
  LICENSE = "MIT"
  LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
  
  SRC_URI = "git://git@bitbucket.org/johndoe/my_ui.git;protocol=ssh;rev=master"
  
  S = "${WORKDIR}/git/my_project"
  
  RDEPENDS_${PN} ="bash"
  inherit qmake5
  require recipes-qt/qt5/qt5.inc
  
  do_install_append() {
      ## Creating Folder Structure
      install -d ${D}/opt/my_project/bin
      install -d ${D}/home/root/my_project
      install -d ${D}/home/root/my_project/font
      install -d ${D}/home/root/my_project/Images
      install -d ${D}/home/root/my_project/Qml
      ###compile the project  
      oe_runmake INSTALL_ROOT=${D} install
      #### Copying files
      install -m 0755 ${S}/font/* ${D}/home/root/my_project/font/
      install -m 0755 ${S}/Images/* ${D}/home/root/my_project/Images/
      install -m 0755 ${S}/Qml/* ${D}/home/root/my_project/Qml/
  }
  
  
  FILES_${PN} = "/home/root/my_project"
  </code></pre>
  
  <p>The error that I see is </p>
  
  <pre><code>Sstate summary: Wanted 335 Found 327 Missed 8 Current 1958 (97% match, 99% complete)
  NOTE: Executing SetScene Tasks
  NOTE: Executing RunQueue Tasks
  ERROR: myproject-project-1.0-r0 do_configure: Error calling /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile        /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/git/myproject/myproject.pro  -- 
  ERROR: myproject-project-1.0-r0 do_configure: Function failed: do_configure (log file is located at /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/temp/log.do_configure.20982)
  ERROR: Logfile of failure stored in: /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/temp/log.do_configure.20982
  Log data follows:
  | DEBUG: Executing shell function qmake5_base_preconfigure
  | DEBUG: Shell function qmake5_base_preconfigure finished
  | DEBUG: Executing shell function do_configure
  | NOTE: qmake prevar substitution: '   '
  | Could not find qmake spec 'linux-oe-g++'.
  | Error processing project file: /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/git/myproject/myproject.pro
  | ERROR: Error calling /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/recipe-sysroot-native/usr/bin/qmake -makefile -o Makefile        /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/git/myproject/myproject.pro  --
  | WARNING: exit code 1 from a shell command.
  | ERROR: Function failed: do_configure (log file is located at /home/blue/yacto/rpi-qt5/build/tmp/work/all-poky-linux/myproject-project/1.0-r0/temp/log.do_configure.20982)
  ERROR: Task (/home/blue/yacto/poky-warrior-21.0.1/meta-rpi_custom/recipes-custom/myproject-project/myproject-project_1.0.bb:do_configure) failed with exit code '1'
  NOTE: Tasks Summary: Attempted 4242 tasks of which 4241 didn't need to be rerun and 1 failed.
  
  Summary: 1 task failed:
    /home/blue/yacto/poky-warrior-21.0.1/meta-rpi_custom/recipes-custom/myproject-project/myproject-project_1.0.bb:do_configure
  </code></pre>
  
  <p>I know that in order to cross-compile. I had to run <code>qmake</code> from my cross-compile tool-chain location and then run <code>make</code> command on it.</p>
  
  <p>I am guessing that is what's missing in my recipe. So my question is, Do I add that in my <code>do_configure</code>
  if thats the case can anyone help me or point me how do I populate my do_configure
  Is it as simple as source /opt/poky/2.7.1/environment---- 
  then qmake</p>
  
  <p>I am drawing a blank at this step</p>
  
  <p>Please let me know what am I doing wrong</p>
  
  <p>Edit1: remove <code>inherit allarch</code> from recipe</p>