Cross compile QT code for IMX8

I tried building the yocto. All QT source files are added in recipe folder in custome layer.
while bitbake it will throw the error regarding glib-2.0 development package not found. but the package is installed.

Hi @sanket_1989,

Thanks for writing to Toradex community.

From question, I am not sure which image you are trying to build using yocto.
I assume you wanted to use qt for your application/product development. I will suggest you to check below article, we provide tdx-reference-multimedia-image which do provide qt support. Please build tdx-reference-multimedia-image first and then customise as per your requirement.

If you get error while building reference image please share complete steps and error in text format to further check.

Best Regards
Ritesh Kumar

while building my image i came across the following error
ERROR: wireframe-1.0.0-r1 do_package: QA Issue: wireframe: Files/directories were installed but not shipped in any package:
/opt/wireframe/bin/wireframe
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
wireframe: 1 installed and not shipped files. [installed-vs-shipped]
ERROR: wireframe-1.0.0-r1 do_package: Fatal QA errors were found, failing task.
ERROR: Logfile of failure stored in: /home/user1/oe-core/build/tmp/work/cortexa53-tdx-linux/wireframe/1.0.0-r1/temp/log.do_package.734311
ERROR: Task (/home/user1/oe-core/build/…/layers/meta-custom/recipes-cnhi/wireframe/wireframe_1.0.0.bb:do_package) failed with exit code ‘1’

Hi @Srivathsan,

Unfortunately with this information it is difficult to provide any valuable comment. Looking at error seems like recipe is trying to install library but path for same is not defined.

Kindly share details asked previously.
Additionally this seems to be custom recipe, so to provide any help here with error please share all changes you have made along with other details.

Best Regards
Ritesh Kumar

this is my recipe file
DESCRIPTION = “Qt Application for Yocto”
LICENSE = “CLOSED”

PR = “r1”

#inherit core-image

DEPENDS += " qtbase qtdeclarative"

SRC_URI = “file://main.cpp
file://mainwindow.cpp
file://surround_view.cpp
file://mainwindow.h
file://Resource.qrc
file://surround_view.h
file://mainwindow.ui
file://surround_view.ui
file://wireframe.pro
file://icons/”

S = “${WORKDIR}”

inherit qmake5

#RDEPENDS_${PN} += “qtbase qtdeclarative qtquickcontrols2”

do_install:append() {
install -d ${D}${datadir}
install -m 0755 ${B}/wireframe ${D}${bindir}/
}

FILES_${PN} += “${bindir}/wireframe”

Hi @Srivathsan,

Thanks for sharing details.

It is custom recipe to compile qt application and error shows, this try to install binaries to non existence directory.
I will suggest to look at demo application recipe which we have used in reference-multimedia-image. Adapt your recipe and check.

Alternatively do check below article for more detail

Best Regards
Ritesh Kumar

thank you this resolved the issue.
it is writing to /usr/share