Yocto image with qt iMX8qm

Hello everyone,

After building the yocto fsl-image-validation-imx for iMX8qm successfully by following the documentaion in this page:
(Build Apalis iMX8/Colibri iMX8X OpenEmbedded/Yocto Project Bring-up Image)
I have now to add Qt to the image. I tried to build the: fsl-image-qt5-validation-imx
however the compiling task of qtbase_git.bb is failing:

ERROR: Task (/home/mansour/yocto-imx8b/sources/meta-qt5/recipes-qt/qt5/qtbase_git.bb:do_compile) failed with exit code ‘1’

the log is very big, but I’m copying here only the error messages:

/home/mansour/yocto-imx8b/build/tmp/work/aarch64-mx8-poky-linux/qtbase/5.10.1+gitAUTOINC+6c6ace9d23-r0/recipe-sysroot/usr/lib/crt1.o: In function `_start':
/usr/src/debug/glibc/2.27-r0/git/csu/../sysdeps/aarch64/start.S:83: undefined reference to `main'
/usr/src/debug/glibc/2.27-r0/git/csu/../sysdeps/aarch64/start.S:83: undefined reference to `main'
/usr/src/debug/glibc/2.27-r0/git/csu/../sysdeps/aarch64/start.S:83: undefined reference to `main'
/usr/src/debug/glibc/2.27-r0/git/csu/../sysdeps/aarch64/start.S:83: undefined reference to `main'
collect2: error: ld returned 1 exit status
Makefile:105: recipe for target 'tst_qmetatype' failed
make[5]: *** [tst_qmetatype] Error 1
make[5]: Leaving directory '/home/mansour/yocto-imx8b/build/tmp/work/aarch64-mx8-poky-linux/qtbase/5.10.1+gitAUTOINC+6c6ace9d23-r0/build/tests/auto/corelib/kernel/qmetatype'
Makefile:314: recipe for target 'sub-qmetatype-make_first' failed
make[4]: *** [sub-qmetatype-make_first] Error 2
make[4]: Leaving directory '/home/mansour/yocto-imx8b/build/tmp/work/aarch64-mx8-poky-linux/qtbase/5.10.1+gitAUTOINC+6c6ace9d23-r0/build/tests/auto/corelib/kernel'
Makefile:56: recipe for target 'sub-kernel-make_first' failed
make[3]: *** [sub-kernel-make_first] Error 2
make[3]: *** Waiting for unfinished jobs....

gitAUTOINC+6c6ace9d23-r0/build/tests/auto/corelib'
Makefile:55: recipe for target 'sub-corelib-make_first' failed
make[2]: *** [sub-corelib-make_first] Error 2
make[2]: *** Waiting for unfinished jobs....
~
Makefile:45: recipe for target 'sub-auto-make_first' failed
make[1]: *** [sub-auto-make_first] Error 2
make[1]: Leaving directory '/home/mansour/yocto-imx8b/build/tmp/work/aarch64-mx8-poky-linux/qtbase/5.10.1+gitAUTOINC+6c6ace9d23-r0/build/tests'
Makefile:98: recipe for target 'sub-tests-make_first' failed
make: *** [sub-tests-make_first] Error 2
ERROR: oe_runmake failed
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_compile (log file is located at /home/mansour/yocto-imx8b/build/tmp/work/aarch64-mx8-poky-linux/qtbase/5.10.1+gitAUTOINC+6c6ace9d23-r0/temp/log.do_compile.16687)

ERROR: Task (/home/mansour/yocto-imx8b/sources/meta-qt5/recipes-qt/qt5/qtbase_git.bb:do_compile) failed with exit code ‘1’

The meta-qt5 layer branch is sumo. I tried out another branch (master) but I got also errors during the build process. I tried to build the qtbase package seperately using: “bitbake qtbase” but the same problem occurs.

Do you have any suggestion ?

Best regards,
Majd

Rather than using this out-dated bring-up BSP I would rather recommend using the latest Thud based BSP 3.0b1:

http://git.toradex.com/cgit/meta-toradex-demos.git/tree/recipes-images/images/qt5-x11-image.bb?h=thud

Building as per the following article on our developer website:

Hi @marcel.tx,
Thank you for referring to this.

I’m now just stucked with 2 errors when building “qt5-x11-image” for apalis-imx8 without image changes.

first:

  ERROR: gstreamer1.0-1.14.imx-r0 do_unpack: Unpack failure for URL: 'gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https;branch=MM_04.04.04_1811_L4.14.78_GA'. No up to date source found: clone directory not available or not up to date: /home/mansour/imx8-thud/build/../downloads/git2/source.codeaurora.org.external.imx.gstreamer.git; shallow clone not available: /home/mansour/imx8-thud/build/../downloads/gitsmshallow_source.codeaurora.org.external.imx.gstreamer.git_f4e127a-1_MM_04.04.04_1811_L4.14.78_GA.tar.gz
    ERROR: gstreamer1.0-1.14.imx-r0 do_unpack: Function failed: base_do_unpack        

The second one:
(I can remove this package) is on qtwebkit_git.bb, it is just the same (do_compile) error as the error of qtbase_git that I referred to in the question. but this package is not important for us I assume.
It would be great if you know a solution for the first one. Thank you

Best regards, Majd

And you sure your Internet connection does not suffer any limitations? We can build that all no problem. Can you manually e.g. check out the following?

[user@host tmp]$ git clone https://source.codeaurora.org/external/imx/gstreamer.git -b MM_04.04.04_1811_L4.14.78_GA
Cloning into 'gstreamer'...
remote: Counting objects: 150291, done.
remote: Compressing objects: 100% (661/661), done.
remote: Total 150291 (delta 942), reused 1331 (delta 826)
Receiving objects: 100% (150291/150291), 30.26 MiB | 3.76 MiB/s, done.
Resolving deltas: 100% (117883/117883), done.

Hi @marcel.tx,

thank you, I created a new yocto directory and ran a new clean build, the gstreamer worked this time. The last problem I have: I’m trying to remove qtwebkit (since it refuses to compile) but I’m not having success. I tried all possibilites I know to remove the package:
PACKAGE_EXCLUDE = “qtwebkit”
DISTRO_FEATURES_remove = “qtwebkit”
QT5_ESSENTIALS_remove = “qtwebkit”
IMAGE_INSTALL_remove = “qtwebkit”
PACKAGECONFIG_remove_pn-qttools = “qtwebkit”
PACKAGECONFIG_remove_pn-qtquick1 = “qtwebkit”

I dont mind to keep this package if it let me build my image at least!
I appreciate any suggestion.

Best regards,
Majd

Could you post the error you are getting when you try to build the qt5 image?
I did the build and it passed without any errors.

I also meet such error when generating Qt toolchain for Colibri iMX8X based on Linux 3.0beta2 BSP. To remove qtwebkit(I also remove qt3d), packagegroup-qt5-toolchain-target.bbappend could be created and it is the content:

#remove qtwebkit qt3d
RDEPENDS_${PN}_remove = "qtwebkit qtwebkit-dev qtwebkit-mkspecs qtwebkit-qmlplugins qt3d"