Linux-toradex task fails while compiling using Yocto project

Following instructions in https://developer.toradex.com/torizon/in-depth/build-torizoncore-from-source-with-yocto-projectopenembedded/, I am trying to build Torizon OS using Yocto project:-
Machine name: colibri-imx7-emmc
Distro: torizon
Image: torizon-minimal

I am constantly getting error while baking “linux-toradex”. I have run several times by clearing tmp folder but still getting the following error:-

ERROR: Task (/home/testing/YoctoProject/Toradex/build/conf/…/…/layers/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_5.4-2.3.x.bb:do_compile) failed with exit code ‘1’

I am attaching the error logfile here.
log.do_compile.65414 (131.5 KB)

Please help urgently.

Greetings @rajdeepteck123,

Your build environment here is not making sense to me. You say you’re building for colibri-imx7-emmc, but then you list the DISTRO as torizon. The only valid DISTRO for this machine in Torizon OS is torizon-upstream.

Next, you say you are building the torizon-minimal image. But according to your logs you’re building the “5.4-2.3” linux-toradex kernel. This version of the kernel was for versions 5.X of the OS. But, if you are building for 5.X then this does not make sense. The image name torizon-minimal did not exist back in 5.X, the name was different back then as seen here: meta-toradex-torizon/recipes-images/images/torizon-core-lite.bb at dunfell-5.x.y · torizon/meta-toradex-torizon · GitHub

It looks like to me you setup your build environment very strangely and this may be the cause of the issues you are seeing.

Best Regards,
Jeremias

Thanks @jeremias.tx
I changed the DISTRO to torizon-upstream and was able to build torizon-minimal image.

Is it possible to install a GUI framework like GTK on torizon-minimal?

I changed the DISTRO to torizon-upstream and was able to build torizon-minimal image.

That’s good to hear.

Is it possible to install a GUI framework like GTK on torizon-minimal?

Most things in Yocto should be possible, it’s just a matter of figuring it out. That said I’ve never tried adding GTK in Yocto so this is something you’ll need to experiment with.

Best Regards,
Jeremias

@jeremias.tx I followed the steps required to create a recipe to add a python package from pypi.org as mentioned here: https://developer.toradex.com/linux-bsp/application-development/programming-languages/python-in-linux

While trying to bake the recipe I get the following error:-

ParseError at /home/testing/YoctoProject/Toradex2/build/conf/…/…/layers/meta-teckinsoft/recipes-devtools/python-tinydb/python-tinydb_4.8.0.bb:1: Could not inherit file classes/setuptools.bbclass

Please help. Basically, I want to install pip which will help to install python packages as required later.

Basically, I want to install pip which will help to install python packages as required later.

Then why not just include the python3-pip recipe that is readily available in openembedded-core?: python3-pip_22.0.3.bb « python « recipes-devtools « meta - openembedded-core - OpenEmbedded Core layer

Also if you don’t mind me asking. Is there a reason you’re trying to build Torizon with Yocto like this? Rather than use it the “recommended” way using containers and such? It does not seem like you have much Yocto experience. While we can support you a bit on this, we don’t have the capacity to teach you how to use Yocto.

Best Regards,
Jeremias

@jeremias.tx Yes, you are right, I do not have much Yocto experience. But I found using containers a bit awkward especially coming from an embedded programming background.

The recipe available in openembedded-core doesn’t do much but installs patches. However, I found some excellent tools: (a) pipoe (b) pip2bitbake which help in creating recipes for installing any package from pypi.

With the help of these tools, I could get pip in torizon-minimal image.

Thanks for your time and help.

The recipe available in openembedded-core doesn’t do much but installs patches.

The recipe does install pip. Did you actually try using it and confirm such?

However, I found some excellent tools: (a) pipoe (b) pip2bitbake which help in creating recipes for installing any package from pypi.

I’m glad you were able to find someway to move on.

Yes, you are right, I do not have much Yocto experience. But I found using containers a bit awkward especially coming from an embedded programming background.

Could you share what you found awkward about using containers? It would be helpful feedback for us.

Best Regards,
Jeremias