| 1158 | if (curl_easy_getinfo(target_handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD,
| | ^~
| /workdir/torizon/build-torizon/tmp/work/x86_64-linux/elfutils-native/0.186-r0/recipe-sysroot-native/usr/include/curl/curl.h:2879:3: note: declared here
| 2879 | CURLINFO_CONTENT_LENGTH_DOWNLOAD
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| cc1: all warnings being treated as errors
The problem is that the torizon/crops is based on Debian 12 which is giving an error. I am trying to find the way to get the Ubuntu version for torizon/crops (if any) or at least to build the docker similar to the one provided from Torizon in order to achieve the same output image.
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?
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:
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:
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.
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.
I’m trying to reproduce this now but that will take a while. If my build does fail, my next step will be to run the torizon/crops:dunfell-5.x.y container to see if that helps. If it is indeed due to the newer version of Debian in the current scarthgap container, moving to the older one might be a workaround until we can figure out the ultimate root cause.