I’m running into a problem trying to prepare a cross-compile development toolchain for a Qt5 application targeting the iMX8.
We’ve done this before for the i.MX6 and it was quite straightforward - start from the torizon/debian-cross-toolchain-armhf:3 image, install the required Qt (and other -dev) packages for armhf, and it just worked.
However, I’m running into problems trying to do this for Arm64 and the i.MX8. Since we’ll be targeting Torizon v7 I am now basing off of torizon/cross-toolchain-arm64-imx8:4.4 I’m unable to install the development packages because they all fail an installation dependency on libc6:arm64, which cannot be installed:
produces several hundred error messages along the lines of: libqt5sql5:arm64 : Depends: libc6:arm64 (>= 2.17) but it is not going to be installed
This is also true for basic system libraries like zlib or asound2.
Attempting to install libc6:arm64 as well, fails with:
libc6 : Breaks: libc6:arm64 (!= 2.36-9+deb12u9) but 2.40-4+toradex1 is to be installed
How can I resolve this? The cross-compilation image is key for us as the codebase is large and the overhead of emulated ARM64 for the build would almost certainly result in unacceptable multi-hour build times for an image.
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello!
For developing with Torizon on Toradex hardware, I recommend using the Torizon IDE Extension templates. These templates simplify the setup of a cross-compilation environment by automatically managing the necessary configurations. They utilize Debian-based containers and allow for easy package management through the torizonPackages.json file.
To add your required packages, you can modify the torizonPackages.json file in the following sections:
buildDeps: For build/compilation container images
devRuntimeDeps: For runtime development/debug container
prodRuntimeDeps: For runtime production/release container
The IDE Extension also supports autocompletion for Debian and Toradex feed packages within this file.
For cross-compilation, ensure your Docker environment is properly configured and ARM emulation is enabled. You can enable ARM emulation by executing the following command:
docker run --rm -it --privileged torizon/binfmt
When dealing with dependencies, such as Qt, it’s advisable to use the package management features of torizonPackages.json rather than manually altering Dockerfiles.
If you need more detailed guidance on setting up a project using the Torizon IDE Extension templates, feel free to ask!
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem:
The Auto-response isn’t particularly helpful for a number of reasons, the major one being that we are looking to do this for an automated CI environment and so no instance of VS code or any of its extensions are available; we rely purely on Dockerfile and CMake to manage the build operations.
I was able to observe the same on my side. I spoke with our team about this and we’re treating it as an unintended bug.
The installation of this packages does work when using the linux/arm64 version of torizon/cross-toolchain-arm64-imx8. Which I guess is not really cross-compiling anymore at that point, since the container architecture would be the same as the target.
Thanks for the quick response. I look forward to hearing what you find For now we’ll stick with 4.2 which seems to be the last version that can install the development packages.