Torizon IDE 2 VSC Extension - Error deploying/debugging template Qt QML C++ Template App

Good morning,

I have a Colibri eval board and iMX8X connected to my development PC

  • Windows 10, running VMWare Workstation with Ubuntu 22.04.3 LTS as a guest
  • Visual Studio Code for Linux version 1.8.1
  • Torizon IDE 2 Extension pre-release version v2.1.103
  • Development PC is on same network as target

On the target:

  • Colibri iMX8X with TorizonCore installed
    ID=torizon
    NAME=“TorizonCore”
    VERSION=“6.3.0+build.4 (kirkstone)”
    VERSION_ID=6.3.0-build.4
    PRETTY_NAME=“TorizonCore 6.3.0+build.4 (kirkstone)”
    DISTRO_CODENAME=“kirkstone”
    BUILD_ID=“4”
    ANSI_COLOR=“1;34”
    VARIANT=“Docker”

I followed all of the insructions (I think) up to and including the point of creating a single container application, the Qt QML template example from the Torizon IDE 2 extension for VSC.

  • I connected to the target device
  • I followed all of the tasks (installing prerequisites, etc. no problem, except for the binfmt, which I launched manually in a terminal as sudo due to admin privileges. Is this acceptable/ok?
  • I set a breakpoint in main.cpp of the Qt QML app
  • I followed the instructions for debug, including selecting the correct target platform from within VSC (Torizon ARMv8)
  • I hit F5 and waited for the build/deploy to complete

All tasks completed except for running the container where I got the following error:

Executing task: DOCKER_HOST= docker run --rm -it -v /home/cowboydan/hellopy:/app cross-toolchain-arm64-hellopycontainer bash -c ‘qmake6 -o aarch64/Makefile CONFIG+=debug CONFIG+=qml_debug’

WARNING: The requested image’s platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
/usr/lib/aarch64-linux-gnu/qt6/mkspecs/features/resources_functions.prf:86: Cannot write file /app/aarch64/debug/.rcc/qmake_resources.qrc: Cannot create parent directory

  • The terminal process “/usr/bin/bash ‘-c’, ‘DOCKER_HOST= docker run --rm -it -v /home/cowboydan/hellopy:/app cross-toolchain-arm64-hellopycontainer bash -c ‘qmake6 -o aarch64/Makefile CONFIG+=debug CONFIG+=qml_debug’’” terminated with exit code: 3.

Symptoms:

  1. My SVGA monitor connected to the Colibri Eval board went blank (expected from another post: build/deploy stops all other containers)
  2. I cannot see the expected QML application (due to the newly build container not running)

I suspect it has something to do with the expected vs actual platform (or lack of a requested specific platform) in running the container. Any help would be greatly appreciated.

Greetings @cowboydan,

First of all the warning is completely unrelated and is a standard Docker warning. The warning appears because the container you are building is being built for an architecture (arm64) that does not match your development computer architecture (amd64). But this is expected because of course we’re building for arm64 intentionally.

As for the issue itself, first of all I can’t reproduce it on my end. But the issue itself is that the extension is trying to run the following command on your development PC:

docker run --rm -it -v /home/cowboydan/hellopy:/app cross-toolchain-arm64-hellopycontainer bash -c ‘qmake6 -o aarch64/Makefile CONFIG+=debug CONFIG+=qml_debug’

But this command fails for the following reason:

/usr/lib/aarch64-linux-gnu/qt6/mkspecs/features/resources_functions.prf:86: Cannot write file /app/aarch64/debug/.rcc/qmake_resources.qrc: Cannot create parent directory

Why it’s failing exactly? Not sure. Maybe it can’t create the parent directory because of permission issues? As you can see from the docker run command it bind-mounts /home/cowboydan/hellopy from your development PC into the container, maybe this folder has weird permissions that prevent the creation of parent directories or something similar.

Though other than that it’s hard to say what exactly might be wrong here as it seems specific to your setup. You can try manually running this command yourself and debugging the issue on your setup.

Best Regards,
Jeremias