Search code examples
qt5qt-creatorcross-compilingyoctobitbake

How to configure META-QT5 layer to build META-TOOLCHAIN-QT to cross compile Yocto for MINNOWBOARD


I need to run a software application on top of the yocto image I'm building for Minnowboard. The main configuration needed is Qt5.

I was able to build a sample test image for Minnowboard according to the latest yocto guide by adding meta-intel layer with MACHINE intel-corei7-64 and EXTRA_IMAGE_FEATURES ?= "dev-pkgs"

But I'm having trouble with building Qt support for my yocto image. I added meta-qt5 layer and tried to compile for meta-toolchain-qt5 so that according to this guide I can setup Qt-creator in my host machine to cross compile for Minnowboard.

But meta-toolchain-qt5 is keep failing with many errors.

Summary: 7 tasks failed: /home/holoplot/Yocto/poky/meta-qt5/recipes-qt/qt5/qtwebsockets_git.bb:do_compile /home/holoplot/Yocto/poky/meta-qt5/recipes-qt/qt5/qtenginio_git.bb:do_install /home/holoplot/Yocto/poky/meta-qt5/recipes-qt/qt5/qtgraphicaleffects_git.bb:do_compile /home/holoplot/Yocto/poky/meta-qt5/recipes-qt/qt5/qt3d_git.bb:do_compile /home/holoplot/Yocto/poky/meta-qt5/recipes-qt/qt5/qtconnectivity_git.bb:do_compile /home/holoplot/Yocto/poky/meta-qt5/recipes-qt/qt5/qtquickcontrols2_git.bb:do_compile /home/holoplot/Yocto/poky/meta-qt5/recipes-qt/qt5/qtsensors_git.bb:do_compile

ATM, I'm using PYRO branch for all layers. I added following layers (openembedded-core/meta , meta-openembedded/meta-oe , meta-openembedded/meta-ruby , meta-openembedded/meta-multimedia in hope of a successful meta-toolchain-qt5 build but it still failed.

Is there a stable branch that I can use to successfully build the meta-toolchain-qt5 for minnowboard or should I edit the qt recipes in order to avoid building above packages which causes errors?

Any support is much appreciated. Thanks!

FYI : My software has following dependencies.

linux-vdso.so.1 libnetsnmp.so.30 libQt5Network.so.5 libQt5Network.so.5 libQt5Core.so.5 libpthread.so.0 libstdc++.so.6 libstdc++.so.6 libm.so.6 libgcc_s.so.1 libc.so.6 libz.so.1 libicui18n.so.56 libicuuc.so.56 libicudata.so.56 libdl.so.2
libgthread-2.0.so.0 libglib-2.0.so.0 libglib-2.0.so.0 libpcre.so.3


Solution

  • From your error log. This seem like has no problem with the recipe but instead the spec of your machine; Please try to increase the amount of RAM for your virtual machine;

    440589a074-r0/git/src/core/jobs/qthreadpooler.cpp | compiling /home/holoplot/Yocto/poky/build/tmp/work/corei7-64-poky-linux/qt3d/5.8.0+gitAUTOINC+440589a074-r0/git/src/core/jobs/task.cpp

    | virtual memory exhausted: Cannot allocate memory | virtual memory exhausted: Cannot allocate memory

    I recommend to have at least 4G of RAM for a dual core processor;

    | NOTE: make -j 16 MAKEFLAGS=-j 16 OE_QMAKE_COMPILER=x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/holoplot/Yocto/poky/build/tmp/work/corei7-64-poky-linux/qtgraphicaleffects/5.8.0+gitAUTOINC+1583bb5569-r0/recipe-sysroot OE_QMAKE_CC=x86_64-poky-linux-gcc -m64 -march=corei7 -mtune=corei

    make -j4 16 MAKEFLAGS = -j 16 There are 2 possibilities here;

    -You set to compile with 16 threads; If this is the case, set the threads with these variables;

    BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
    PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
    

    -You are currently using a 16 core machine. In Amazon EC2, this type of M4.4xlarge instance has 64G RAM, which is more than enough to compile Yocto;