Yocto CROPS 6.x build fails on elfutils

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your detailed description of the issue.

The error you’re facing with the Torizon containerized Yocto build is known and was discussed in the community post you referenced. It relates to how newer toolchains treat some code as errors, which causes failures in recipes like elfutils.

Choosing the Correct Torizon/Crops Version

  • There isn’t an official Ubuntu-based torizon/crops container; the provided containers are based on Debian for both the Kirkstone (6.x.y) and Scarthgap (7.x.y) versions.
  • The recommended practice is to use the latest supported Torizon container for your Torizon OS version—e.g., for Torizon OS 7.x.y, use torizon/crops:scarthgap-7.x.y. However, for 6.x.y (Kirkstone), you may face issues as some host/container combinations receive fewer updates as support focus moves to recent releases.

Workarounds

1. Upgrade to Torizon OS 7.x.y (Recommended if Possible)

If you are able, consider upgrading to Torizon OS 7.x.y and use its corresponding container torizon/crops:scarthgap-7.x.y. The build scripts have improved compatibility and maintenance for newer distributions:

2. Use a Native Build on Ubuntu

Since you are using Ubuntu 22.04 (an officially supported distribution for Yocto builds), you could set up a native build environment instead of a container. This avoids the host/container compatibility issues:

3. Patch the Problematic Recipe

The elfutils build failure might be fixable by locally patching the recipe to relax -Werror usage or adjust flag handling. This is more advanced and may be necessary for Kirkstone builds if you must stick with an older release. Refer to this workaround for more information.

4. Custom CROPS Container (Advanced)

If you require a custom build environment (e.g., based on Ubuntu), you could create your own Docker image using the Dockerfile from the crops repository as a base, adapting it for Ubuntu. However, this approach would require careful dependency handling and is only recommended for advanced users.

Summary Table

Approach Links Recommended When
Use Torizon OS 7.x.y Build instructions for 7.x.y New designs/upgrades
Native build on Ubuntu Yocto build natively Host is Ubuntu/Debian
Patch troublesome recipe Community workaround Must stay with 6.x.y
Custom CROPS container CROPS Dockerfile repo Custom expertise needed

If possible, moving to a native build on your Ubuntu host or updating to Torizon OS 7.x.y will provide the most stability and compatibility with current container images and dependencies.

Best regards,
Toradex AI Assistant.